#!/bin/bash
if [ ! -f $3 ]
then
echo '$$$FAIL$$$ sql file not found'
exit 1
fi
export ORACLE_SID=futures8;
sqlplus $1/$2 << EOF
start $3
exit;
EOF
#search error message in the log
if [ -f $4 ]
then
dberr=`grep ora- $4|wc -l`
if [ $dberr -gt 0 ]
then
echo `grep ora- $4`
echo '$$$FAIL$$$'
fi
fi
echo '$$$SUCCESS$$$'
if [ ! -f $3 ]
then
echo '$$$FAIL$$$ sql file not found'
exit 1
fi
export ORACLE_SID=futures8;
sqlplus $1/$2 << EOF
start $3
exit;
EOF
#search error message in the log
if [ -f $4 ]
then
dberr=`grep ora- $4|wc -l`
if [ $dberr -gt 0 ]
then
echo `grep ora- $4`
echo '$$$FAIL$$$'
fi
fi
echo '$$$SUCCESS$$$'