background image
<< Script changes may be required | Restart local database >>
<< Script changes may be required | Restart local database >>

Oracle dump areas

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
./.remote/oracle/db_start
Remote Mirroring of an Oracle Database Using Data Replicator Software
B-45
LINK_DIR=$(rsh $PRI_HOST -l $PRI_DB_ID "ls -l $ADMIN_DIR 2>/
dev/null" | awk -F'-> ' '{print $2}') > /dev/null 2>&1
if [[ ! -n $LINK_DIR ]]; then
echo "INFO: No soft link exist for $PRI_HOST:$ADMIN_DIR"
>> $TRACE
return 1
else
echo "INFO: LINK_DIR=$LINK_DIR" >> $TRACE
fi
#!# This should not be needed, since this directory should
already exist.
echo "# mkdir -p $ORA_HOME/admin" >> $TRACE
mkdir -p $ORA_HOME/admin > /dev/null 2>&1
if [[ ! -L $ADMIN_DIR ]]; then
echo "# ln -s $LINK_DIR $ADMIN_DIR" >> $TRACE
#-------------------------------------------------------------
# NOTE: This logic assumes that the mirrored volume will be
mounted in the same location as it
# is on the primary host. This may not be the case, and
script changes may be required.
#-------------------------------------------------------------
ln -s $LINK_DIR $ADMIN_DIR >> $TRACE
else
echo "INFO: Already a link named $ADMIN_DIR" >> $TRACE
fi
if [[ ! -L $ORA_HOME/dbs/init${ORA_SID}.ora ]]; then
echo "# ln -s $ADMIN_DIR/pfile/init${ORA_SID}.ora
$ORA_HOME/dbs/init${ORA_SID}.ora" >> $TRACE
ln -s $ADMIN_DIR/pfile/init${ORA_SID}.ora $ORA_HOME/dbs/
init${ORA_SID}.ora >> $TRACE 2>&1
else
echo "INFO: Already a link for $ORA_HOME/dbs/
init${ORA_SID}.ora" >> $TRACE
fi
if [[ ! -L $ORA_HOME/dbs/spfile${ORA_SID}.ora ]]; then
echo "# ln -s $ADMIN_DIR/pfile/spfile${ORA_SID}.ora
$ORA_HOME/dbs/spfile${ORA_SID}.ora" >> $TRACE
ln -s $ADMIN_DIR/pfile/spfile${ORA_SID}.ora $ORA_HOME/
dbs/spfile${ORA_SID}.ora >> $TRACE 2>&1
else
echo "INFO: Already a link for $ORA_HOME/dbs/
spfile${ORA_SID}.ora" >> $TRACE
fi
return 0
}