HACMP启停Oracle 两个常用脚本

# cat ora_stop.sh




/usr/jakarta-tomcat-5.0.30/bin/shutdown.sh


sleep 5






#stop ORACLE


su - oracle -c '/oracle/product/10.2.0/db_1/bin/sqlplus /nolog' << EOF >/dev/null
connect / as sysdba
shutdown immediate
EOF
su - oracle -c '/oracle/product/10.2.0/db_1/bin/lsnrctl stop '>/dev/null
banner db stoped OK!


#change Host Name Alias


#cp /etc/hosts.card1 /etc/hosts






# cat ora_start.sh
#change Host IP Alias Name


#cp /etc/hosts.card1_svc  /etc/hosts




#start ORACLE
su - oracle -c '/oracle/product/10.2.0/db_1/bin/sqlplus /nolog'</dev/null
connect / as sysdba
startup
EOF
su - oracle -c '/oracle/product/10.2.0/db_1/bin/lsnrctl start '>/dev/null
banner db start ok!


sleep 5




sh /usr/jakarta-tomcat-5.0.30/bin/startup.sh


你可能感兴趣的:(Storage)