本帖最后由 郑全 于 2017-6-24 00:26 编辑
1.opatch 准备
1.1 opatch 版本要求
OPatch utility version 12.2.0.1.7 or later
12.2.0.1 默认为12.2.0.1.5,所以,必须到mos下载最新的opatch 工具
使用各自用户进行解压到对应的$ORACLE_HOME
$ unzip <OPATCH-ZIP> -d <ORACLE_HOME> $ <ORACLE_HOME>/OPatch/opatch version1.2 解压补丁
使用grid用户解压dbbp
unzip p26129945_122010_Linux-x86-64.zip
1.3 检查当前环境已经安装的一次性补丁是否和 dbbp 12.2.0.1.170620 26129945冲突
For Grid Infrastructure Home, as home user: % $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u01/setup/26129945/25983138% $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u01/setup/26129945/26187629For Database home, as home user: % $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u01/setup/26129945/25983138% $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /u01/setup/26129945/26187629
1.4 进行系统空间检查
For Grid Infrastructure Home, as home user:
For Database home, as home user:
2.打补丁
针对rac,需要每个节点分别打补丁
下面以 grid home 和oracle home都不共享,并且没有使用acfs的情况进行打补丁的步骤.
其实,就一句话,其他的就让系统自己去执行.
使用 root 用户去执行:
<GI_HOME>/OPatch/opatchauto apply <UNZIPPED_PATCH_LOCATION>/26129945
具体如下:
[root@rac2 u01]# /u01/app/grid/product/12.2.0/grid/OPatch/opatchauto apply /u01/setup/26129945
------------------------------------------------------------
------------------------------------------------------------
-- 下面是执行结果
--
------------------------------------------------------------
OPatchauto session is initiated at Fri Jun 23 23:18:26 2017
System initialization log file is /u01/app/grid/product/12.2.0/grid/cfgtoollogs/opatchautodb/systemconfig2017-06-23_11-18-33PM.log.
会话日志文件是/u01/app/grid/product/12.2.0/grid/cfgtoollogs/opatchauto/opatchauto2017-06-23_11-19-24PM.log
此会话的 ID 为 1VWP
Executing OPatch prereq operations to verify patch applicability on home /u01/app/grid/product/12.2.0/grid
Executing OPatch prereq operations to verify patch applicability on home /u01/app/oracle/product/12.2.0/db_1
Patch applicability verified successfully on home /u01/app/grid/product/12.2.0/grid
Patch applicability verified successfully on home /u01/app/oracle/product/12.2.0/db_1
Verifying SQL patch applicability on home /u01/app/oracle/product/12.2.0/db_1
SQL patch applicability verified successfully on home /u01/app/oracle/product/12.2.0/db_1
Preparing to bring down database service on home /u01/app/oracle/product/12.2.0/db_1
Successfully prepared home /u01/app/oracle/product/12.2.0/db_1 to bring down database service
Bringing down CRS service on home /u01/app/grid/product/12.2.0/grid
Prepatch operation log file location: /u01/app/grid/base/crsdata/rac2/crsconfig/crspatch_rac2_2017-06-23_11-24-15PM.log
CRS service brought down successfully on home /u01/app/grid/product/12.2.0/grid
Performing prepatch operation on home /u01/app/oracle/product/12.2.0/db_1
Perpatch operation completed successfully on home /u01/app/oracle/product/12.2.0/db_1
Start applying binary patch on home /u01/app/oracle/product/12.2.0/db_1
Binary patch applied successfully on home /u01/app/oracle/product/12.2.0/db_1
Performing postpatch operation on home /u01/app/oracle/product/12.2.0/db_1
Postpatch operation completed successfully on home /u01/app/oracle/product/12.2.0/db_1
Start applying binary patch on home /u01/app/grid/product/12.2.0/grid
Binary patch applied successfully on home /u01/app/grid/product/12.2.0/grid
Starting CRS service on home /u01/app/grid/product/12.2.0/grid
Postpatch operation log file location: /u01/app/grid/base/crsdata/rac2/crsconfig/crspatch_rac2_2017-06-23_11-32-24PM.log
CRS service started successfully on home /u01/app/grid/product/12.2.0/grid
Preparing home /u01/app/oracle/product/12.2.0/db_1 after database service restarted
No step execution required.........
Prepared home /u01/app/oracle/product/12.2.0/db_1 successfully after database service restarted
Trying to apply SQL patch on home /u01/app/oracle/product/12.2.0/db_1
SQL patch applied successfully on home /u01/app/oracle/product/12.2.0/db_1
OPatchAuto 成功。
--------------------------------Summary--------------------------------
Patching is completed successfully. Please find the summary as follows:
Host:rac2
RAC Home:/u01/app/oracle/product/12.2.0/db_1
Summary:
==Following patches were SUCCESSFULLY applied:
Patch: /u01/setup/26129945/26187629
Log: /u01/app/oracle/product/12.2.0/db_1/cfgtoollogs/opatchauto/core/opatch/opatch2017-06-23_23-25-53下午_1.log
Patch: /u01/setup/26129945/25983138
Log: /u01/app/oracle/product/12.2.0/db_1/cfgtoollogs/opatchauto/core/opatch/opatch2017-06-23_23-25-53下午_1.log
Host:rac2
CRS Home:/u01/app/grid/product/12.2.0/grid
Summary:
==Following patches were SUCCESSFULLY applied:
Patch: /u01/setup/26129945/26187629
Log: /u01/app/grid/product/12.2.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2017-06-23_23-28-15下午_1.log
Patch: /u01/setup/26129945/25983138
Log: /u01/app/grid/product/12.2.0/grid/cfgtoollogs/opatchauto/core/opatch/opatch2017-06-23_23-28-15下午_1.log
OPatchauto session completed at Fri Jun 23 23:43:04 2017
Time taken to complete the session 24 minutes, 39 seconds
-------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------
3.验证dbbp补丁的安装情况
3.1 grid instr 的补丁情况
----------
[root@rac2 setup]# su - grid
上一次登录:五 6月 23 23:36:13 CST 2017
[grid@rac2 ~]$ $ORACLE_HOME/OPatch/opatch lsinventory
Oracle 中间补丁程序安装程序版本 12.2.0.1.9
版权所有 (c) 2017, Oracle Corporation。保留所有权利。
Oracle Home : /u01/app/grid/product/12.2.0/grid
Central Inventory : /u01/app/grid/oraInventory
from : /u01/app/grid/product/12.2.0/grid/oraInst.loc
OPatch version : 12.2.0.1.9
OUI version : 12.2.0.1.4
Log file location : /u01/app/grid/product/12.2.0/grid/cfgtoollogs/opatch/opatch2017-06-24_00-07-50上午_1.log
Lsinventory Output file location : /u01/app/grid/product/12.2.0/grid/cfgtoollogs/opatch/lsinv/lsinventory2017-06-24_00-07-50上午.txt
--------------------------------------------------------------------------------
Local Machine Information::
Hostname: rac2
ARU platform id: 226
ARU platform description:: Linux x86-64
已安装的顶级产品 (1):
Oracle Grid Infrastructure 12c 12.2.0.1.0
此 Oracle 主目录中已安装 1 个产品。
中间补丁程序 (2) :
Patch 25983138 : applied on Fri Jun 23 23:31:45 CST 2017
Unique Patch ID: 21358214
Patch description: "DATABASE BUNDLE PATCH: 12.2.0.1.170620 (25983138)"
Created on 18 Jun 2017, 23:01:52 hrs PST8PDT
Bugs fixed:
23026585, 24336249, 24929210, 24942749, 25036474, 25110233, 25410877
25417050, 25427662, 25459958, 25547901, 25569149, 25600342, 25600421
25606091, 25655390, 25662088, 24385983, 24923215, 25099758, 25429959
25662101, 25728085, 25823754, 22594071, 23665623, 23749454, 24326846
24334708, 24560906, 24573817, 24578797, 24609996, 24624166, 24668398
24674955, 24744686, 24811725, 24827228, 24831514, 24908321, 24976007
25184555, 25210499, 25211628, 25223839, 25262869, 25316758, 25337332
25455795, 25457409, 25539063, 25546608, 25612095, 25643931, 25410017
Patch 26187629 : applied on Fri Jun 23 23:31:05 CST 2017
Unique Patch ID: 21321114
Patch description: "OCW Patch Set Update : 12.2.0.1.170620 (26187629)"
Created on 19 Jun 2017, 22:04:13 hrs PST8PDT
Bugs fixed:
25832312, 25591658, 25537905, 24451580, 24665035, 25646592, 25025157
24732650, 24664849, 24584419, 24423011, 24796183, 20559126, 25197395
26144044
--------------------------------------------------------------------------------
OPatch succeeded.
[grid@rac2 ~]$
3.2 db home 的补丁安装情况
[root@rac2 setup]# su - oracle
上一次登录:五 6月 23 23:36:20 CST 2017
[oracle@rac2 ~]$ $ORACLE_HOME/OPatch/opatch lsinventory
Oracle 中间补丁程序安装程序版本 12.2.0.1.9
版权所有 (c) 2017, Oracle Corporation。保留所有权利。
Oracle Home : /u01/app/oracle/product/12.2.0/db_1
Central Inventory : /u01/app/grid/oraInventory
from : /u01/app/oracle/product/12.2.0/db_1/oraInst.loc
OPatch version : 12.2.0.1.9
OUI version : 12.2.0.1.4
Log file location : /u01/app/oracle/product/12.2.0/db_1/cfgtoollogs/opatch/opatch2017-06-24_00-10-07上午_1.log
Lsinventory Output file location : /u01/app/oracle/product/12.2.0/db_1/cfgtoollogs/opatch/lsinv/lsinventory2017-06-24_00-10-07上午.txt
--------------------------------------------------------------------------------
Local Machine Information::
Hostname: rac2
ARU platform id: 226
ARU platform description:: Linux x86-64
已安装的顶级产品 (1):
Oracle Database 12c 12.2.0.1.0
此 Oracle 主目录中已安装 1 个产品。
中间补丁程序 (2) :
Patch 25983138 : applied on Fri Jun 23 23:27:21 CST 2017
Unique Patch ID: 21358214
Patch description: "DATABASE BUNDLE PATCH: 12.2.0.1.170620 (25983138)"
Created on 18 Jun 2017, 23:01:52 hrs PST8PDT
Bugs fixed:
23026585, 24336249, 24929210, 24942749, 25036474, 25110233, 25410877
25417050, 25427662, 25459958, 25547901, 25569149, 25600342, 25600421
25606091, 25655390, 25662088, 24385983, 24923215, 25099758, 25429959
25662101, 25728085, 25823754, 22594071, 23665623, 23749454, 24326846
24334708, 24560906, 24573817, 24578797, 24609996, 24624166, 24668398
24674955, 24744686, 24811725, 24827228, 24831514, 24908321, 24976007
25184555, 25210499, 25211628, 25223839, 25262869, 25316758, 25337332
25455795, 25457409, 25539063, 25546608, 25612095, 25643931, 25410017
Patch 26187629 : applied on Fri Jun 23 23:26:24 CST 2017
Unique Patch ID: 21321114
Patch description: "OCW Patch Set Update : 12.2.0.1.170620 (26187629)"
Created on 19 Jun 2017, 22:04:13 hrs PST8PDT
Bugs fixed:
25832312, 25591658, 25537905, 24451580, 24665035, 25646592, 25025157
24732650, 24664849, 24584419, 24423011, 24796183, 20559126, 25197395
26144044
--------------------------------------------------------------------------------
OPatch succeeded.
[oracle@rac2 ~]$
3.3 sql patch情况
opatchauto 自动会去调用sql应用.安装完成后,可以通过 dba_registry_sqlpatch 数据字典查询:
SQL> select PATCH_ID,VERSION,ACTION,STATUS,ACTION_TIME,DESCRIPTION,BUNDLE_SERIES from dba_registry_sqlpatch;
PATCH_ID VERSION ACTION STATUS ACTION_TIME DESCRIPTION BUNDLE_SERIES
---------- ---------- ---------- ---------- ------------------------------ ------------------------------ ---------------
25983138 12.2.0.1 APPLY SUCCESS 23-JUN-17 11.42.46.446670 PM DATABASE BUNDLE PATCH 12.2.0.1 DBBP
|