Hi,
Iam calling 3 sql scripts through one shell script 'rmia.sh'.
Till now this was working fine, but last time while calling the SQL scripts,
Oracle was down. But amazingly the exit status was '0' (success)!!!
Below is the shell code:
#!/usr/bin/ksh -x
assign_file asql a.sql 1
assign_file rmia_upd rmia0001.up1 1
assign_file rmia_pop rmia0001.pop 1
assign_file rmia_tru rmia0001.tru 1
sqlplus -s $USER_NAME/$PASS_WORD <<!
@$rmia_upd
!
if [ $? -ne 0 ]
then
echo JOB Errored
exit 1
fi
sqlplus -s $USER_NAME/$PASS_WORD <<!
@$rmia_pop
!
if [ $? -ne 0 ]
then
echo JOB Errored
exit 2
fi
sqlplus -s $USER_NAME/$PASS_WORD <<!
@$rmia_tru
!
if [ $? -ne 0 ]
then
echo JOB Errored
exit 3
fi
echo "Job RMIA0001 is successful"
exit 0
Last few lines of the log file are:
+ sqlplus -s / @/opt/tuxedo/lokesha/rmia0001.up1
ERROR:
ORA-01033: ORACLE initialization or shutdown in progress
+ [ 0 -ne 0 ]
+ sqlplus -s / @/opt/tuxedo/lokesha/rmia0001.pop
ERROR:
ORA-01033: ORACLE initialization or shutdown in progress
+ [ 0 -ne 0 ]
+ sqlplus / @/opt/tuxedo/lokesha/rmia0001.tru
SQL*Plus: Release 8.1.7.0.0 - Production on Sun Apr 1 00:01:04 2007
(c) Copyright 2000 Oracle Corporation. All rights reserved.
ERROR:
ORA-01033: ORACLE initialization or shutdown in progress
Enter user-name: + [ 0 -ne 0 ]
+ date
+ echo Job RMIA0001 is successful
+ exit 0
What could be the possible reason for not capturing this "Oracle shutdown Error" as per the log file this time?
Any clue would be much appreciated.
Many Thanks and Regards,
Mysore Ganapati.