background image
<< Backup control file | Set debug option >>
<< Backup control file | Set debug option >>

The remote server

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The
linux_erm.ksh
Script
Remote Mirroring of an Oracle Database Using Data Replicator Software
D-15
${RMT_SCRIPT_DIR}/.remote/oracle/db_online ${PRI_DB_ID}
${ORACLE_SID} ${TRACE} >> $TRACE
STATUS=$?
if [ $STATUS != 0 ]
then
echo "ERROR!\n\tUnable to start local database" >> $LOG
else
echo `date +%H":"%M":"%S`" SUCCESS - local database started"
>> $LOG
echo "OK"
fi
exit $STATUS
The
linux_erm.ksh
Script
#!/bin/ksh #
##############################################################################
# #
# SCRIPT: linux_erm.ksh #
# AUTHOR: rpaxton@lsil.com #
# DATE: 09/25/06 #
# REV: 3.1 #
# #
# PLATFORM: SUN 2.10 #
# ORACLE 10g #
# #
# PURPOSE: This script allows for the automation of Remote Volume Mirroring #
# a DB2 database to a remote location and creating a Snapshot of #
# the database at the remote location. This script will suspend #
# writes to the DB2 database while the Snapshots are created and #
# resume them afterwards. #
# #
# NOTE: You must have root equivalent privleges to execute this script. #
# In addition, you must enable rsh to the remote server of this #
# userid to allow for transfer of files via this scripts (.rhosts #
# & hosts.equiv). #
# #
##############################################################################
#
#****************************************************************************#
# #
# WARNING! WARNING! WARNING! WARNING! #
# These scripts were developed by Engenio Information Technologies to #
# standardize Snapshot and Remote Volume Mirroring and should be used #
# as a template to start from and not a turn key solution. #
# USE AT YOUR OWN RISK! #
# #
#****************************************************************************#
typeset -i VX=0 # Global volume counter variable
typeset -i STATUS # Global status variable
typeset -i VSTATUS # Global volume status variable
typeset -i MSTATUS # Global volume status variable