一、oracle文件 由redhat cluster软件调用
#!/bin/bash
#
# Cluster service script to start/stop oracle
#
cd /home/oracle
. /etc/rc.d/init.d/functions
case $1 in
start)
su - oracle -c "./dbstart"
;;
stop)
su - oracle -c "./dbshut"
;;
restart)
su - oracle -c "./dbshut"
su - oracle -c "./dbstart"
;;
status)
status oracle(或者 用自己写的状态检测脚本也行)
;;
esac
dbstart:
#!/bin/bash
#su - oracle<< EOF
#. ~/.profile
sqlplus /nolog<
startup
!lsnrctl start
exit
EOF
exit 0
dbshut:
#!/bin/bash
#su - oracle <
!lsnrctl stop
shutdown immediate
quit
EOF
exit 0