background image
<< Start local Oracle database | Read in global script variables >>
<< Start local Oracle database | Read in global script variables >>

DB2 database

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .The
sun_erm.ksh
Script
Remote Mirroring of an Oracle Database Using Data Replicator Software
C-15
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
sun_erm.ksh
Script
#!/bin/ksh #
##############################################################################
# #
# SCRIPT: sun_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 Mirroringing #
# 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 Mirroringing 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
typeset CFG_FILE # Configuration file to use
typeset -i DEBUG # Used to set debug option