background image
<< Oracle Configuration | The Remote Site >>
<< Oracle Configuration | The Remote Site >>

Verify the database is online

Oracle on the Linux OS Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
D-12
Remote Mirroring of an Oracle Database Using Data Replicator Software
Verify that the Database Is Online on the Remote
Site
#!/bin/ksh
#-----------------------------------------------------------
# Verify the database is online
#-----------------------------------------------------------
PRI_DB_ID=$1
ORACLE_SID=$2
TRACE=$3
export PRI_DB_ID
export ORACLE_SID
export TRACE
UP=`ps -afe | grep -w ${PRI_DB_ID} | grep -w
ora_pmon_${ORACLE_SID} | grep -v grep`
if [ "${UP}" = "" ]
then
exit 1
fi
exit 0
Verify that the Database Is Offline on the Remote
Site
#!/bin/ksh
#-----------------------------------------------------------
# Verify the database is offline
#-----------------------------------------------------------
PRI_DB_ID=$1
ORACLE_SID=$2
TRACE=$3
export PRI_DB_ID
export ORACLE_SID
export TRACE
UP=`ps -afe | grep -w ${PRI_DB_ID} | grep -w
ora_pmon_${ORACLE_SID} | grep -v grep`
if [ "${UP}" = "" ]
then
exit 0
fi
exit 1