background image
<< Suspend the Database | Recreate snapshots >>
<< Suspend the Database | Recreate snapshots >>

Create backup controlfile

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Suspend the Database on the Primary Site
Remote Mirroring of an Oracle Database Using Data Replicator Software
C-3
exit 1
else
echo `date +%H":"%M":"%S`" SUCCESS - pfile created on primary
database" >> $LOG
fi
sleep 60
#############################################
# Create backup controlfile on Primary host #
#############################################
rcp $PRI_SCRIPT_DIR/.primary/oracle/db_backup_controlfile
$PRI_HOST:$PRI_SCRIPT_DIR/. >> ${TRACE}
rsh $PRI_HOST chown $PRI_DB_ID $PRI_SCRIPT_DIR/
db_backup_controlfile >> ${TRACE}
STATUS=`rsh $PRI_HOST -l $PRI_DB_ID $PRI_SCRIPT_DIR/
db_backup_controlfile ${ORACLE_SID} ${ORACLE_HOME} ${ORA_DUMP}`
>> ${TRACE}
if [ $STATUS != 0 ]
then
echo "ERROR!\n\tUnable to create backup controlfile on
primary database" >> $LOG
exit 1
else
echo `date +%H":"%M":"%S`" SUCCESS - backup controlfile
created on primary database" >> $LOG
fi
sleep 60
######################################################
# Put Oracle database in backup mode on Primary host #
######################################################
rcp $PRI_SCRIPT_DIR/.primary/oracle/db_begin_backup
$PRI_HOST:$PRI_SCRIPT_DIR/. >> ${TRACE}
rsh $PRI_HOST chown $PRI_DB_ID $PRI_SCRIPT_DIR/db_begin_backup
>> ${TRACE}
STATUS=`rsh $PRI_HOST -l $PRI_DB_ID $PRI_SCRIPT_DIR/
db_begin_backup ${ORACLE_SID} ${ORACLE_HOME}` >> ${TRACE}
if [ $STATUS != 0 ]
then
echo "ERROR!\n\tUnable to put primary database in backup mode"
>> $LOG
exit 1
else
echo `date +%H":"%M":"%S`" SUCCESS - primary database put
in backup mode" >> $LOG
echo "OK"
fi
sleep 60