Oracle RAC 11.2.0.4打PSU
2015-10-27 14:47
666 查看
环境:
OS CentOS 6.6 64bit
Grid software 11.2.0.4.0
Oracle software 11.2.0.4.0
方式:完全手动方式patch
1.停监听:
[grid@rac02test ~]$ srvctl stop scan_listener
[grid@rac02test ~]$ srvctl stop listener
2.停实例:
关库(任一节点)
[grid@rac02test ~]$ srvctl stop database -d rac -o immediate
3. 如果有em也停掉
As the Oracle RAC database home owner execute:
$ <ORACLE_HOME>/bin/emctl stop dbconsole
4.准备补丁安装包如下:
p20760982_112040_Linux-x86-64.zip
p20996923_112040_Linux-x86-64.zip
5. 查看当前数据库的版本
[oracle@rac02test /]$cd /u01/app/oracle/product/11.2.0/db_1/OPatch
[oracle@rac02test OPatch]$ ./opatch version
OPatch Version: 11.2.0.3.4
OPatch succeeded.
[oracle@rac02test OPatch]$ ./opatch lsinventory
Oracle Interim Patch Installer version 11.2.0.3.4
Copyright (c) 2012, Oracle Corporation. All rights reserved.
Oracle Home : /u01/app/oracle/product/11.2.0/db_1
Central Inventory : /u01/app/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/opatch2015-10-21_11-54-35AM_1.log
Lsinventory Output file location : /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/lsinv/lsinventory2015-10-21_11-54-35AM.txt
--------------------------------------------------------------------------------
Installed Top-level Products (1):
Oracle Database 11g 11.2.0.4.0
There are 1 products installed in this Oracle Home.
There are no Interim patches installed in this Oracle Home.
Rac system comprising of multiple nodes
Local node = rac02test
Remote node = rac01test
--------------------------------------------------------------------------------
OPatch succeeded.
6.备份节点1,2上 grid用户和oracle用户下的OPatch目录
Mv $ORACLE_HOME/OPatch /$ORACLE_HOME/OPatch.bak
[oracle@rac02test db_1]$ mv OPatch/ OPatch.bak
[oracle@rac01test db_1]$ mv OPatch/ OPatch.bak
grid
[root@rac02test grid]# mv OPatch/ OPatch.bak
[root@rac01test grid]# mv OPatch/ OPatch.bak
7.解压patch包
[grid@rac02test tools]$ unzip p20996923_112040_Linux-x86-64.zip
20760982—>>>DB PSU 11.2.0.4.7 (INCLUDES CPUJUL2015)—>>>Both DB Homes and Grid Home
20831122—>>>OCW PSU 11.2.0.4.7—>>>Both DB Homes and Grid Home
20299019—>>>ACFS PSU 11.2.0.4.7—>>>Only Grid Home
8.以root用户执行:
[root@rac02test ~] cd $GRID_HOME/crs/install/
[root@rac02test install]# ./rootcrs.pl -unlock
9.以GRID用户执行
Apply the CRS patch using. As the GI home owner execute:
$ <GI_HOME>/OPatch/opatch napply -oh <GI_HOME> -local <UNZIPPED_PATCH_LOCATION>/<GI_PSU_number>/<OCW Components_number>
$ORACLE_HOME/OPatch/opatch napply -oh $ORACLE_HOME -local /tools/20996923/20831122 --执行这一句
提示email: 直接回车,其他的直接y
As the GI home owner execute:
$ <GI_HOME>/OPatch/opatch napply -oh <GI_HOME> -local <UNZIPPED_PATCH_LOCATION>/<GI_PSU_number>/<ACFS Components_number>
$ORACLE_HOME/OPatch/opatch napply -oh $ORACLE_HOME -local /tools/20996923/20299019 --执行这一句
$GRID_HOME/OPatch/opatch rollback -local -id 20299019 -oh $GRID_HOME
As the GI home owner execute:
$ <GI_HOME>/OPatch/opatch apply -oh <GI_HOME> -local <UNZIPPED_PATCH_LOCATION>/<GI_PSU_number>/<DB_PSU_number>
$ORACLE_HOME/OPatch/opatch apply -oh $ORACLE_HOME -local /tools/20996923/20760982 --执行这一句
10.以oracle用户执行
Run the pre script for DB component of the patch. As the database home owner execute:
$ <UNZIPPED_PATCH_LOCATION>/<GI_PSU_number>/<OCW Components_number>/custom/server/<OCW Components_number>/custom/scripts/prepatch.sh -dbhome <ORACLE_HOME>
/20996923/20831122/custom/server/20831122/custom/scripts/prepatch.sh -dbhome $ORACLE_HOME --执行这一句
Apply the DB patch. As the database home owner execute:
$ <ORACLE_HOME>/OPatch/opatch napply -oh <ORACLE_HOME> -local <UNZIPPED_PATCH_LOCATION>/<GI_PSU_number>/<OCW Components_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 rollback -local -id 20831122 -oh $ORACLE_HOME
$ORACLE_HOME/OPatch/opatch napply -oh $ORACLE_HOME -local /tools/20996923/20831122/custom/server/20831122 --执行这一句
$ORACLE_HOME/OPatch/opatch apply -oh $ORACLE_HOME -local /tools/20996923/20760982 --执行这一句
Run the post script for DB component of the patch. As the database home owner execute:
$ <UNZIPPED_PATCH_LOCATION>/<GI_PSU_number>/<OCW Components_number>/custom/server/<OCW Components_number>/custom/scripts/postpatch.sh -dbhome <ORACLE_HOME>
/20996923/20831122/custom/server/20831122/custom/scripts/postpatch.sh -dbhome $ORACLE_HOME --执行这一句
11.root用户执行以下脚本 在2个节点上都执行,此处建议依次执行(非并行执行)
Run the post script. As the root user execute:
# <GI_HOME>/rdbms/install/rootadd_rdbms.sh
$GRID_HOME/rdbms/install/rootadd_rdbms.sh
If this is a GI Home, as the root user execute:
# <GI_HOME>/crs/install/rootcrs.pl -patch
$GRID_HOME/crs/install/rootcrs.pl -patch
12.Start the CRS managed resources that were earlier running from DB homes. If this is a GI Home environment, as the database home owner execute:
$ <ORACLE_HOME>/bin/srvctl start home -o <ORACLE_HOME> -s <status file location> -n <node name>
$ srvctl start database -d xedb
13.验证补丁,两个节点的grid用户和oracle用户都验证一下
[oracle@rac02test OPatch]$ ./opatch lsinv
Oracle Interim Patch Installer version 11.2.0.3.6
Copyright (c) 2013, Oracle Corporation. All rights reserved.
Oracle Home : /u01/app/oracle/product/11.2.0/db_1
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle/product/11.2.0/db_1/oraInst.loc
OPatch version : 11.2.0.3.6
OUI version : 11.2.0.4.0
Log file location : /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2015-10-22_09-34-33AM_1.log
Lsinventory Output file location : /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/lsinv/lsinventory2015-10-22_09-34-33AM.txt
--------------------------------------------------------------------------------
Installed Top-level Products (1):
Oracle Database 11g 11.2.0.4.0
There are 1 product(s) installed in this Oracle Home.
Interim patches (2) :
Patch 20760982 : applied on Wed Oct 21 15:49:53 CST 2015
Unique Patch ID: 18908105
Patch description: "Database Patch Set Update : 11.2.0.4.7 (20760982)"
Created on 4 Jun 2015, 00:23:20 hrs PST8PDT
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:
17288409, 21051852, 18607546, 17205719, 17811429, 17816865, 20506699
17922254, 17754782, 16934803, 13364795, 17311728, 17441661, 17284817
16992075, 17446237, 14015842, 19972569, 17449815, 17375354, 19463897
17982555, 17235750, 13866822, 18317531, 17478514, 18235390, 14338435
20803583, 13944971, 20142975, 17811789, 16929165, 18704244, 20506706
17546973, 20334344, 14054676, 17088068, 18264060, 17346091, 17343514
19680952, 18471685, 19211724, 13951456, 16315398, 18744139, 16850630
19049453, 18673304, 17883081, 19915271, 18641419, 18262334, 17006183
18277454, 16833527, 10136473, 18051556, 17865671, 17852463, 18554871
17853498, 18334586, 17588480, 17551709, 19827973, 17842825, 17344412
18828868, 17025461, 11883252, 13609098, 17239687, 17602269, 19197175
18316692, 17313525, 12611721, 19544839, 18964939, 17600719, 18191164
19393542, 17571306, 20777150, 18482502, 19466309, 17040527, 17165204
18098207, 16785708, 17174582, 16180763, 17465741, 16777840, 12982566
19463893, 12816846, 16875449, 17237521, 19358317, 17811438, 17811447
17945983, 18762750, 17184721, 16912439, 18061914, 17282229, 18331850
18202441, 17082359, 18723434, 19554106, 14034426, 18339044, 19458377
17752995, 17891943, 17258090, 17767676, 16668584, 18384391, 17040764
17381384, 15913355, 18356166, 14084247, 20506715, 13853126, 18203837
14245531, 16043574, 17848897, 17877323, 17468141, 17786518, 17912217
17037130, 18155762, 16956380, 17478145, 17394950, 18189036, 18641461
18619917, 17027426, 16268425, 19584068, 18436307, 17265217, 17634921
13498382, 20004087, 17443671, 18000422, 20004021, 17571039, 21067387
16344544, 18009564, 14354737, 18135678, 18614015, 18362222, 17835048
16472716, 17936109, 17050888, 17325413, 14010183, 18747196, 17761775
16721594, 17082983, 20067212, 21179898, 17302277, 18084625, 15990359
18203835, 17297939, 16731148, 17811456, 17215560, 13829543, 14133975
17694209, 18091059, 17385178, 8322815, 17586955, 17201159, 17655634
18331812, 19730508, 18868646, 17648596, 16220077, 16069901, 17348614
17393915, 17957017, 17274537, 18096714, 17308789, 18436647, 14285317
19289642, 14764829, 18328509, 17622427, 16943711, 14368995, 17346671
18996843, 17783588, 16618694, 17672719, 18856999, 18783224, 17851160
17546761, 17798953, 18273830, 19972566, 16384983, 17726838, 17360606
13645875, 18199537, 16542886, 17889549, 14565184, 17071721, 20299015
17610798, 20657441, 17397545, 18230522, 16360112, 19769489, 12905058
18641451, 12747740, 18430495, 17042658, 17016369, 14602788, 19972568
19788842, 18508861, 14657740, 17332800, 13837378, 19972564, 17186905
18315328, 19699191, 17437634, 19006849, 19013183, 17296856, 18674024
17232014, 16855292, 21051840, 14692762, 17762296, 17705023, 19121551
19854503, 19309466, 18681862, 20558005, 17390160, 18554763, 18456514
13955826, 16306373, 18139690, 17501491, 17299889, 17752121, 17889583
18673325, 18293054, 17242746, 17951233, 17649265, 18094246, 19615136
17011832, 16870214, 17477958, 18522509, 20631274, 16091637, 17323222
16595641, 16524926, 18228645, 18282562, 17596908, 17156148, 18031668
16494615, 17545847, 17614134, 13558557, 17341326, 17891946, 17716305
16392068, 19271443, 18092127, 17614227, 18440047, 14106803, 16903536
18973907, 18673342, 17389192, 16194160, 17006570, 17612828, 17721717
17570240, 17390431, 16863422, 18325460, 19727057, 16422541, 17267114
19972570, 18244962, 18765602, 18203838, 16198143, 17246576, 14829250
17835627, 18247991, 14458214, 21051862, 16692232, 17786278, 17227277
16042673, 16314254, 16228604, 16837842, 17393683, 17787259, 20331945
20074391, 15861775, 16399083, 18018515, 21051858, 18260550, 17036973
16613964, 17080436, 16579084, 18384537, 18280813, 20296213, 16901385
15979965, 18441944, 16450169, 9756271, 17892268, 11733603, 17587063
16285691, 16538760, 18180390, 18193833, 21051833, 17238511, 17824637
16571443, 18306996, 14852021, 18674047, 17853456, 12364061
Patch 20831122 : applied on Wed Oct 21 15:47:50 CST 2015
Unique Patch ID: 18923533
Patch description: "OCW Patch Set Update : 11.2.0.4.7 (20831122)"
Created on 1 Jul 2015, 06:26:39 hrs PST8PDT
Bugs fixed:
19270660, 18328800, 18691572, 20365005, 17750548, 17387214, 17617807
14497275, 17733927, 18180541, 18962892, 17292250, 17378618, 16759171
20110156, 17065496, 13991403, 17273020, 17155238, 18261183, 18053580
20218012, 17039197, 17947785, 16317771, 10052729, 20340620, 18199185
18399991, 20186278, 18024089, 20746251, 20246071, 14270845, 18414137
17001914, 17927970, 14378120, 16346413, 15986647, 18068871, 21222147
18143836, 16206997, 19168690, 20235511, 18343490, 16613232, 19276791
17722664, 12928658, 18520351, 16249829, 18226143, 18265482, 18229842
17172091, 17818075, 18231837, 14373486, 17483479, 18120545, 18729166
13843841, 21225209, 17405302, 18709496, 18330979, 18744838, 20531190
14525998, 18187697, 14385860, 18348155, 19479503, 12928592, 17516024
18370031, 17764053, 17551223, 14671408, 18272135, 14207615, 17500165
18875012, 18464784, 19558324, 18848125, 19241857, 14851828, 17955615
20315294, 14693336, 16284825, 17352230, 20014326, 17238586, 17089344
17405605, 17531342, 17159489, 17640316, 16543190, 17983675, 17481314
16281493, 18346135, 15986311, 17208793, 18700935, 18999857, 14076173
18428146, 18352845, 17435488, 18352846, 17391726, 17387779, 16206882
20141091, 17305100, 15832129, 19885321, 16901346, 17985714, 18536826
17780903, 18752378, 18946768, 16876500, 16875342, 19955755, 16429265
18336452, 17273003, 19319357, 17059927, 17046460, 18053631, 16867761
20235486, 15869775, 19642566, 17447588, 15920201
Rac system comprising of multiple nodes
Local node = rac02test
Remote node = rac01test
--------------------------------------------------------------------------------
OPatch succeeded.
14.更新数据字典
The following steps load modified SQL files into the database. For an Oracle RAC environment, perform these steps on only one node.
For each database instance running on the Oracle home being patched, connect to the database using SQL*Plus. Connect as SYSDBA and run the catbundle.sql script as follows:
cd $ORACLE_HOME/rdbms/admin
[oracle@rac02test ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Wed Oct 21 16:16:28 2015
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
SQL> @/u01/app/oracle/product/11.2.0/db_1/rdbms/admin/catbundle.sql psu apply
SQL>exit
--编译无效对象
SQL>@/u01/app/oracle/product/11.2.0/db_1/rdbms/admin/utlrp.sql
15. 查看补丁的情况,grid 和 oracle 用户都要看一下
[grid@rac02test OPatch]$ ./opatch lspatches
20760982;Database Patch Set Update : 11.2.0.4.7 (20760982) ----之前是11.2.0.4.0
20831122;OCW Patch Set Update : 11.2.0.4.7 (20831122)
节点2验证数据库版本信息
col comments for a20;
col namespace for a10;
col bundle_series for a10;
col version for a10;
set line 200;
SQL> select NAMESPACE,VERSION,COMMENTS,BUNDLE_SERIES from sys.registry$history;
NAMESPACE VERSION COMMENTS BUNDLE_SER
---------- ---------- -------------------- ----------
SERVER 11.2.0.4 Patchset 11.2.0.2.0 PSU
SERVER 11.2.0.4 PSU 11.2.0.4.7 PSU
SERVER 11.2.0.4 PSU 11.2.0.4.7 PSU
可以看到PSU版本变成了 11.2.0.4.7 ,到此为止PSU成功打好,中间执行脚本的过程日志很长就没有贴出来。
16. 问题处理
[grid@rac02testOPatch]$ ./opatch napply -oh $ORACLE_HOME -local /tools/20996923/20831122
OracleInterim Patch Installer version 11.2.0.3.4
Copyright(c) 2012, Oracle Corporation. All rightsreserved.
OracleHome : /u01/11.2.0/grid
CentralInventory : /u01/app/oraInventory
from : /u01/11.2.0/grid/oraInst.loc
OPatchversion : 11.2.0.3.4
OUIversion : 11.2.0.4.0
Logfile location :/u01/11.2.0/grid/cfgtoollogs/opatch/opatch2015-10-21_14-46-20PM_1.log
Verifyingenvironment and performing prerequisite checks...
Prerequisitecheck "CheckMinimumOPatchVersion" failed.
Thedetails are:
The OPatch being used has version 11.2.0.3.4 while the followingpatch(es) require higher versions:
Patch 20831122 requires OPatch version 11.2.0.3.6.
Please download latest OPatch from My Oracle Support.
UtilSessionfailed: Prerequisite check "CheckMinimumOPatchVersion" failed.
Logfile location:/u01/11.2.0/grid/cfgtoollogs/opatch/opatch2015-10-21_14-46-20PM_1.log
OPatchfailed with error code 73
标红色报错的信息大概意思是:
正在使用的的Opatch有11.2.0.3.4版本,而下面的补丁(ES)需要更高的版本:
补丁20831122需要的Opatch版本11.2.0.3.6。
请从My Oracle Support的下载最新的Opatch。
解决办法:下载11.2.0.3.6版本的OPatch
以上操作参考oracle metalink 文档 ID 1641136.1
环境:
OS CentOS 6.6 64bit
Grid software 11.2.0.4.0
Oracle software 11.2.0.4.0
方式:完全手动方式patch
1.停监听:
[grid@rac02test ~]$ srvctl stop scan_listener
[grid@rac02test ~]$ srvctl stop listener
2.停实例:
关库(任一节点)
[grid@rac02test ~]$ srvctl stop database -d rac -o immediate
3. 如果有em也停掉
As the Oracle RAC database home owner execute:
$ <ORACLE_HOME>/bin/emctl stop dbconsole
4.准备补丁安装包如下:
p20760982_112040_Linux-x86-64.zip
p20996923_112040_Linux-x86-64.zip
5. 查看当前数据库的版本
[oracle@rac02test /]$cd /u01/app/oracle/product/11.2.0/db_1/OPatch
[oracle@rac02test OPatch]$ ./opatch version
OPatch Version: 11.2.0.3.4
OPatch succeeded.
[oracle@rac02test OPatch]$ ./opatch lsinventory
Oracle Interim Patch Installer version 11.2.0.3.4
Copyright (c) 2012, Oracle Corporation. All rights reserved.
Oracle Home : /u01/app/oracle/product/11.2.0/db_1
Central Inventory : /u01/app/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/opatch2015-10-21_11-54-35AM_1.log
Lsinventory Output file location : /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/lsinv/lsinventory2015-10-21_11-54-35AM.txt
--------------------------------------------------------------------------------
Installed Top-level Products (1):
Oracle Database 11g 11.2.0.4.0
There are 1 products installed in this Oracle Home.
There are no Interim patches installed in this Oracle Home.
Rac system comprising of multiple nodes
Local node = rac02test
Remote node = rac01test
--------------------------------------------------------------------------------
OPatch succeeded.
6.备份节点1,2上 grid用户和oracle用户下的OPatch目录
Mv $ORACLE_HOME/OPatch /$ORACLE_HOME/OPatch.bak
[oracle@rac02test db_1]$ mv OPatch/ OPatch.bak
[oracle@rac01test db_1]$ mv OPatch/ OPatch.bak
grid
[root@rac02test grid]# mv OPatch/ OPatch.bak
[root@rac01test grid]# mv OPatch/ OPatch.bak
7.解压patch包
[grid@rac02test tools]$ unzip p20996923_112040_Linux-x86-64.zip
20760982—>>>DB PSU 11.2.0.4.7 (INCLUDES CPUJUL2015)—>>>Both DB Homes and Grid Home
20831122—>>>OCW PSU 11.2.0.4.7—>>>Both DB Homes and Grid Home
20299019—>>>ACFS PSU 11.2.0.4.7—>>>Only Grid Home
8.以root用户执行:
[root@rac02test ~] cd $GRID_HOME/crs/install/
[root@rac02test install]# ./rootcrs.pl -unlock
9.以GRID用户执行
Apply the CRS patch using. As the GI home owner execute:
$ <GI_HOME>/OPatch/opatch napply -oh <GI_HOME> -local <UNZIPPED_PATCH_LOCATION>/<GI_PSU_number>/<OCW Components_number>
$ORACLE_HOME/OPatch/opatch napply -oh $ORACLE_HOME -local /tools/20996923/20831122 --执行这一句
提示email: 直接回车,其他的直接y
As the GI home owner execute:
$ <GI_HOME>/OPatch/opatch napply -oh <GI_HOME> -local <UNZIPPED_PATCH_LOCATION>/<GI_PSU_number>/<ACFS Components_number>
$ORACLE_HOME/OPatch/opatch napply -oh $ORACLE_HOME -local /tools/20996923/20299019 --执行这一句
$GRID_HOME/OPatch/opatch rollback -local -id 20299019 -oh $GRID_HOME
As the GI home owner execute:
$ <GI_HOME>/OPatch/opatch apply -oh <GI_HOME> -local <UNZIPPED_PATCH_LOCATION>/<GI_PSU_number>/<DB_PSU_number>
$ORACLE_HOME/OPatch/opatch apply -oh $ORACLE_HOME -local /tools/20996923/20760982 --执行这一句
10.以oracle用户执行
Run the pre script for DB component of the patch. As the database home owner execute:
$ <UNZIPPED_PATCH_LOCATION>/<GI_PSU_number>/<OCW Components_number>/custom/server/<OCW Components_number>/custom/scripts/prepatch.sh -dbhome <ORACLE_HOME>
/20996923/20831122/custom/server/20831122/custom/scripts/prepatch.sh -dbhome $ORACLE_HOME --执行这一句
Apply the DB patch. As the database home owner execute:
$ <ORACLE_HOME>/OPatch/opatch napply -oh <ORACLE_HOME> -local <UNZIPPED_PATCH_LOCATION>/<GI_PSU_number>/<OCW Components_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 rollback -local -id 20831122 -oh $ORACLE_HOME
$ORACLE_HOME/OPatch/opatch napply -oh $ORACLE_HOME -local /tools/20996923/20831122/custom/server/20831122 --执行这一句
$ORACLE_HOME/OPatch/opatch apply -oh $ORACLE_HOME -local /tools/20996923/20760982 --执行这一句
Run the post script for DB component of the patch. As the database home owner execute:
$ <UNZIPPED_PATCH_LOCATION>/<GI_PSU_number>/<OCW Components_number>/custom/server/<OCW Components_number>/custom/scripts/postpatch.sh -dbhome <ORACLE_HOME>
/20996923/20831122/custom/server/20831122/custom/scripts/postpatch.sh -dbhome $ORACLE_HOME --执行这一句
11.root用户执行以下脚本 在2个节点上都执行,此处建议依次执行(非并行执行)
Run the post script. As the root user execute:
# <GI_HOME>/rdbms/install/rootadd_rdbms.sh
$GRID_HOME/rdbms/install/rootadd_rdbms.sh
If this is a GI Home, as the root user execute:
# <GI_HOME>/crs/install/rootcrs.pl -patch
$GRID_HOME/crs/install/rootcrs.pl -patch
12.Start the CRS managed resources that were earlier running from DB homes. If this is a GI Home environment, as the database home owner execute:
$ <ORACLE_HOME>/bin/srvctl start home -o <ORACLE_HOME> -s <status file location> -n <node name>
$ srvctl start database -d xedb
13.验证补丁,两个节点的grid用户和oracle用户都验证一下
[oracle@rac02test OPatch]$ ./opatch lsinv
Oracle Interim Patch Installer version 11.2.0.3.6
Copyright (c) 2013, Oracle Corporation. All rights reserved.
Oracle Home : /u01/app/oracle/product/11.2.0/db_1
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle/product/11.2.0/db_1/oraInst.loc
OPatch version : 11.2.0.3.6
OUI version : 11.2.0.4.0
Log file location : /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2015-10-22_09-34-33AM_1.log
Lsinventory Output file location : /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/lsinv/lsinventory2015-10-22_09-34-33AM.txt
--------------------------------------------------------------------------------
Installed Top-level Products (1):
Oracle Database 11g 11.2.0.4.0
There are 1 product(s) installed in this Oracle Home.
Interim patches (2) :
Patch 20760982 : applied on Wed Oct 21 15:49:53 CST 2015
Unique Patch ID: 18908105
Patch description: "Database Patch Set Update : 11.2.0.4.7 (20760982)"
Created on 4 Jun 2015, 00:23:20 hrs PST8PDT
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:
17288409, 21051852, 18607546, 17205719, 17811429, 17816865, 20506699
17922254, 17754782, 16934803, 13364795, 17311728, 17441661, 17284817
16992075, 17446237, 14015842, 19972569, 17449815, 17375354, 19463897
17982555, 17235750, 13866822, 18317531, 17478514, 18235390, 14338435
20803583, 13944971, 20142975, 17811789, 16929165, 18704244, 20506706
17546973, 20334344, 14054676, 17088068, 18264060, 17346091, 17343514
19680952, 18471685, 19211724, 13951456, 16315398, 18744139, 16850630
19049453, 18673304, 17883081, 19915271, 18641419, 18262334, 17006183
18277454, 16833527, 10136473, 18051556, 17865671, 17852463, 18554871
17853498, 18334586, 17588480, 17551709, 19827973, 17842825, 17344412
18828868, 17025461, 11883252, 13609098, 17239687, 17602269, 19197175
18316692, 17313525, 12611721, 19544839, 18964939, 17600719, 18191164
19393542, 17571306, 20777150, 18482502, 19466309, 17040527, 17165204
18098207, 16785708, 17174582, 16180763, 17465741, 16777840, 12982566
19463893, 12816846, 16875449, 17237521, 19358317, 17811438, 17811447
17945983, 18762750, 17184721, 16912439, 18061914, 17282229, 18331850
18202441, 17082359, 18723434, 19554106, 14034426, 18339044, 19458377
17752995, 17891943, 17258090, 17767676, 16668584, 18384391, 17040764
17381384, 15913355, 18356166, 14084247, 20506715, 13853126, 18203837
14245531, 16043574, 17848897, 17877323, 17468141, 17786518, 17912217
17037130, 18155762, 16956380, 17478145, 17394950, 18189036, 18641461
18619917, 17027426, 16268425, 19584068, 18436307, 17265217, 17634921
13498382, 20004087, 17443671, 18000422, 20004021, 17571039, 21067387
16344544, 18009564, 14354737, 18135678, 18614015, 18362222, 17835048
16472716, 17936109, 17050888, 17325413, 14010183, 18747196, 17761775
16721594, 17082983, 20067212, 21179898, 17302277, 18084625, 15990359
18203835, 17297939, 16731148, 17811456, 17215560, 13829543, 14133975
17694209, 18091059, 17385178, 8322815, 17586955, 17201159, 17655634
18331812, 19730508, 18868646, 17648596, 16220077, 16069901, 17348614
17393915, 17957017, 17274537, 18096714, 17308789, 18436647, 14285317
19289642, 14764829, 18328509, 17622427, 16943711, 14368995, 17346671
18996843, 17783588, 16618694, 17672719, 18856999, 18783224, 17851160
17546761, 17798953, 18273830, 19972566, 16384983, 17726838, 17360606
13645875, 18199537, 16542886, 17889549, 14565184, 17071721, 20299015
17610798, 20657441, 17397545, 18230522, 16360112, 19769489, 12905058
18641451, 12747740, 18430495, 17042658, 17016369, 14602788, 19972568
19788842, 18508861, 14657740, 17332800, 13837378, 19972564, 17186905
18315328, 19699191, 17437634, 19006849, 19013183, 17296856, 18674024
17232014, 16855292, 21051840, 14692762, 17762296, 17705023, 19121551
19854503, 19309466, 18681862, 20558005, 17390160, 18554763, 18456514
13955826, 16306373, 18139690, 17501491, 17299889, 17752121, 17889583
18673325, 18293054, 17242746, 17951233, 17649265, 18094246, 19615136
17011832, 16870214, 17477958, 18522509, 20631274, 16091637, 17323222
16595641, 16524926, 18228645, 18282562, 17596908, 17156148, 18031668
16494615, 17545847, 17614134, 13558557, 17341326, 17891946, 17716305
16392068, 19271443, 18092127, 17614227, 18440047, 14106803, 16903536
18973907, 18673342, 17389192, 16194160, 17006570, 17612828, 17721717
17570240, 17390431, 16863422, 18325460, 19727057, 16422541, 17267114
19972570, 18244962, 18765602, 18203838, 16198143, 17246576, 14829250
17835627, 18247991, 14458214, 21051862, 16692232, 17786278, 17227277
16042673, 16314254, 16228604, 16837842, 17393683, 17787259, 20331945
20074391, 15861775, 16399083, 18018515, 21051858, 18260550, 17036973
16613964, 17080436, 16579084, 18384537, 18280813, 20296213, 16901385
15979965, 18441944, 16450169, 9756271, 17892268, 11733603, 17587063
16285691, 16538760, 18180390, 18193833, 21051833, 17238511, 17824637
16571443, 18306996, 14852021, 18674047, 17853456, 12364061
Patch 20831122 : applied on Wed Oct 21 15:47:50 CST 2015
Unique Patch ID: 18923533
Patch description: "OCW Patch Set Update : 11.2.0.4.7 (20831122)"
Created on 1 Jul 2015, 06:26:39 hrs PST8PDT
Bugs fixed:
19270660, 18328800, 18691572, 20365005, 17750548, 17387214, 17617807
14497275, 17733927, 18180541, 18962892, 17292250, 17378618, 16759171
20110156, 17065496, 13991403, 17273020, 17155238, 18261183, 18053580
20218012, 17039197, 17947785, 16317771, 10052729, 20340620, 18199185
18399991, 20186278, 18024089, 20746251, 20246071, 14270845, 18414137
17001914, 17927970, 14378120, 16346413, 15986647, 18068871, 21222147
18143836, 16206997, 19168690, 20235511, 18343490, 16613232, 19276791
17722664, 12928658, 18520351, 16249829, 18226143, 18265482, 18229842
17172091, 17818075, 18231837, 14373486, 17483479, 18120545, 18729166
13843841, 21225209, 17405302, 18709496, 18330979, 18744838, 20531190
14525998, 18187697, 14385860, 18348155, 19479503, 12928592, 17516024
18370031, 17764053, 17551223, 14671408, 18272135, 14207615, 17500165
18875012, 18464784, 19558324, 18848125, 19241857, 14851828, 17955615
20315294, 14693336, 16284825, 17352230, 20014326, 17238586, 17089344
17405605, 17531342, 17159489, 17640316, 16543190, 17983675, 17481314
16281493, 18346135, 15986311, 17208793, 18700935, 18999857, 14076173
18428146, 18352845, 17435488, 18352846, 17391726, 17387779, 16206882
20141091, 17305100, 15832129, 19885321, 16901346, 17985714, 18536826
17780903, 18752378, 18946768, 16876500, 16875342, 19955755, 16429265
18336452, 17273003, 19319357, 17059927, 17046460, 18053631, 16867761
20235486, 15869775, 19642566, 17447588, 15920201
Rac system comprising of multiple nodes
Local node = rac02test
Remote node = rac01test
--------------------------------------------------------------------------------
OPatch succeeded.
14.更新数据字典
The following steps load modified SQL files into the database. For an Oracle RAC environment, perform these steps on only one node.
For each database instance running on the Oracle home being patched, connect to the database using SQL*Plus. Connect as SYSDBA and run the catbundle.sql script as follows:
cd $ORACLE_HOME/rdbms/admin
[oracle@rac02test ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Wed Oct 21 16:16:28 2015
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
SQL> @/u01/app/oracle/product/11.2.0/db_1/rdbms/admin/catbundle.sql psu apply
SQL>exit
--编译无效对象
SQL>@/u01/app/oracle/product/11.2.0/db_1/rdbms/admin/utlrp.sql
15. 查看补丁的情况,grid 和 oracle 用户都要看一下
[grid@rac02test OPatch]$ ./opatch lspatches
20760982;Database Patch Set Update : 11.2.0.4.7 (20760982) ----之前是11.2.0.4.0
20831122;OCW Patch Set Update : 11.2.0.4.7 (20831122)
节点2验证数据库版本信息
col comments for a20;
col namespace for a10;
col bundle_series for a10;
col version for a10;
set line 200;
SQL> select NAMESPACE,VERSION,COMMENTS,BUNDLE_SERIES from sys.registry$history;
NAMESPACE VERSION COMMENTS BUNDLE_SER
---------- ---------- -------------------- ----------
SERVER 11.2.0.4 Patchset 11.2.0.2.0 PSU
SERVER 11.2.0.4 PSU 11.2.0.4.7 PSU
SERVER 11.2.0.4 PSU 11.2.0.4.7 PSU
可以看到PSU版本变成了 11.2.0.4.7 ,到此为止PSU成功打好,中间执行脚本的过程日志很长就没有贴出来。
16. 问题处理
[grid@rac02testOPatch]$ ./opatch napply -oh $ORACLE_HOME -local /tools/20996923/20831122
OracleInterim Patch Installer version 11.2.0.3.4
Copyright(c) 2012, Oracle Corporation. All rightsreserved.
OracleHome : /u01/11.2.0/grid
CentralInventory : /u01/app/oraInventory
from : /u01/11.2.0/grid/oraInst.loc
OPatchversion : 11.2.0.3.4
OUIversion : 11.2.0.4.0
Logfile location :/u01/11.2.0/grid/cfgtoollogs/opatch/opatch2015-10-21_14-46-20PM_1.log
Verifyingenvironment and performing prerequisite checks...
Prerequisitecheck "CheckMinimumOPatchVersion" failed.
Thedetails are:
The OPatch being used has version 11.2.0.3.4 while the followingpatch(es) require higher versions:
Patch 20831122 requires OPatch version 11.2.0.3.6.
Please download latest OPatch from My Oracle Support.
UtilSessionfailed: Prerequisite check "CheckMinimumOPatchVersion" failed.
Logfile location:/u01/11.2.0/grid/cfgtoollogs/opatch/opatch2015-10-21_14-46-20PM_1.log
OPatchfailed with error code 73
标红色报错的信息大概意思是:
正在使用的的Opatch有11.2.0.3.4版本,而下面的补丁(ES)需要更高的版本:
补丁20831122需要的Opatch版本11.2.0.3.6。
请从My Oracle Support的下载最新的Opatch。
解决办法:下载11.2.0.3.6版本的OPatch
以上操作参考oracle metalink 文档 ID 1641136.1
相关文章推荐
- 在Oracle里,表的别名不能用as,列的别名可以用as
- 安装Oracle数据库和PLSQL连接数据库
- oracle导出对象结构和对象数据
- 问题:sqlserver有没有类似Oracle的LISTAGG;结果: 灵活运用 SQL SERVER FOR XML PATH
- Oracle归档日志写满(ora-00257)了怎么办
- Oracle 11g RAC更改归档到ASM
- 从Excel(CSV)文件导入数据到Oracle
- distinct
- ORACLE 如何查询被锁定表及如何解锁释放session
- oracle字符函数
- 字符串连接
- oracle字符函数
- Oracle查询当前连接的用户和执行的SQL
- oracle基本命令
- Windows上安装Oracle 12c图解
- Oracle数据类型
- tnsnames.ora中UR=A配置使用
- ORACLE RAC ASM环境下DATAGUARD搭建步骤
- Oracle 11g 开启的服务详细介绍
- 在PYTHON中,用cx_Oracle连接ORACLE数据库简单示例