asm的开机自启动问题--总结--供参考
2012-04-06 16:33
344 查看
通过dbstart脚本可以在Linux和Unix下设置oracle数据库是否自动启动,但是使用前需要进行一些设置.
下面是一些设置的步骤:
1、修改$ORACLE_HOME/bin下的dbstart文件,约78行,修改为
ORACLE_HOME_LISTNER=$ORACLE_HOME
2、修改/etc/oratab文件,注意在rac环境下有可能实例名并不正确,需要修改为正确的实例名(格式为:$ORACLE_SID:$ORACLE_HOME:Y/N)
+ASM1:/u/oracle/product/10.2.0/db_1:Y
orcl1:/u/oracle/product/10.2.0/db_1:Y
3修改/etc/rc.local加入
su - oracle -c 'dbstart'
4、这样就可以运行dbstart启动数据库和监听了,并可以通过$ORACLE_HOME/startup.log查看是不是有问题
[oracle@rac1 ~]$ dbstart
Processing ASM instance "+ASM1": log file /home/oracle/product/10.2.0/db_1/startup.log
Processing Database instance "orcl1": log file /home/oracle/product/10.2.0/db_1/startup.log
下面内容如果安装asm库时候未进行,请按顺序执行
添加init 文件使系统启动时自动加载ASMLib
$ su –
# cd /etc/rc3.d
# ln -s ../init.d/oracleasm S99oracleasm
# ln -s ../init.d/oracleasm K01oracleasm
注意:如果系统启动是自动进入图形界面,也就是系统的init level 是5,那么上面生成链
接的命令应该在/etc/rc5.d 目录中操作。
重新启动系统,确认ASMLib 已经可以自动加载
以上内容完成后重启系统。如果在linux as 4上可能遇到以下错误(纠缠偶好久才解决),css服务未就绪导致asm无法启动.日志内容如下
Failure 1 contacting CSS daemon
logger: Waiting for Oracle CSS service to be available before starting
logger: ASM instance +ASM. Wait 1.
Failure 1 contacting CSS daemon
这是一个bug,解决方法如下
编辑/etc/inittab
在行l2,l3之间加入如下内容(一定要在l3之前),修改后如:
l2:2:wait:/etc/rc.d/rc 2
h1:35:respawn:/etc/init.d/init.cssd run >/dev/null 2>&1 </dev/null
l3:3:wait:/etc/rc.d/rc 3
参考自http://www.jroller.com/agileanswers/
原文内容:
Autostart Oracle on RHEL with ASM support
After carefully crafting an init.d startup/shutdown script for my Oracle 10g installation on RHEL, I was able to successfully use it from the command line while shelled in as root. However, Oracle stubbornly refused to automatically start at boot time when invoked via init.
A look at the boot logs made it clear that the culprit was a race-condition with the cssd process. While attempting to start ASM, Oracle was throwing the following in /opt/oracle/product/10.2.0/db_1/startup.log:
logger: Waiting for Oracle CSS service to be available before starting
logger: ASM instance +ASM. Wait 14.
Failure 1 contacting CSS daemon
logger: Timed out waiting to start ASM instance +ASM
logger: CSS service is NOT available.
Despite knowing the problem, I wasn't able to find a solution until I came across Jeff Hunter's Oracle blog. In it, he correctly noted that due to a known bug, the /etc/inittab file must be manually modified to support Oracle ASM auto-start on RHEL.
Specifically, the respawn line for the init.cssd process must fall between the wait for runlevel 2 and runlevel 3
l2:2:wait:/etc/rc.d/rc 2
h1:35:respawn:/etc/init.d/init.cssd run >/dev/null 2>&1 </dev/null
l3:3:wait:/etc/rc.d/rc 3
After making this change, Oracle properly auto-starts at boot and all is well with the world.
下面是一些设置的步骤:
1、修改$ORACLE_HOME/bin下的dbstart文件,约78行,修改为
ORACLE_HOME_LISTNER=$ORACLE_HOME
2、修改/etc/oratab文件,注意在rac环境下有可能实例名并不正确,需要修改为正确的实例名(格式为:$ORACLE_SID:$ORACLE_HOME:Y/N)
+ASM1:/u/oracle/product/10.2.0/db_1:Y
orcl1:/u/oracle/product/10.2.0/db_1:Y
3修改/etc/rc.local加入
su - oracle -c 'dbstart'
4、这样就可以运行dbstart启动数据库和监听了,并可以通过$ORACLE_HOME/startup.log查看是不是有问题
[oracle@rac1 ~]$ dbstart
Processing ASM instance "+ASM1": log file /home/oracle/product/10.2.0/db_1/startup.log
Processing Database instance "orcl1": log file /home/oracle/product/10.2.0/db_1/startup.log
下面内容如果安装asm库时候未进行,请按顺序执行
添加init 文件使系统启动时自动加载ASMLib
$ su –
# cd /etc/rc3.d
# ln -s ../init.d/oracleasm S99oracleasm
# ln -s ../init.d/oracleasm K01oracleasm
注意:如果系统启动是自动进入图形界面,也就是系统的init level 是5,那么上面生成链
接的命令应该在/etc/rc5.d 目录中操作。
重新启动系统,确认ASMLib 已经可以自动加载
以上内容完成后重启系统。如果在linux as 4上可能遇到以下错误(纠缠偶好久才解决),css服务未就绪导致asm无法启动.日志内容如下
Failure 1 contacting CSS daemon
logger: Waiting for Oracle CSS service to be available before starting
logger: ASM instance +ASM. Wait 1.
Failure 1 contacting CSS daemon
这是一个bug,解决方法如下
编辑/etc/inittab
在行l2,l3之间加入如下内容(一定要在l3之前),修改后如:
l2:2:wait:/etc/rc.d/rc 2
h1:35:respawn:/etc/init.d/init.cssd run >/dev/null 2>&1 </dev/null
l3:3:wait:/etc/rc.d/rc 3
参考自http://www.jroller.com/agileanswers/
原文内容:
Autostart Oracle on RHEL with ASM support
After carefully crafting an init.d startup/shutdown script for my Oracle 10g installation on RHEL, I was able to successfully use it from the command line while shelled in as root. However, Oracle stubbornly refused to automatically start at boot time when invoked via init.
A look at the boot logs made it clear that the culprit was a race-condition with the cssd process. While attempting to start ASM, Oracle was throwing the following in /opt/oracle/product/10.2.0/db_1/startup.log:
logger: Waiting for Oracle CSS service to be available before starting
logger: ASM instance +ASM. Wait 14.
Failure 1 contacting CSS daemon
logger: Timed out waiting to start ASM instance +ASM
logger: CSS service is NOT available.
Despite knowing the problem, I wasn't able to find a solution until I came across Jeff Hunter's Oracle blog. In it, he correctly noted that due to a known bug, the /etc/inittab file must be manually modified to support Oracle ASM auto-start on RHEL.
Specifically, the respawn line for the init.cssd process must fall between the wait for runlevel 2 and runlevel 3
l2:2:wait:/etc/rc.d/rc 2
h1:35:respawn:/etc/init.d/init.cssd run >/dev/null 2>&1 </dev/null
l3:3:wait:/etc/rc.d/rc 3
After making this change, Oracle properly auto-starts at boot and all is well with the world.
相关文章推荐
- Centos下开机自启动node.js程序(问题及总结)
- [电脑问题]旧电脑CPU风扇不转,黑屏无法开机的解决思路以及电脑清理总结
- Linux开机自启动脚本的总结
- 【问题】tomcat开机自启动后项目无法加载数据
- 在cordova中处理原生键盘相关问题的总结,mark供参考
- Wince 6.0 开机自启动 总结
- VMware Workstation开机自启动的问题
- 【ROS总结】Turtlebot ROS 开机自启动设置
- Android实现开机自启动无效问题
- 开机40s黑屏问题解决总结
- scst target在设置开机自启动时所遇问题的原因及解决办法
- Android开机出现不能自启动Activity的问题
- 关于安卓手机开机自启动APP无法成功的问题
- Android实现开机自启动无效问题
- 【ROS总结】Turtlebot ROS 开机自启动设置(2)
- Android实现开机自启动无效问题
- Andriod中应用开机自启动的问题
- nginx已添加systemctl,但不能开机自启动问题
- AndroidTV版(乐视超3 X55)root,将自己的软件设置为开机自启、系统软件,卸载系统应用等问题总结
- Linux开机自启动总结