欢迎进入oracle社区论坛,与200万技术人员互动交流 >>进入
将oracle加载为linux标准系统服务脚本
[root@test11 root]# more /etc/init.d/oracle
#!/bin/sh
#chkconfig: 2345 80 05
#description: oracle 8 server
ora_home=/oracle/product/9.2.0
ora_owner=oracle
case in
start)
su - $ora_owner -c $ora_home/bin/lsnrctl start
su - $ora_owner -c $ora_home/bin/start.sh
;;
stop)
su - $ora_owner -c $ora_home/bin/lsnrctl stop
su - $ora_owner -c $ora_home/bin/shutdown.sh
;;
esac
[root@test11 root]# more /oracle/product/9.2.0/bin/start.sh
sqlplus /nolog connect / as sysdba
startup
exit
exit
echo oracle have started
[root@test11 root]# more /oracle/product/9.2.0/bin/shutdown.sh
sqlplus /nolog connect / as sysdba
shutdown immediate
exit
exit
echo oracle have shutdown
#chkconfig --add oracle