你好,游客 登录 注册 搜索
背景:
阅读新闻

Linux/Unix 中如何配置 Oracle Database 随服务器自动启动

[日期:2013-03-28] 来源:CSDN  作者:xiangsir [字体:大 中 小]

3: 以 root 用户身份执行如下命令:
 
[root@prod init.d]# cd /sbin
 [root@prod sbin]# chkconfig --add dbora
 --此命令将创建如下系统服务
 [root@prod sbin]# chkconfig --list | grep dbora
 dbora          0:off  1:off  2:on    3:on    4:on    5:on    6:off 

--此外,还会创建如下文件
 /etc/rc2.d/S99dbora ( calls $Oracle_HOME/bin/dbstart )
 /etc/rc3.d/S99dbora ( calls $ORACLE_HOME/bin/dbstart )
 /etc/rc4.d/S99dbora ( calls $ORACLE_HOME/bin/dbstart )
 /etc/rc5.d/S99dbora ( calls $ORACLE_HOME/bin/dbstart )
 
/etc/rc0.d/K10dbora ( calls $ORACLE_HOME/bin/dbshut )
 /etc/rc1.d/K10dbora ( calls $ORACLE_HOME/bin/dbshut )
 /etc/rc6.d/K10dbora ( calls $ORACLE_HOME/bin/dbshut )
 
lrwxrwxrwx 1 root root 15 Mar 27 20:12 /etc/rc2.d/S99dbora -> ../init.d/dbora
 [root@prod rc2.d]# ls -l /etc/rc3.d/S99dbora
 lrwxrwxrwx 1 root root 15 Mar 27 20:12 /etc/rc3.d/S99dbora -> ../init.d/dbora
 [root@prod rc2.d]# ls -l /etc/rc4.d/S99dbora
 lrwxrwxrwx 1 root root 15 Mar 27 20:12 /etc/rc4.d/S99dbora -> ../init.d/dbora
 [root@prod rc2.d]# ls -l /etc/rc5.d/S99dbora
 lrwxrwxrwx 1 root root 15 Mar 27 20:12 /etc/rc5.d/S99dbora -> ../init.d/dbora
 [root@prod rc2.d]# ls -l /etc/rc0.d/K10dbora
 lrwxrwxrwx 1 root root 15 Mar 27 20:12 /etc/rc0.d/K10dbora -> ../init.d/dbora
 [root@prod rc2.d]# ls -l /etc/rc1.d/K10dbora
 lrwxrwxrwx 1 root root 15 Mar 27 20:12 /etc/rc1.d/K10dbora -> ../init.d/dbora
 [root@prod rc2.d]# ls -l /etc/rc6.d/K10dbora
 lrwxrwxrwx 1 root root 15 Mar 27 20:12 /etc/rc6.d/K10dbora -> ../init.d/dbora 

init.d 脚本中 " # chkconfig: 2345 99 10 ":表示该系统服务 start 的运行级别为 2、3、4 和 5
 ,stop 运行级别为 0、1 和 6,start 优先级为 99 ,stop 优先级为 10。 

4、重启 unix 服务器,并验证数据库是否自动启动

转载请注明作者出处及原文链接:http://blog.csdn.net/xiangsir/article/details/8728326

更多Oracle相关信息见Oracle 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=12

linux
相关资讯       Oracle Database  Oracle自动启动 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款