设为首页 加入收藏

TOP

Oracle 11g在Linux系统下开机自启动设置
2015-11-12 21:29:15 来源: 作者: 【 】 浏览:6
Tags:Oracle 11g Linux 系统 开机 启动 设置

[root@localhost ~]# vim /etc/rc.local
touch /var/lock/subsys/local
su - oracle < lsnrctl start
sqlplus / as sysdba
startup
quit
EOF
su - oracle < export ORACLE_SID=pddev1
sqlplus / as sysdba
startup
quit
EOF


2,redhat操作系统下面,用dbstart的方式
2.1,测试
[oracle@localhost ~]$ /oracle/app/oracle/product/11.2.0/dbhome_1/bin/dbstart
ORACLE_HOME_LISTNER is not SET, unable to auto-start Oracle Net Listener
Usage: /oracle/app/oracle/product/11.2.0/dbhome_1/bin/dbstart ORACLE_HOME
[oracle@localhost ~]$
有报错信息,提示ORACLE_HOME不识别,如下解决方案,修改dbstart和dbstut,有的版本dbstut找不到不存在,可以忽略。
vim /oracle/app/oracle/product/11.2.0/dbhome_1/bin/dbstart
vim /oracle/app/oracle/product/11.2.0/dbhome_1/bin/dbstut



ORACLE_HOME_LISTNER =$1


改成
ORACLE_HOME_LISTNER=$ORACLE_HOME


2.2,[root@localhost ~]# vim /etc/oratab
powerdes:/oracle/app/oracle/product/11.2.0/dbhome_1:Y


2.3 在rc.local里面设置开机自启动
[root@localhost bin]# vim /etc/rc.local


#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.
touch /var/lock/subsys/local
su - oracle -lc "/oracle/app/oracle/product/11.2.0/dbhome_1/bin/lsnrctl start"
su - oracle -c "/oracle/app/oracle/product/11.2.0/dbhome_1/bin/dbstart"db"


服务器重启生效。


】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇DBCA出错:ORA-19809: limit exce.. 下一篇Oracle表空间过大时候的处理

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容: