Oracle Configuration
. . . . . . . . . . . . . . . . . . Create Links for Oracle Configuration and Dump Files on the Remote Site
Remote Mirroring of an Oracle Database Using Data Replicator Software
D-11
Create Links for Oracle Configuration and Dump
Files on the Remote Site
#!/bin/ksh
#-----------------------------------------------------------
# create links for Oracle configuration and dump files
#-----------------------------------------------------------
PRI_DB_ID=$1
ORACLE_SID=$2
ORACLE_HOME=$3
ORACLE_BASE=$4
TRACE=$5
PRI_HOST=$6
export PRI_DB_ID
export ORACLE_SID
export ORACLE_HOME
export ORACLE_BASE
export TRACE
export PRI_HOST
LINK_DIR=`/usr/bin/rsh ${PRI_HOST} -l ${PRI_DB_ID} "ls -l
${ORACLE_BASE}/admin/${ORACLE_SID}" | awk -F'-' '{print $2}' |
awk -F' ' '{print $2}'` >> $TRACE
mkdir -p ${ORACLE_BASE}/admin >> $TRACE 2>&1
if [ ! -d ${ORACLE_BASE}/admin/${ORACLE_SID} ]
then
ln -s ${LINK_DIR} ${ORACLE_BASE}/admin/${ORACLE_SID} >> $TRACE
2>&1
fi
if [ ! -f ${ORACLE_HOME}/dbs/init${ORACLE_SID}.ora ]
then
ln -s ${ORACLE_BASE}/admin/${ORACLE_SID}/pfile/
init${ORACLE_SID}.ora ${ORACLE_HOME}/dbs/
init${ORACLE_SID}.ora >> $TRACE 2>&1
fi