liuhongyu 发表于 2018-9-12 10:00:24

oracle开机自动启动

  1.安装好Oracle数据库后: 执行 dbstart和dbshut会提示:
  $ dbstart
  ORACLE_HOME_LISTNER is not SET, unable to auto-start Oracle Net Listener
  Usage: /u01/app/oracle/oracle/product/10.2.0/db_1/bin/dbstart ORACLE_HOME
  错误原因是:dbstart和dbshut脚本文件中ORACLE_HOME_LISTNER的设置有问题,分别打开两个文件找到:ORACLE_HOME_LISTNER=$1,修改为
  ORACLE_HOME_LISTNER=$ORACLE_HOME,命令如下:
  $ vi $ORACLE_HOME/bin/dbstart
  $ vi $ORACLE_HOME/bin/dbshut
  修改后保存退出,第一个问题已解决;
  2.如何在Linux启动时自动启动Oracle监听和实例
  首先要解决上面的问题,才能继续哟!
  第一步:修改/etc/oratab文件,命令如下:
  $ vi /etc/oratab
  找到:accp:/u01/oracle:N   修改为: accp:/u01/oracle:Y
  第二步:把lsnrctl start和dbstart添加到rc.local文件中,命令如下:
  $ vi /etc/rc.d/rc.local
  添加:
  su oracle -lc "/u01/oracle/bin/lsnrctl start"
  su oracle -lc/u01/oracle/bin/dbstart
  注意:第一个命令有空格,所以要用引号的
  重启试试吧!

页: [1]
查看完整版本: oracle开机自动启动