关于oracle 11gR2的restart特性,早就听说了,但一直没有亲身体验过,
今天简单的进行了相关的测试,在部署环境过程中遇到个小问题,安装过
程中执行root.sh报错,如下:复制
[root@11gR2test ~]# /home/ora11g/product/11.2/grid/root.sh
Running Oracle 11g root script...
The following environment variables are set as:
ORACLE_OWNER= ora11g
ORACLE_HOME= /home/ora11g/product/11.2/grid
Enter the full pathname of the local bin directory: [/usr/local/bin]:
The contents of "dbhome" have not changed. No need to overwrite.
The contents of "oraenv" have not changed. No need to overwrite.
The contents of "coraenv" have not changed. No need to overwrite.
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root script.
Now product-specific root actions will be performed.
Using configuration parameter file: /home/ora11g/product/11.2/grid/crs/install/crsconfig_params
Creating trace directory
LOCAL ADD MODE
Creating OCR keys for user 'ora11g', privgrp 'oinstall'..
Operation successful.
LOCAL ONLY MODE
Successfully accumulated necessary OCR keys.
Creating OCR keys for user 'root', privgrp 'root'..
Operation successful.
CRS-4664: Node 11gr2test successfully pinned.
Adding daemon to inittab
ohasd failed to start
Failed to start the Clusterware. Last 20 lines of the alert log follow:
2011-10-08 22:24:52.838
[client(7511)]CRS-2101:The OLR was formatted using version 3.
2011-10-08 22:24:54.073
[client(7532)]CRS-1001:The OCR was formatted using version 3.
[client(7574)]CRS-10001:CRS-6021: No msg for has:crs-6021 [l][unlimited]
[client(7575)]CRS-10001:CRS-6021: No msg for has:crs-6021 [n][65536]
ohasd failed to start at /home/ora11g/product/11.2/grid/crs/install/roothas.pl line 325.
/home/ora11g/product/11.2/grid/perl/bin/perl -I/home/ora11g/product/11.2/grid/perl/lib -I/home/ora11g/product/11.2/grid/crs/install /home/ora11g/product/11.2/grid/crs/install/roothas.pl execution failed
复制
关于该问题类类似文件,大家可以参考如下两个MOS文档:
OHASD Failed to Start: Inappropriate ioctl for device [ID 1069182.1]
Troubleshooting 11.2 Grid Infastructure Installation Root.sh Issues [ID 1053970.1]
How to Proceed from Failed 11gR2 Grid Infrastructure (CRS) Installation [ID 942166.1]
特别是第3个文档,十分有用,主要是一个root.sh执行失败以后如何重跑的东西。
环境搞好以后,如下:复制
[ora11g@localhost database]$ cd /home/ora11g/11.2/grid/bin
[ora11g@localhost bin]$ ./crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora....ER.lsnr ora....er.type ONLINE ONLINE localhost
ora.cssd ora.cssd.type ONLINE ONLINE localhost
ora.diskmon ora....on.type ONLINE ONLINE localhost
ora.evmd ora.evm.type ONLINE ONLINE localhost
ora.ons ora.ons.type OFFLINE OFFLINE
ora.roger.db ora....se.type ONLINE ONLINE localhost
[ora11g@localhost database]$ srvctl config database -d roger
Database unique name: roger
Database name: roger
Oracle home: /home/ora11g/product/11.2/db
Oracle user: ora11g
Spfile:
Domain:
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Disk Groups:
Services:
[ora11g@localhost database]$ srvctl status database -d roger
Database is running.
====== 下面测试一下restart功能是否好使 ======
[ora11g@localhost bin]$ ps -ef|grep tns
ora11g 10174 1 0 00:31 ? 00:00:00 /home/ora11g/11.2/grid/bin/tnslsnr LISTENER -inherit
ora11g 27750 4783 0 02:30 pts/1 00:00:00 grep tns
[ora11g@localhost bin]$ kill -9 10174
[ora11g@localhost bin]$ ps -ef|grep tns
ora11g 27753 4783 0 02:31 pts/1 00:00:00 grep tns
[ora11g@localhost bin]$ ps -ef|grep tns
ora11g 27766 4783 0 02:31 pts/1 00:00:00 grep tns
[ora11g@localhost bin]$ ps -ef|grep tns
ora11g 27768 4783 0 02:31 pts/1 00:00:00 grep tns
[ora11g@localhost bin]$ ps -ef|grep tns
ora11g 27770 4783 0 02:31 pts/1 00:00:00 grep tns
[ora11g@localhost bin]$ ps -ef|grep tns
ora11g 27772 4783 0 02:31 pts/1 00:00:00 grep tns
[ora11g@localhost bin]$ ps -ef|grep tns
ora11g 27774 4783 0 02:31 pts/1 00:00:00 grep tns
[ora11g@localhost bin]$ ./crs_stat -t
Name Type Target State Host
------------------------------------------------------------
ora....ER.lsnr ora....er.type ONLINE ONLINE localhost
ora.cssd ora.cssd.type ONLINE ONLINE localhost
ora.diskmon ora....on.type ONLINE ONLINE localhost
ora.evmd ora.evm.type ONLINE ONLINE localhost
ora.ons ora.ons.type OFFLINE OFFLINE
ora.roger.db ora....se.type ONLINE ONLINE localhost
[ora11g@localhost bin]$ ps -ef|grep tns
ora11g 27887 4783 0 02:31 pts/1 00:00:00 grep tns
[ora11g@localhost bin]$ ps -ef|grep tns
ora11g 27890 4783 0 02:31 pts/1 00:00:00 grep tns
[ora11g@localhost bin]$ ps -ef|grep tns
ora11g 27900 1 0 02:31 ? 00:00:00 /home/ora11g/11.2/grid/bin/tnslsnr LISTENER -inherit
复制
我们发现listener自动重起了,关于这里测试的过程中,listener restart的具体时间间隔?
比如说,oracle它如何知道listener已经停掉了?当检测到listener停掉以后,在多少时间内
去restart listener?
关于这个小问题,我们可以同listener的profile信息得到答案:复制
[ora11g@localhost bin]$ ./crs_stat -p ora.LISTENER.lsnr
NAME=ora.LISTENER.lsnr
TYPE=ora.listener.type
ACTION_SCRIPT=
AUTO_START=restore
CHECK_INTERVAL=60
DESCRIPTION=CRS resource type for the Listener
RESTART_ATTEMPTS=5
SCRIPT_TIMEOUT=60
START_TIMEOUT=180
STOP_TIMEOUT=0
UPTIME_THRESHOLD=1d
复制
我们可以看到是60s检测一下,检测到之后立即重启,如果启动失败,会在180s内再次进行restart。
复制
「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。
评论
相关阅读
Oracle RAC 一键安装翻车?手把手教你如何排错!
Lucifer三思而后行
603次阅读
2025-04-15 17:24:06
【纯干货】Oracle 19C RU 19.27 发布,如何快速升级和安装?
Lucifer三思而后行
593次阅读
2025-04-18 14:18:38
XTTS跨版本迁移升级方案(11g to 19c RAC for Linux)
zwtian
498次阅读
2025-04-08 09:12:48
Oracle数据库一键巡检并生成HTML结果,免费脚本速来下载!
陈举超
481次阅读
2025-04-20 10:07:02
【ORACLE】记录一些ORACLE的merge into语句的BUG
DarkAthena
464次阅读
2025-04-22 00:20:37
Oracle 19c RAC更换IP实战,运维必看!
szrsu
440次阅读
2025-04-08 23:57:08
【ORACLE】你以为的真的是你以为的么?--ORA-38104: Columns referenced in the ON Clause cannot be updated
DarkAthena
438次阅读
2025-04-22 00:13:51
【活动】分享你的压箱底干货文档,三篇解锁进阶奖励!
墨天轮编辑部
429次阅读
2025-04-17 17:02:24
火焰图--分析复杂SQL执行计划的利器
听见风的声音
372次阅读
2025-04-17 09:30:30
3月“墨力原创作者计划”获奖名单公布
墨天轮编辑部
361次阅读
2025-04-15 14:48:05
TA的专栏
Roger's Database Notes
收录77篇内容