background image
<< End backup mode of database | Alter database begin backup >>
<< End backup mode of database | Alter database begin backup >>

Archive current log file

Oracle on the AIX OS Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
B-52
Remote Mirroring of an Oracle Database Using Data Replicator Software
# Arguments:
#
$1 = Oracle SID
#
$2 = Oracle Home directory
#
$3 = Log directory
if [[ $# < 3 ]]; then
echo "Usage: db_suspend <ORACLE_SID> <ORACLE_HOME> <LOG_DIR>"
echo "\t<ORACLE_SID> = Oracle instance ID (ORACLE_SID)"
echo "\t<ORACLE_HOME> = Oracle Home directory (ORACLE_HOME)"
echo "\t<LOG_DIR> = Directory to log trace information"
exit 1
fi
ORACLE_SID=$1
ORACLE_HOME=$2
PRI_DB_ID=oracle
HOST=`hostname`
TRACE=$3/${HOST}_${ORACLE_SID}_trace.tmp
SCRIPT_DIR=/opt/LSI_ERM
abend ()
{
# Function to handle abnormal end
echo "#-----------------------------------------------------
------------------------" >> $TRACE
echo "# ERROR: Abnormal end for $SCRIPT_DIR/db_resume" >>
$TRACE
echo "# Database resume of '$ORACLE_SID' on $HOST was
aborted!" >> $TRACE
echo "#-----------------------------------------------------
------------------------" >> $TRACE
exit 1
}
umask 000
echo "#--------------------------------------------------------
---------------------" >> $TRACE
echo "# Start of $SCRIPT_DIR/db_resume @ `date +%T`" >> $TRACE
echo "#--------------------------------------------------------
---------------------" >> $TRACE
umask 022
#-------------------------------
# End backup mode of database
#-------------------------------
echo "# su - $PRI_DB_ID -c sqlplus -s / as sysdba @ $SCRIPT_DIR/
db_end_backup.sql" >> $TRACE
su - $PRI_DB_ID -c sqlplus -s / as sysdba @ $SCRIPT_DIR/
db_end_backup.sql > /dev/null 2>>$TRACE
STATUS=$?
echo "STATUS: $STATUS" >> $TRACE