RAC安装补丁的方法

RAC安装补丁的方法
Rolling Patch - OPatch Support for RAC (文档 ID 244241.1)


All-Node Patch
. Shutdown all Oracle instances on all nodes
. Apply the patch to the RAC home on all nodes
. Bring all instances up
Minimum downtime
. Shutdown all the Oracle instances on node 1 
. Apply the patch to the RAC home on node 1 
. Shutdown all the Oracle instances on node 2 
. Apply the patch to the RAC home on node 2 
. Shutdown all the Oracle instances on node 3 
. At this point, instances on nodes 1 and 2 can be brought up
. Apply the patch to the RAC home on node 3 
. Startup all the Oracle instances on node 3
Rolling patch (no downtime)
. Shutdown all the Oracle instances on node 1 
. Apply the patch to the RAC home on node 1 
. Start all the Oracle instances on node 1 
. Shutdown all the Oracle instances on node 2 
. Apply the patch to the RAC home on node 2 
. Start all the Oracle instances on node 2 
. Shutdown all the Oracle instances on node 3 
. Apply the patch to the RAC home on node 3 
. Start all the Oracle instances on node 3

这里我采取第一种方法

一:查看当前操作系统版本并关闭数据库实例
[oracle@lzl Opatch]$ ./opatch version
OPatch Version: 11.2.0.3.4

OPatch succeeded.
[grid@yq ~]$ srvctl stop database -d orcl

二:解压psu安装包
unzip -q p24732075_112040_Linux-x86-64.zip 

三:检查补丁是否冲突
[oracle@lzl 24732075]$ /u01/app/oracle/product/11.2.0/db_1/Opatch/opatch prereq CheckConflictAgainstOHWithDetail -ph ./
Oracle Interim Patch Installer version 11.2.0.3.4
Copyright (c) 2012, Oracle Corporation.  All rights reserved.

PREREQ session

Oracle Home       : /u01/app/oracle/product/11.2.0/db_1
Central Inventory : /u01/11.2.0/oraInventory
   from           : /u01/app/oracle/product/11.2.0/db_1/oraInst.loc
OPatch version    : 11.2.0.3.4
OUI version       : 11.2.0.4.0
Log file location : /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2017-05-08_18-43-55PM_1.log

Invoking prereq "checkconflictagainstohwithdetail"

Prereq "checkConflictAgainstOHWithDetail" passed.

OPatch succeeded.
[oracle@lzl 24732075]$ 

四:升级补丁
根据官方文档README.html要求,opatch不能低于11.2.0.3.6
OPatch Utility
You must use the OPatch utility version 11.2.0.3.6 or later to apply this patch. Oracle recommends that you use the latest released OPatch version for 11.2, which is available for download from My Oracle Support patch 6880880 by selecting the 11.2.0.0.0 release.

4.1:对当前opatch做备份
mv Opatch/ Opatch.bak

4.2:解压更新p6880880
unzip -q p6880880_112000_Linux-x86-64.zip

可以看到当前路径下生成了一个新的Opatch文件
drwxr-x--- 15 oracle oinstall      4096 Aug 24  2016 OPatch

4.3:查看opatch的版本
[oracle@yq db_1]$ cd OPatch
[oracle@yq OPatch]$ 
[oracle@yq OPatch]$ 
[oracle@yq OPatch]$ opatch version
OPatch Version: 11.2.0.3.15

OPatch succeeded.

4.4:安装补丁
[oracle@yq 24732075]$ /u01/app/oracle/product/11.2.0/db_1/OPatch/opatch apply
Oracle Interim Patch Installer version 11.2.0.3.15
Copyright (c) 2017, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/app/oracle/product/11.2.0/db_1
Central Inventory : /u01/11.2.0/oraInventory
   from           : /u01/app/oracle/product/11.2.0/db_1/oraInst.loc
OPatch version    : 11.2.0.3.15
OUI version       : 11.2.0.4.0
Log file location : /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2017-05-08_20-25-07PM_1.log

Verifying environment and performing prerequisite checks...
OPatch continues with these patches:   17478514  18031668  18522509  19121551  19769489  20299013  20760982  21352635  21948347  22502456  23054359  24006111  24732075  

Do you want to proceed? [y|n]
y
User Responded with: Y
All checks passed.
Provide your email address to be informed of security issues, install and
initiate Oracle Configuration Manager. Easier for you if you use your My
Oracle Support Email address/User Name.
Visit http://www.oracle.com/support/policies.html for details.
Email address/User Name: 

You have not provided an email address for notification of security issues.
Do you wish to remain uninformed of security issues ([Y]es, [N]o) [N]:  y



This node is part of an Oracle Real Application Cluster.
Remote nodes: 'lzl' 
Local node: 'yq'
Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = '/u01/app/oracle/product/11.2.0/db_1')


Is the local system ready for patching? [y|n]
y
User Responded with: Y
Backing up files...
Applying sub-patch '17478514' to OH '/u01/app/oracle/product/11.2.0/db_1'

Patching component oracle.rdbms, 11.2.0.4.0...
中间部分省略
The node 'lzl' will be patched next.
这里将要远程安装另外一个节点的补丁,要求远程的节点的实例时关闭的。

Please shutdown Oracle instances running out of this ORACLE_HOME on 'lzl'.
(Oracle Home = '/u01/app/oracle/product/11.2.0/db_1')

Is the node ready for patching? [y|n]
y
User Responded with: Y
Updating nodes 'lzl' 
   Apply-related files are:
     FP = "/u01/app/oracle/product/11.2.0/db_1/.patch_storage/NApply/2017-05-08_20-25-07PM/rac/copy_files.txt"
     DP = "/u01/app/oracle/product/11.2.0/db_1/.patch_storage/NApply/2017-05-08_20-25-07PM/rac/copy_dirs.txt"
     MP = "/u01/app/oracle/product/11.2.0/db_1/.patch_storage/NApply/2017-05-08_20-25-07PM/rac/make_cmds.txt"
     RC = "/u01/app/oracle/product/11.2.0/db_1/.patch_storage/NApply/2017-05-08_20-25-07PM/rac/remote_cmds.txt"
中间部分省略
The node 'lzl' has been patched.  You can restart Oracle instances on it.


Finished patching in rolling mode.

Composite patch 24732075 successfully applied.
Log file location: /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2017-05-08_20-25-07PM_1.log

OPatch succeeded.

4.5:查看补丁
[oracle@yq OPatch]$ opatch lsinv
Oracle Interim Patch Installer version 11.2.0.3.15
Copyright (c) 2017, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/app/oracle/product/11.2.0/db_1
Central Inventory : /u01/11.2.0/oraInventory
   from           : /u01/app/oracle/product/11.2.0/db_1/oraInst.loc
OPatch version    : 11.2.0.3.15
OUI version       : 11.2.0.4.0
Log file location : /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2017-05-08_23-08-12PM_1.log

Lsinventory Output file location : /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/lsinv/lsinventory2017-05-08_23-08-12PM.txt

--------------------------------------------------------------------------------
Local Machine Information::
Hostname: yq
ARU platform id: 226
ARU platform description:: Linux x86-64

Installed Top-level Products (1): 

Oracle Database 11g                                                  11.2.0.4.0
There are 1 products installed in this Oracle Home.


Interim patches (1) :

Patch  24732075     : applied on Mon May 08 20:44:03 CST 2017
Unique Patch ID:  21176096
Patch description:  "Database Patch Set Update : 11.2.0.4.170418 (24732075)"
   Created on 22 Feb 2017, 21:40:49 hrs PST8PDT
Sub-patch  24006111; "Database Patch Set Update : 11.2.0.4.161018 (24006111)"
Sub-patch  23054359; "Database Patch Set Update : 11.2.0.4.160719 (23054359)"
Sub-patch  22502456; "Database Patch Set Update : 11.2.0.4.160419 (22502456)"
Sub-patch  21948347; "Database Patch Set Update : 11.2.0.4.160119 (21948347)"
Sub-patch  21352635; "Database Patch Set Update : 11.2.0.4.8 (21352635)"
Sub-patch  20760982; "Database Patch Set Update : 11.2.0.4.7 (20760982)"
Sub-patch  20299013; "Database Patch Set Update : 11.2.0.4.6 (20299013)"
Sub-patch  19769489; "Database Patch Set Update : 11.2.0.4.5 (19769489)"
Sub-patch  19121551; "Database Patch Set Update : 11.2.0.4.4 (19121551)"
Sub-patch  18522509; "Database Patch Set Update : 11.2.0.4.3 (18522509)"
Sub-patch  18031668; "Database Patch Set Update : 11.2.0.4.2 (18031668)"
Sub-patch  17478514; "Database Patch Set Update : 11.2.0.4.1 (17478514)"
   Bugs fixed:
     17184721, 21538558, 16091637, 18092127, 17381384, 15979965, 18441944
     13837378, 16314254, 16731148, 17835048, 13558557, 17201159, 17853498
     17246576, 18356166, 18440047, 18681862, 16875449, 19788842, 17296856
     21330264, 14010183, 17648596, 17551063, 17025461, 17267114, 22507210
     17912217, 17889583, 18202441, 17040764, 16524926, 17478145, 19358317
     22148226, 18747196, 18641419, 17036973, 17811789, 14285317, 16542886
     18009564, 16618694, 8322815, 16692232, 18247991, 22507234, 17570240
     17848897, 17441661, 14034426, 17465741, 16596890, 17437634, 20506706
     21343897, 21453153, 18339044, 22321741, 17951233, 18430495, 21787056
     22380919, 20506715, 17811429, 19721304, 18230522, 19554106, 19458377
     17612828, 6599380, 22092979, 22321756, 17040527, 17811438, 18641461
     14657740, 13364795, 21387964, 17346671, 17588480, 18235390, 17889549
     19309466, 16472716, 20596234, 18331850, 18641451, 17344412, 21179898
     24842886, 17546761, 18203835, 18964939, 18203838, 18203837, 17313525
     22195457, 18139690, 16837842, 22296366, 14106803, 17842825, 22657942
     21352646, 20657441, 16360112, 22195441, 17389192, 14565184, 17205719
     18440095, 22195448, 14354737, 14764829, 13944971, 16571443, 21868720
     17186905, 17080436, 18673342, 22905130, 17027426, 19972569, 19972568
     19972566, 17282229, 19972564, 16870214, 19615136, 17390431, 18762750
     16613964, 18098207, 17957017, 18471685, 19730508, 21538485, 18264060
     17323222, 17754782, 17600719, 18317531, 17852463, 17596908, 17655634
     16228604, 20074391, 19972570, 18996843, 19854503, 16042673, 17835627
     20334344, 18000422, 20861693, 17393683, 17551709, 20506699, 19006849
     18456514, 18277454, 17258090, 17174582, 17242746, 16399083, 17824637
     17762296, 17397545, 16450169, 12364061, 20067212, 18856999, 19211724
     19463893, 21343775, 19463897, 17853456, 18673304, 20004021, 21668627
     16194160, 17477958, 16538760, 12982566, 20296213, 18293054, 17610798
     19699191, 18135678, 17311728, 16785708, 10136473, 24560906, 17786518
     18315328, 18334586, 12747740, 19032867, 18096714, 17390160, 17232014
     16422541, 18673325, 18155762, 14015842, 19827973, 22683225, 17726838
     18554871, 23177648, 18051556, 20803583, 17922254, 15990359, 21972320
     18282562, 16855292, 16668584, 21343838, 20299015, 17446237, 18093615
     17694209, 17288409, 17274537, 13955826, 16934803, 17634921, 17501491
     16315398, 22683212, 17006183, 13829543, 18191164, 17655240, 19393542
     18384391, 21538567, 16198143, 21847223, 17892268, 20142975, 19584068
     17165204, 18508861, 21756699, 16901385, 18554763, 18189036, 17443671
     17385178, 17936109, 14829250, 20925795, 17478514, 16850630, 13951456
     16595641, 15861775, 14054676, 16912439, 17299889, 17297939, 18619917
     16833527, 17798953, 17816865, 18607546, 17571306, 21286665, 17341326
     17851160, 20558005, 17586955, 19049453, 21051840, 17587063, 16956380
     18328509, 14133975, 18061914, 21051833, 18522509, 18765602, 18199537
     17332800, 13609098, 18384537, 22502493, 14338435, 17945983, 21067387
     16392068, 17752995, 21051862, 25505382, 17237521, 16863422, 18244962
     19544839, 24433711, 17156148, 18973907, 17877323, 17449815, 18180390
     17088068, 17037130, 20004087, 19466309, 25505371, 11733603, 18084625
     21051858, 18674024, 21051852, 18091059, 25369547, 16306373, 18306996
     19915271, 18193833, 17787259, 20631274, 16344544, 14692762, 18614015
     17346091, 18228645, 17721717, 18436307, 21756677, 11883252, 17891943
     22353199, 16384983, 19121551, 12816846, 17982555, 17761775, 22243719
     25505394, 17265217, 17071721, 16721594, 21756661, 18262334, 15913355
     17891946, 17672719, 17602269, 17239687, 17042658, 17238511, 17811456
     17284817, 17752121, 17394950, 16579084, 17011832, 22195465, 14602788
     18325460, 24476265, 24476274, 12611721, 16903536, 17006570, 16043574
     18783224, 16494615, 21526048, 19197175, 16069901, 17811447, 17308789
     22195477, 17865671, 19013183, 17343514, 18316692, 17325413, 16180763
     17348614, 14368995, 21983325, 17393915, 16285691, 20331945, 17883081
     24316947, 17705023, 17614227, 22195485, 14084247, 13645875, 16777840
     19727057, 14852021, 18744139, 18674047, 17716305, 18482502, 17622427
     19289642, 22195492, 14458214, 18723434, 17767676, 25505407, 19258504
     17786278, 17082983, 21351877, 13498382, 18331812, 16065166, 18031668
     22893153, 16943711, 21517440, 17649265, 13866822, 18094246, 24528741
     14245531, 17783588, 17082359, 20448824, 18280813, 23330119, 16268425
     17302277, 18018515, 17215560, 24411921, 19271443, 17016369, 20777150
     23330124, 20441797, 19769489, 25093656, 17545847, 18260550, 13853126
     23536835, 17227277, 9756271, 18868646, 17614134, 17546973, 19680952
     18704244, 18828868, 18273830, 17050888, 17360606, 16992075, 17375354
     12905058, 18362222, 17571039, 17468141, 18436647, 17235750, 21168487
     16220077, 16929165



Rac system comprising of multiple nodes
  Local node = yq
  Remote node = lzl

--------------------------------------------------------------------------------

OPatch succeeded.

五、打开数据库
[oracle@yq OPatch]$ cd /u01/app/oracle/product/11.2.0/db_1/rdbms/admin/
[grid@yq ~]$ srvctl start database -d orcl

[oracle@yq admin]$ sqlplus /nolog

SQL*Plus: Release 11.2.0.4.0 Production on Mon May 8 23:19:04 2017

Copyright (c) 1982, 2013, Oracle.  All rights reserved.

SQL> conn / as sysdba
Connected.
SQL> @catbundle.sql psu apply
SQL> QUIT

The catbundle.sql execution is reflected in the dba_registry_history view by a row associated with bundle series PSU.
For information about the catbundle.sql script, see My Oracle Support Document 605795.1 Introduction to Oracle Database catbundle.sql.

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

cd $ORACLE_HOME/rdbms/admin
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> @utlrp.sql

Check the following log files in $ORACLE_HOME/cfgtoollogs/catbundle or $ORACLE_BASE/cfgtoollogs/catbundle for any errors:
catbundle_PSU_<database SID>_APPLY_<TIMESTAMP>.log
catbundle_PSU_<database SID>_GENERATE_<TIMESTAMP>.log

where TIMESTAMP is of the form YYYYMMMDD_HH_MM_SS. If there are errors, refer to Section 5, "Known Issues".
This patch now includes the OJVM Mitigation patch (Patch:19721304). If an OJVM PSU is installed or planned to be installed, no further actions are necessary. Otherwise, the workaround of using the OJVM Mitigation patch can be activated. As SYSDBA do the following from the admin directory:
SQL > @dbmsjdev.sql
SQL > exec dbms_java_dev.disable

至此,oracle软件的补丁安装完毕。

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/31467250/viewspace-2140528/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/31467250/viewspace-2140528/

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值