Veritas Storage Foundation 5.1 SP1 Advanced Features Administrator"s Guide (5900-1503, April 2011)
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.
cd ${rep_mnt_point}/dbase_vol
for i in 1 2 3 4 5 6 # adjust as required
do
rm -f ./log$i
ln -s ${rep_mnt_point}/dbase_logs/log$i ./log$i
done
# Remove the existing control file.
rm -f ${rep_mnt_point}/dbase_vol/cntrl1
# Create a new control file, recover and start the replica database.
svrmgrl <<!
connect internal
@c_file_create.sql
set autorecovery on
recover database until cancel using backup controlfile;
alter database open resetlogs;
quit
!
Files and scripts for sample scenarios
Script to complete, recover and start a replica Oracle database
522