重庆思庄Oracle、Redhat认证学习论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 2446|回复: 0
打印 上一主题 下一主题

在oracle 12c rac 12.2.0.1安装 dbbp 12.2.0.1.170620步骤

[复制链接]
跳转到指定楼层
楼主
发表于 2017-6-24 00:19:35 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
本帖最后由 郑全 于 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 version
1.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/26187629
  • For 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:

    • Create file /tmp/patch_list_gihome.txt with the following content:
      % cat /tmp/patch_list_gihome.txt/u01/setup/26129945/26187629/u01/setup/26129945/25983138
    • Run the opatch command to check if enough free space is available in the Grid Infrastructure Home:
      % $ORACLE_HOME/OPatch/opatch prereq CheckSystemSpace -phBaseFile /tmp/patch_list_gihome.txt
  • For Database home, as home user:

    • Create file /tmp/patch_list_dbhome.txt with the following content:
      % cat /tmp/patch_list_dbhome.txt/u01/setup/26129945/26187629/u01/setup/26129945/25983138
    • Run opatch command to check if enough free space is available in the Database Home:
      % $ORACLE_HOME/OPatch/opatch prereq CheckSystemSpace -phBaseFile /tmp/patch_list_dbhome.txt

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



分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 支持支持 反对反对
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|手机版|小黑屋|重庆思庄Oracle、Redhat认证学习论坛 ( 渝ICP备12004239号-4 )

GMT+8, 2024-11-1 11:29 , Processed in 0.084785 second(s), 19 queries .

重庆思庄学习中心论坛-重庆思庄科技有限公司论坛

© 2001-2020

快速回复 返回顶部 返回列表