Home  >  Article  >  Database  >  将oracle加载为linux标准系统服务脚本

将oracle加载为linux标准系统服务脚本

WBOY
WBOYOriginal
2016-06-07 15:18:141045browse

欢迎进入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社区论坛,与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

 

将oracle加载为linux标准系统服务脚本

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn