oracle中overwrite写法,【学习笔记】Oracle 11G新特性restart的深入研究案例

【学习笔记】Oracle 11G新特性restart的深入研究案例

时间:2016-11-26 22:35   来源:Oracle研究中心   作者:网络   点击:

天萃荷净

Oracle研究中心学习笔记:分享一篇关于Oracle数据库11GR2新特性的笔记,详细介绍oracle 11gR2的restart特性的研究案例。

本站文章除注明转载外,均为本站原创: 转载自love wife & love life —Roger 的Oracle技术博客

本文链接地址: oracle restart 体验

关于oracle 11gR2的restart特性,早就听说了,但一直没有亲身体验过,今天简单的进行了相关的测试,在部署环境过程中遇到个小问题,安装过程中执行root.sh报错,如下:

[root@11gR2test ~]# /home/ora11g/product/11.2/grid/root.sh

Running Oracle 11g root script...

The http://www.oracleplus.netfollowing 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。

--------------------------------------ORACLE-DBA----------------------------------------

最权威、专业的Oracle案例资源汇总之【学习笔记】Oracle 11G新特性restart的深入研究案例

9bd101509341196819122f36086c9a60.png

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值