ORACLE_SID.ora
Oracle on the AIX OS Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
B-62
Remote Mirroring of an Oracle Database Using Data Replicator Software
STATUS=$?
if (( STATUS > 0 )); then
echo "${B1}ERROR!${EB}"
echo " Could not move $MIRROR_PATH/$ORACLE_SID/pfile/
spfile${ORACLE_SID}.ora to"
echo " $ORACLE_HOME/dbs directory.
${B1}STATUS=$STATUS${EB}"
else
echo "${B2}OK${EB}"
fi
else
echo "${B3}WARNING: No spfile link exists at $ORACLE_HOME/
dbs/spfile${ORACLE_SID}.ora${EB} -- Skipping spfile"
fi
if [[ -L $ORACLE_HOME/admin/$ORACLE_SID ]]; then
echo "Moving $ORACLE_HOME/admin/$ORACLE_SID directory...\c"
rm $ORACLE_HOME/admin/$ORACLE_SID > /dev/null
mv $MIRROR_PATH/$ORACLE_SID $ORACLE_HOME/admin > /dev/null
STATUS=$?
if (( STATUS > 0 )); then
echo "${B1}ERROR!${EB}"
echo " Could not move $MIRROR_PATH/$ORACLE_SID to"
echo " $ORACLE_HOME/admin directory.
${B1}STATUS=$STATUS${EB}"
else
echo "${B2}OK${EB}"
fi
else
echo "${B1}ERROR: No link exists for $ORACLE_HOME/admin/
$ORACLE_SID${EB} -- Aborting script."
exit 1
fi
if (( $(ls -la $MIRROR_PATH | grep -c 'd') > 2 )); then
echo "\n${B3}WARNING${EB} Files or directories still exist
in $MIRROR_PATH."
echo "Directory will not be deleted."
else
rmdir $MIRROR_PATH > /dev/null 2>&1
fi
echo
ls -ld $ORACLE_HOME/admin/$ORACLE_SID | awk -F' ' '{print $1"
"$9}'
ls -ld $ORACLE_HOME/admin/$ORACLE_SID/* | awk -F' ' '{print $1"
"$9}'
ls -l $ORACLE_HOME/dbs/init$ORACLE_SID.ora | awk -F' ' '{print
$1" "$9}'