Search This Blog

Wednesday, December 21, 2011

stop script (RAC and ASM)

export ORAENV_ASK=NO
export ORACLE_SID=+ASM
. oraenv
echo " "
echo "listener status before stop"
echo " "
srvctl status listener
echo " "
echo "db status before stop"
echo " "
srvctl status database -d db1
srvctl status database -d db2
echo " "
echo "asm/diskgroup status before stop"
echo " "
srvctl status diskgroup -g DATA1_T3
srvctl status asm
echo " "
echo "Now stopping db"
#echo "Now stopping oracle_home= /ora01/app/oracle/product/11.2.0.2 using statefile /ora01/state_file/dbhome_state"
echo " "
#srvctl stop home -o /ora01/app/oracle/product/11.2.0.2 -s /ora01/state_file/dbhome_state
srvctl stop database -d db1
srvctl stop database -d db2
echo " "
echo "Status after stop..."
echo " "
#srvctl status home -o /ora01/app/oracle/product/11.2.0.2 -s /ora01/state_file/dbhome_state
srvctl status database -d db1
srvctl status database -d db2
echo " "
echo "Now stopping grid home components"
echo " "
rm /ora01/state_file/gridhome_state
srvctl stop home -o /ora01/GRID -s /ora01/state_file/gridhome_state
echo " "
echo "asm/diskgroup/listener status after stop"
echo " "
srvctl status diskgroup -g DATA1_T3
srvctl status asm
srvctl status listener
echo " "
echo "Now disabling and stopping has"
echo " "
echo "current has status"
echo " "
crsctl check has
#crsctl disable has
#crsctl stop has

No comments:

Post a Comment