rac数据库下oracle打小补丁,Oracle 11g RAC自动打GI PSU补丁(29255947)

打补丁过程

1)下载补丁并上传,解压

2)停止应用和服务

3)生产环境一定要备份(停止数据库与集群、备份安装代码、备份数据库)

4)安装补丁工具OPATCH

5)在线打补丁(把数据库停止、集群一定要打开)

6)验证补丁

7)启动应用测试

Oracle 11g RAC自动打GI PSU补丁(29255947)

打补丁(11.2.0.3.21,可以参考补丁p29255947_112040_Linux-x86-64.zip 中的reamme.html文件,文件中详细介绍了如何打补丁,以下为概要本实验的简单记录。

1、 下载补丁并上传至所有集群节点

上传补丁p29255947_112040_Linux-x86-64.zip 到各节点/u01/sopt/psu目录,解压后赋权移至/u01/soft/psu目录中。

#unzip p29255947_112040_Linux-x86-64.zip

#chown –R grid:oinstall p29255947

2、升级OPatch工具(所有节点grid与oracle用户均需执行)

grid:

原GRID

grid@rac3:/u01/app/11.2.0/grid/OPatch> ./opatch version

OPatch Version: 11.2.0.3.4

OPatch succeeded.

替换GRID后

grid@rac3:/u01/app/11.2.0/grid/OPatch> cd /u01/app/11.2.0/grid/

grid@rac3:/u01/app/11.2.0/grid>mv OPatch OPatch.bak

grid@rac3:/u01/app/11.2.0/grid> unzip p6880880_112000_LINUX.zip

grid@rac3:/u01/app/11.2.0/grid> cdOPatch

grid@rac3:/u01/app/11.2.0/grid/OPatch>./opatch version

OPatch Version: 11.2.0.3.21

OPatch succeeded.

grid@rac3:/u01/app/11.2.0/grid/OPatch>

原ORACLE

Oracle:

oracle@rac3:~> cd/u01/app/oracle/product/11.2.0/dbhome_1/OPatch

oracle@rac3:/u01/app/oracle/product/11.2.0/dbhome_1/OPatch>./opatch version

OPatch Version: 11.2.0.3.4

OPatch succeeded.

替换ORACLE后

oracle@rac3:/u01/app/oracle/product/11.2.0/dbhome_1/OPatch>cd…

oracle@rac3:/u01/app/oracle/product/11.2.0/dbhome_1> mv OPatch OPatch.bak

oracle@rac3:/u01/app/oracle/product/11.2.0/dbhome_1>unzip p6880880_112000_LINUX.zip

oracle@rac3:/u01/app/oracle/product/11.2.0/dbhome_1> cd OPatch

oracle@rac3:~> cd/u01/app/oracle/product/11.2.0/dbhome_1/OPatch

oracle@rac3:/u01/app/oracle/product/11.2.0/dbhome_1/OPatch>./opatch version

OPatch Version: 11.2.0.3.21

OPatch succeeded.

3、创建OCM文件(所有节点均需执行)

rac3节点

[grid@rac3 psu]$/u01/app/11.2.0/grid/OPatch/ocm/bin/emocmrsp

Provide your email address to be informedof security issues, install and

initiate Oracle Configuration Manager.Easier for you if you use your My

Oracle Support Email address/User Name.

Visithttp://www.oracle.com/support/policies.html for details.

Email address/User Name:

You have not provided an email address fornotification of security issues.

Do you wish to remain uninformed ofsecurity issues ([Y]es, [N]o) [N]: y

The OCM configuration response file(/tmp/ocm.rsp) was successfully created.

grid@rac3:/u01/app/11.2.0/grid/OPatch/ocm/bin>

rac4节点

[grid@rac4 psu]$/u01/app/11.2.0/grid/OPatch/ocm/bin/emocmrsp

Provide your email address to be informedof security issues, install and

initiate Oracle Configuration Manager.Easier for you if you use your My

Oracle Support Email address/User Name.

Visithttp://www.oracle.com/support/policies.html for details.

Email address/User Name:

You have not provided an email address fornotification of security issues.

Do you wish to remain uninformed ofsecurity issues ([Y]es, [N]o) [N]: y

The OCM configuration response file(/tmp/ocm.rsp) was successfully created.

grid@rac4:/u01/app/11.2.0/grid/OPatch/ocm/bin>

4、OPatch apply(所有节点均需执行)(无需关闭任何组件及资源)

su - root(用户)每个节点手动打补丁

rac3

[root@rac3 psu]# /u01/app/11.2.0/grid/OPatch/opatch auto /u01/soft/psu/29255947 -ocmrf /u01/soft/psu/ocm.rsp

rac4:

[root@rac4 psu]# /u01/app/11.2.0/grid/OPatch/opatch auto /u01/soft/psu/29255947 -ocmrf /u01/soft/psu/ocm.rsp

补丁安装完毕之后,查看集群资源状态

su - grid

crsctl stat res -t

备注:1、根据输出结果可以观察到打补丁的顺序为:关闭RAC–>补丁RAC -->关闭CRS -->补丁CRS -->启动CRS–>启动RAC

2、ACFS driver install actions failed,该报错查看日志显示为CRS-10001:20-Jan-1613:31 ACFS-9109: oracleacfs.ko driver failed to load.当初安装grid执行root.sh时也有过同样的报错,打过补丁p17475946_112040_Linux-x86-64.zip之后可以正常执行root.sh(参考该链接处理suse11sp3 执行root.sh失败bug处理)。现在不知道为什么打完补丁之后还会有同样的问题。

3、集群资源中该资源为offline,是因为oracleacfs.kodriver failed to load加载失败导致。重启动各节点资源将恢复正常。

5、加载修改SQL文件到数据库修改数据字典

在RAC环境中仅需在一个节点执行以下SQL。

(1)

cd $ORACLE_HOME/rdbms/admin

SQL> @catbundle.sql psu apply

SQL> QUIT

The catbundle.sql execution is reflected inthe dba_registry_history view by a row associated with bundle series PSU.

(2)

If the OJVM PSU was applied for a previousGI PSU patch, you may see invalid Java classes after execution of the catbundle.sqlscript in the previous step. If this is the case, run utlrp.sql to re-validatethese Java classes.

cd $ORACLE_HOME/rdbms/admin

SQL> @utlrp.sql

6、检查DB补丁版本

SQL> select * from dba_registry_history;

SQL>

7、单机版升级

停数据库、停监听

[oracle@db1 29141056]$ /u01/app/oracle/product/11.2.0/dbhome_1/OPatch/opatch apply

[oracle@db1 29141056]$ sqlplus / as sysdba

SQL > startup

cd $ORACLE_HOME/rdbms/admin

sqlplus /nolog

SQL> CONNECT / AS SYSDBA

SQL> STARTUP

SQL> @catbundle.sql psu apply

SQL> QUIT

cd $ORACLE_HOME/rdbms/admin

sqlplus /nolog

SQL> CONNECT / AS SYSDBA

SQL> @utlrp.sql

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值