ITPub博客

首页 > 数据库 > Oracle > Linux下Oracle开机启动的设置

Linux下Oracle开机启动的设置

原创 Oracle 作者:kgdaniw 时间:2015-01-05 23:30:12 0 删除 编辑

大家都知道,在Windows上安装了Oracle数据库之后,是会随着系统的启动而自动启动的,但在Linux上却不是

在安装完成后直接使用dbstart会提示

ORACLE_HOME_LISTNER is not SET, unable to auto-start Oracle Net Listener

Usage: /u01/app/oracle/product/11.2.0/db_home1/bin/dbstart ORACLE_HOME

Processing Database instance "our": log file /u01/app/oracle/product/11.2.0/db_home1/startup.log


去编辑这两个命令
vim /u01/app/oracle/product/11.2.0/db_home1/bin/dbstart
vim /u01/app/oracle/product/11.2.0/db_home1/bin/dbshut
将里面的ORACLE_HOME_LISTNER的值从$1换成$ORACLE_HOME

然后再执行就没有问题了

下面打开Oracle的开机允许启动实例的开关
vim /etc/oratab
将
our:/u01/app/oracle/product/11.2.0/db_home1:N最后的N修改为Y

然后到rc.local添加启动命令

vim /etc/rc.local
添加两条分别启动监听和数据库实例
su - oracle -lc "/u01/app/oracle/product/11.2.0/db_home1/bin/lsnrctl start"
su - oracle -lc /u01/app/oracle/product/11.2.0/db_home1/bin/dbstart

然后init 6重启系统测试成功!(生产环境的话推荐先一致关闭数据库)

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/16287480/viewspace-1391440/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: 没有了~
下一篇: 没有了~
请登录后发表评论 登录
全部评论

注册时间:2015-01-05

  • 博文量
    1
  • 访问量
    7717