Database is not running
Oracle on the Sun Solaris OS Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
C-26
Remote Mirroring of an Oracle Database Using Data Replicator Software
echo `date +%T`" ======= - Processing Logical Drives."
>> $LOG
echo `date +%T`" SUCCESS - Your subsystem is optimal."
>> $LOG
echo "\nrm $RMT_LOG_DIR/${RMT_SUBSYSTEM}_status.tmp" >>
$TRACE
rm $RMT_LOG_DIR/${RMT_SUBSYSTEM}_status.tmp >> $TRACE 2>&1
else
Kill_WAIT 2
echo "\t${B3}WARNING:${EB} Check the $RMT_LOG_DIR/
${RMT_SUBSYSTEM}_status.tmp file.\n"
echo `date +%T`" WARNING! - Your subsystem is NOT in an
optimal state." >> $LOG
echo `date +%T`" Check the $RMT_LOG_DIR/
${RMT_SUBSYSTEM}_status.tmp file." >> $LOG
fi
#####################################
# Shutdown Local Database (REMOTE) #
#####################################
# Assumed root user has database priviledges (probably a bad
assumption) ?
display "Shutting down database on $RMT_HOST host"
if [[ $DB_TYPE == 'db2' ]]; then
if [[ $(ps -ef | grep "$RMT_DB_ID" | grep -c db2gds) -gt 0 ]];
then
$RMT_SCRIPT_DIR/.remote/$DB_TYPE/db_stop $RMT_DB_ID
$DB_NAME $RMT_LOG_DIR
STATUS=$?
sleep 1
if (( STATUS > 0 )); then
Kill_WAIT 1
echo "\t${B1}ERROR:${EB} Bummer, can't shutdown
local database; Gotta exit now"
echo "\tCheck $RMT_LOG_DIR/$DB_NAME.trace file
for details\n"
echo `date +%T`" ERROR! - Can NOT shutdown
local database" >> $LOG
exit 1
else
echo `date +%T`" SUCCESS - Local database has
been shutdown" >> $LOG
Kill_WAIT 0
fi
else
Kill_WAIT 2
echo "\t${B3}WARNING:${EB} Database is not running on
this host."