Primary host
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Resume a Primary Database on the Primary Site
Remote Mirroring of an Oracle Database Using Data Replicator Software
D-5
export ORA_DUMP
export LOG
export TRACE
export PRI_SCRIPT_DIR
export PRI_HOST
###########################################################
# Take Oracle database out of backup mode on Primary host #
###########################################################
/usr/bin/rcp ${PRI_SCRIPT_DIR}/.primary/oracle/db_end_backup
$PRI_HOST:$PRI_SCRIPT_DIR/. >> ${TRACE}
/usr/bin/rsh $PRI_HOST chown $PRI_DB_ID $PRI_SCRIPT_DIR/
db_end_backup >> ${TRACE}
STATUS=`/usr/bin/rsh $PRI_HOST -l $PRI_DB_ID $PRI_SCRIPT_DIR/
db_end_backup ${ORACLE_SID} ${ORACLE_HOME}` >> ${TRACE}
if [ $STATUS != 0 ]
then
echo "ERROR!\n\tUnable to take primary database out of backup
mode" >> $LOG
exit 1
else
echo `date +%H":"%M":"%S`" SUCCESS - primary database out
of backup mode" >> $LOG
fi
#######################
# Archive log current #
#######################
/usr/bin/rcp ${PRI_SCRIPT_DIR}/.primary/oracle/
db_archive_log_current $PRI_HOST:$PRI_SCRIPT_DIR/. >> ${TRACE}
/usr/bin/rsh $PRI_HOST chown $PRI_DB_ID $PRI_SCRIPT_DIR/
db_archive_log_current >> ${TRACE}
STATUS=`/usr/bin/rsh $PRI_HOST -l $PRI_DB_ID $PRI_SCRIPT_DIR/
db_archive_log_current ${ORACLE_SID} ${ORACLE_HOME}` >> ${TRACE}
if [ $STATUS != 0 ]
then
echo "ERROR!\n\tUnable to archive current logs on Primary
database" >> $LOG
exit 1
else
echo `date +%H":"%M":"%S`" SUCCESS - current logs archived
on primary database" >> $LOG
echo "OK"
fi
exit 0