Veritas FlashSnap Point-In-Time Copy Solutions 5.0.1 Administrators Guide, HP-UX 11i v3, First Edition, November 2009

Script to complete, recover and start a replica Oracle
database
Use this script to complete, recover and start a replica Oracle database.
#!/bin/ksh
#
# script: startdb.sh <list_of_database_volumes>
#
# Sample script to complete, recover and start replica Oracle database.
#
# It is assumed that you have already performed the following
# steps:
# 1. Create the local volumes, file systems, and mount points for the
# redo and archived logs, and then mount them.
# 2. Based on the text control file for the production database,
# write a SQL script that creates a control file for the replica
# database.
# 3. Create an initialization file for the replica database and place
# this in the replica database’s $ORACLE_HOME/dbs directory.
# 4. Copy the Oracle password file for the production database to the
# replica database’s $ORACLE_HOME/dbs directory.
export ORACLE_SID=REP1
export ORACLE_HOME=/rep/oracle/816
export PATH=$ORACLE_HOME/bin:$PATH
snapvoldg=snapdbdg
rep_mnt_point=/rep
# Import the snapshot volume disk group.
vxdg import $snapvoldg
# Mount the snapshot volumes (the mount points must already exist).
for i in $*
do
fsck -F vxfs /dev/vx/rdsk/$snapvoldg/snap_$i
mount -F vxfs /dev/vx/dsk/$snapvoldg/snap_$i ${rep_mnt_point}/$i
done
# Fix any symbolic links required by the database.
93Files and scripts for sample scenarios
Script to complete, recover and start a replica Oracle database