Start Oracle database
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
./.remote/oracle/db_stop
Remote Mirroring of an Oracle Database Using Data Replicator Software
B-43
#----------------------------
# End of defined functions
#----------------------------
# Setup of database trace file.
umask 000
echo "#--------------------------------------------------------
---------------------" >> $TRACE
echo "# Start of $SCRIPT_DIR/db_stop @ `date +%T`" >> $TRACE
echo "#--------------------------------------------------------
---------------------" >> $TRACE
umask 022
#-------------------------------------
# check status of database
#-------------------------------------
db_status
STATUS=$?
#-------------------------------------
# shutdown databse if online
#-------------------------------------
if (( $STATUS > 0 )); then
echo "# su - $PRI_DB_ID \"-c sqlplus -s / as sysdba @
$SCRIPT_DIR/db_stop.sql\"" >> $TRACE
echo "RESULT: \c" >> $TRACE
su - $PRI_DB_ID "-c sqlplus -s / as sysdba @ $SCRIPT_DIR/
db_stop.sql >> $TRACE" > /dev/null 2>&1
STATUS=$?
echo "STATUS: $STATUS" >> $TRACE
else
echo "INFO: Database $ORA_SID on $RMT_HOST is already
offline." >> $TRACE
fi
#-------------------------------------------------------------
# remove soft links for Oracle dump areas and configuration files
#-------------------------------------------------------------
db_remove_softlinks
#----------------------------------------
# Recheck to verify database if offline
#----------------------------------------
db_status
STATUS=$?
echo "#--------------------------------------------------------
---------------------" >> $TRACE
echo "# End of $SCRIPT_DIR/db_stop @ `date +%T`" >> $TRACE
echo "#\t\tEXIT STATUS = $STATUS" >> $TRACE