ocr文件 oracle,Oracle Clusterware的起停和ocr.loc文件

Oracle的Clusterware起停可以通过crsctl [ start / stop ] crs来实现。其根本原理是通过ocr.loc文件找到OCR,通过OCR去启动依赖的服务。

发出stop crs命令:

bash-2.05# crsctl stop crs

Stopping resources. This could take several minutes.

Successfully stopped CRS resources.

Stopping CSSD.

Shutting down CSS daemon.

Shutdown request successfully issued.在主机系统日志中会记录停止过程:

Mar 29 22:08:43 db210-rac1 genunix: [ID 809163 kern.info] NOTICE: oracle, uid 101: setuid execution not allowed, dev=550000003c

Mar 29 22:08:45 db210-rac1 last message repeated 1 time

Mar 29 22:08:46 db210-rac1 root: [ID 702911 user.error] Oracle clsomon shutdown successful.

Mar 29 22:08:46 db210-rac1 root: [ID 702911 user.error] Oracle clsomon shutdown successful.

Mar 29 22:08:46 db210-rac1 root: [ID 702911 user.error] Oracle CSS family monitor shutting down gracefully.

Mar 29 22:08:46 db210-rac1 root: [ID 702911 user.error] Oracle CSS family monitor shutting down gracefully.

Mar 29 22:08:47 db210-rac1 root: [ID 702911 user.error] Oracle CSSD graceful shutdown

Mar 29 22:08:47 db210-rac1 root: [ID 702911 user.error] Oracle CSSD graceful shutdown

Mar 29 22:08:47 db210-rac1 root: [ID 702911 user.error] Oprocd received graceful shutdown request. Shutting down.

Mar 29 22:08:47 db210-rac1 root: [ID 702911 user.error] Oprocd received graceful shutdown request. Shutting down.此时如果移动ocr.loc文件,则CRS必然无法启动:

bash-2.05# pwd

/var/opt/oracle

bash-2.05# ls

ocr.loc      oprocd       oraInst.loc  oratab       scls_scr

bash-2.05# mv ocr.loc ocr.loc.o

bash-2.05#

bash-2.05# crsctl start crs

Attempting to start CRS stack

The CRS stack will be started shortly此时系统日志中会记录错误日志,提示依赖的资源无法启动:

Mar 29 22:10:17 db210-rac1 root: [ID 702911 user.error] Cluster Ready Services waiting on dependencies. Diagnostics in /tmp/crsctl.12678.

Mar 29 22:10:17 db210-rac1 root: [ID 702911 user.error] Cluster Ready Services waiting on dependencies. Diagnostics in /tmp/crsctl.12678.

Mar 29 22:10:17 db210-rac1 root: [ID 702911 user.error] Cluster Ready Services waiting on dependencies. Diagnostics in /tmp/crsctl.12763.

Mar 29 22:10:17 db210-rac1 root: [ID 702911 user.error] Cluster Ready Services waiting on dependencies. Diagnostics in /tmp/crsctl.12763.

Mar 29 22:10:18 db210-rac1 root: [ID 702911 user.error] Cluster Ready Services waiting on dependencies. Diagnostics in /tmp/crsctl.12813.

Mar 29 22:10:18 db210-rac1 root: [ID 702911 user.error] Cluster Ready Services waiting on dependencies. Diagnostics in /tmp/crsctl.12813.临时文件记录无法找到OCR文件:

bash-2.05# cat /tmp/crsctl.12813

Failure 33 in main OCR context initialization: PROC-33: Oracle Cluster Registry is not configured Operating System error [No such file or directory] [2]修正ocr.loc文件,则crs可以正常启动:

bash-2.05# ls

ocr.loc.o    oprocd       oraInst.loc  oratab       scls_scr

bash-2.05# mv ocr.loc.o ocr.loc

bash-2.05# crsctl start crs

Attempting to start CRS stack

The CRS stack will be started shortly正常启动的系统日志信息如下:

Mar 29 22:13:19 db210-rac1 root: [ID 702911 user.error] Cluster Ready Services completed waiting on dependencies.

Mar 29 22:13:19 db210-rac1 root: [ID 702911 user.error] Cluster Ready Services completed waiting on dependencies.

Mar 29 22:13:20 db210-rac1 last message repeated 1 time

Mar 29 22:13:20 db210-rac1 root: [ID 702911 user.error] Running CRSD with TZ = PRC

Mar 29 22:13:20 db210-rac1 last message repeated 1 time

Mar 29 22:13:20 db210-rac1 root: [ID 702911 user.error] Running CRSD with TZ = PRC

Mar 29 22:13:20 db210-rac1 root: [ID 702911 user.error] Cluster Ready Services completed waiting on dependencies.

Mar 29 22:13:20 db210-rac1 root: [ID 702911 user.error] Cluster Ready Services completed waiting on dependencies.

Mar 29 22:13:20 db210-rac1 root: [ID 702911 user.error] Oracle CSS Family monitor starting.

Mar 29 22:13:20 db210-rac1 root: [ID 702911 user.error] Oracle CSS Family monitor starting.

Mar 29 22:13:21 db210-rac1 root: [ID 702911 user.error] Oracle CSS restart. 0, 1

Mar 29 22:13:21 db210-rac1 root: [ID 702911 user.error] Oracle CSS restart. 0, 1

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值