11.2.0.4双节点RAC打PSU 170814 步骤

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。

本文链接:https://blog.csdn.net/liupf0217/article/details/78351987

 (本文原创,转载请注明出处。)

一、首先应根据README文件里的要求下载相应的OPatch包,然后进行解压安装。

步骤:

         (1)    备份oracle和grid用户的 $ORACLE_HOME/OPatch

         (2)    删除oracle和grid用户的  $ORACLE_HOME/OPatch

         (3)    将下载的OPATCH软件解压到oracle和grid的 ORACLE_HOMe

                   unzip<OPATCH-ZIP> -d <ORACLE_HOME>

         (4)    检查OPatch版本。

     $ <ORACLE_HOME>/OPatch/opatch lsinventory -detail -oh <ORACLE_HOME>

此次打补丁要求的OPatch版本为11.2.0.3.6 or later,本机安装版本为11.2.0.3.17,如图:

二检查grid ,oracle家目录下安装产品的一致性:

$ $ORACLE_HOME/OPatch/opatchlsinventory -detail -oh $ORACLE_HOME…….

OPatch succeeded.

显示OPatchsucceeded为成功。若失败应联系oracle支持解决。

三停止EM代理(打补丁和回滚前)oracle用户执行。

$ $ORACLE_HOME/bin/emctl stop dbconsole

(以上一、二、三需在每个节点上都执行)

四关闭集群和数据库服务。(说明$GI_HOME(<GI_HOME>)代表grid用户下的$ORACLE_HOME)

oracle用户:

                  srvctl stop database -d racdb

                  srvctl status database -d  racdb

节点1和2 root run:

                  $GI_HOME/bin/crsctl stop crs

                  $GI_HOME /bin/crsctl stop crs

备份ORACLE和crs:

         tar-zcvf  oracle2017.tar.gz $ORACLE_HOME/*

         tar-zcvf  grid2017.tar.gz $GI_HOME /*

         tar-zcvf  oracle2017.tar.gz  /u01/app/oraInventory/*

        

五 解锁 grid家目录,root用户执行:

                 #<GI_HOME>/crs/install/rootcrs.pl -unlock

六 应用PSU 

Table 3 PatchNumbers Getting Installed as Part of this GI PSU Patch

 

Patch Number

Description

Applicable Homes

26609445

DB PSU 11.2.0.4.170814 (INCLUDES CPUJUL2017)

Both DB Homes and Grid Home

26609929

OCW PSU 11.2.0.4.170814

Both DB Homes and Grid Home

22502505

ACFS PSU 11.2.0.4.160419

Only Grid Home

6.1  grid 用户,使用CRS补丁。

$  <GI_HOME>/OPatch/opatch napply -oh<GI_HOME> -local  <UNZIPPED_PATCH_LOCATION>/<GI_PSU_number>/<OCWComponents_number>

$  <GI_HOME>/OPatch/opatch napply -oh<GI_HOME> -local  <UNZIPPED_PATCH_LOCATION>/<GI_PSU_number>/<ACFSComponents_number>

$  <GI_HOME>/OPatch/opatch apply -oh<GI_HOME> -local   <UNZIPPED_PATCH_LOCATION>/<GI_PSU_number>/<DB_PSU_number>

说明:<UNZIPPED_PATCH_LOCATION> ——psu解压后的路径

<GI_PSU_number>——psu解压后的目录

<OCW Components_number>——OCW对应的Patch号

<ACFS Components_number>——ACFS对应的Patch号

<DB_PSU_number>——DB PSU对应的Patch号

查询README文件可以获得,如上Table 3。

本机如下:依次顺序执行以下语句:

$/u01/app/11.2.0/grid_11204/OPatch/opatch napply -oh /u01/app/11.2.0/grid_11204-local /tmp/26610246/26609929   

$/u01/app/11.2.0/grid_11204/OPatch/opatch napply -oh/u01/app/11.2.0/grid_11204  -local/tmp/26610246/22502505 

$/u01/app/11.2.0/grid_11204/OPatch/opatch apply -oh/u01/app/11.2.0/grid_11204  -local/tmp/26610246/26609445    

6.2. ORACLE用户运行补丁的DB组件的pre脚本

<UNZIPPED_PATCH_LOCATION>/<GI_PSU_number>/<OCWComponents_number>/custom/server/<OCWComponents_number>/custom/scripts/prepatch.sh -dbhome <ORACLE_HOME>

$ /tmp/26610246/26609929/custom/server/26609929/custom/scripts/prepatch.sh-dbhome $ORACLE_HOME

  6.3. ORACLE用户-运行补丁的DB patch

$ <ORACLE_HOME>/OPatch/opatch napply -oh<ORACLE_HOME> -local <UNZIPPED_PATCH_LOCATION>/<GI_PSU_number>/<OCWComponents_number>/custom/server/<OCW Components_number>

$ <ORACLE_HOME>/OPatch/opatch apply -oh<ORACLE_HOME> -local<UNZIPPED_PATCH_LOCATION>/<GI_PSU_number>/<DB_PSU_number>

$ORACLE_HOME/OPatch/opatch napply -oh$ORACLE_HOME -local   /tmp/26610246/26609929/custom/server/26609929

$ORACLE_HOME/OPatch/opatch napply -oh$ORACLE_HOME -local  /tmp/26610246/26609445

6.4 ORACLE运行补丁的DB组件的后脚本

$<UNZIPPED_PATCH_LOCATION>/<GI_PSU_number>/<OCWComponents_number>/custom/server/<OCWComponents_number>/custom/scripts/postpatch.sh-dbhome <ORACLE_HOME>

$/tmp/26610246/26609929/custom/server/26609929/custom/scripts/postpatch.sh-dbhome $ORACLE_HOME

6.5 root用户

         # <GI_HOME>/rdbms/install/rootadd_rdbms.sh

         # <GI_HOME>/crs/install/rootcrs.pl -patch

注意:如果显示“使用ACFS”之前建议使用系统重新启动的消息,则在继续之前必须重新启动,否则将导致使用未打补丁的ACFS \ ADVM \ OKS驱动程序运行。

(6.1-6.5需要在rac集群的每个节点上都执行一遍)

6.6启动集群和数据库:

         节点1和2 root run:

                            /u01/app/11.2.0/grid/bin/crsctlstart crs

                            /u01/app/11.2.0/grid/bin/crsctlstart crs

         oracle用户:

                            srvctlstart nodeapps

                            srvctlstart database -d racdb

                           

七.在某一个实例是上行下面的操作,以下步骤将修改后的SQL文件加载到数据库中,

        cd $ORACLE_HOME/rdbms/admin

        sqlplus /nolog

        SQL> CONNECT / AS SYSDBA

        SQL> STARTUP

 SQL> @catbundle.sql psu apply

 SQL> QUIT

如果将OJVM PSU应用于先前的GI PSU补丁,则在上一步中执行catbundle.sql脚本后,可能会看到无效的Java类。如果是这种情况,运行utlrp.sql来重新验证这些Java类。

 cd $ORACLE_HOME/rdbms/admin

 sqlplus /nolog

        SQL> CONNECT / AS SYSDBA

        SQL> @utlrp.sql

八.检查PSU安装情况

 setpages 100 lines 120 

 colaction format a15 

 colnamespace format a10 

 colversion format a18 

 colcomments format a25 

 colaction_time format a30 

 colbundle_series format a15 

 alter session set nls_timestamp_format ='yyyy-mm-dd hh24:mi:ss.ff'; 

 select * from dba_registry_history;

 (说明:文章中斜体字为通用模板命令,可以根据自己实际情况更改,摘自MOSDoc ID 1641136.1)

 

###############

由于oracle数据库资源只是grid的一个资源。觉得单独修正psu和jvm补丁是没有问题的。

1 清楚ORACLE_HOME下的一切程序。

2 2个节点分别打补丁-local选项。

3一个节点启动数据库执行脚本。

4 关闭数据库,加载jvm补丁,节点12分别执行记得-local

5 修改集群参数为false。

6 一个节点启动到upgrade模式。

7 执行脚本。

8重启数据库。

9 启动ORACLE_HOME下所有资源。

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值