ORACLE12.2 RAC+DG(2+1) RU patch步骤

1.patch list

H9X4PzZWDBVrtThWAAAAAElFTkSuQmCC


2.opatch 升级

根据文档要求下载工具,安装在RAC+DG 中


3.在DG(single instance)端安装RU27105253

*如果DG端为RAC结构,则直接patch27100009即可

(1).添加环境变量

export PATH=$PATH:/usr/ccs/bin

(2).One-off Patch Conflict Detection


点击(此处)折叠或打开

  1. $unzip p27105253_122010_Linux-x86-64.zip
  2. $cd 27105253/
  3. $ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -ph ./
  4. Oracle Interim Patch Installer version 12.2.0.1.12
  5. Copyright (c) 2018, Oracle Corporation. All rights reserved.
  6. PREREQ session
  7. Oracle Home : /oracle/app/oracle/product/12.2.0.1/db_1
  8. Central Inventory : /oracle/app/oraInventory
  9. from : /oracle/app/oracle/product/12.2.0.1/db_1/oraInst.loc
  10. OPatch version : 12.2.0.1.12
  11. OUI version : 12.2.0.1.4
  12. Log file location : /oracle/app/oracle/product/12.2.0.1/db_1/cfgtoollogs/opatch/opatch2018-02-12_15-10-29PM_1.log
  13. Invoking prereq "checkconflictagainstohwithdetail"
  14. Prereq "checkConflictAgainstOHWithDetail" passed.
  15. OPatch succeeded.


*如果存在冲突,请参考文档Database Patch Conflict Resolution (文档 ID 1321267.1)或联系ORACLE SURPORT

(3).patch 安装

a.disable redo transportation at primary db

alter system set log_archive_dest_state_2=defer scope=both sid='*';


b.shutdown物理备库和listener


点击(此处)折叠或打开

  1. SQL> shutdown immediate
  2. Database closed.
  3. Database dismounted.
  4. ORACLE instance shut down.
  5. $lsnrctl stop


c.opatch apply

点击(此处)折叠或打开

  1. [oracle@racdg:/tmp/wwj/27105253]$$ORACLE_HOME/OPatch/opatch apply
  2. Oracle Interim Patch Installer version 12.2.0.1.12
  3. Copyright (c) 2018, Oracle Corporation. All rights reserved.
  4. Oracle Home : /oracle/app/oracle/product/12.2.0.1/db_1
  5. Central Inventory : /oracle/app/oraInventory
  6. from : /oracle/app/oracle/product/12.2.0.1/db_1/oraInst.loc
  7. OPatch version : 12.2.0.1.12
  8. OUI version : 12.2.0.1.4
  9. Log file location : /oracle/app/oracle/product/12.2.0.1/db_1/cfgtoollogs/opatch/opatch2018-02-12_16-09-50PM_1.log
  10. Verifying environment and performing prerequisite checks...
  11. OPatch continues with these patches: 27105253
  12. Do you want to proceed? [y|n]
  13. y
  14. User Responded with: Y
  15. All checks passed.
  16. Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
  17. (Oracle Home = '/oracle/app/oracle/product/12.2.0.1/db_1')
  18. Is the local system ready for patching? [y|n]
  19. y
  20. User Responded with: Y
  21. Backing up files...
  22. Applying interim patch '27105253' to OH '/oracle/app/oracle/product/12.2.0.1/db_1'
  23. ApplySession: Optional component(s) [ oracle.has.crs, 12.2.0.1.0 ] , [ oracle.ons.daemon, 12.2.0.1.0 ] , [ oracle.network.cman, 12.2.0.1.0 ] not present in the Oracle Home or a higher version is found.
  24. Patching component oracle.network.rsf, 12.2.0.1.0...
  25. Patching component oracle.rdbms.deconfig, 12.2.0.1.0...
  26. Patching component oracle.tfa, 12.2.0.1.0...
  27. Patching component oracle.rdbms, 12.2.0.1.0...
  28. Patching component oracle.rdbms.util, 12.2.0.1.0...
  29. Patching component oracle.rdbms.dbscripts, 12.2.0.1.0...
  30. Patching component oracle.xdk.parser.java, 12.2.0.1.0...
  31. Patching component oracle.has.deconfig, 12.2.0.1.0...
  32. Patching component oracle.xdk.rsf, 12.2.0.1.0...
  33. Patching component oracle.ctx.rsf, 12.2.0.1.0...
  34. Patching component oracle.rdbms.rman, 12.2.0.1.0...
  35. Patching component oracle.rdbms.dv, 12.2.0.1.0...
  36. Patching component oracle.rdbms.oci, 12.2.0.1.0...
  37. Patching component oracle.rdbms.crs, 12.2.0.1.0...
  38. Patching component oracle.precomp.common, 12.2.0.1.0...
  39. Patching component oracle.oracore.rsf, 12.2.0.1.0...
  40. Patching component oracle.ctx, 12.2.0.1.0...
  41. Patching component oracle.xdk, 12.2.0.1.0...
  42. Patching component oracle.nlsrtl.rsf, 12.2.0.1.0...
  43. Patching component oracle.rdbms.rsf, 12.2.0.1.0...
  44. Patching component oracle.ons, 12.2.0.1.0...
  45. Patching component oracle.rdbms.lbac, 12.2.0.1.0...
  46. Patching component oracle.precomp.lang, 12.2.0.1.0...
  47. Patching component oracle.rdbms.rsf.ic, 12.2.0.1.0...
  48. Patching component oracle.sdo, 12.2.0.1.0...
  49. Patch 27105253 successfully applied.
  50. Log file location: /oracle/app/oracle/product/12.2.0.1/db_1/cfgtoollogs/opatch/opatch2018-02-12_16-09-50PM_1.log
  51. OPatch succeeded.

d.打开listener和standby db至mount状态

点击(此处)折叠或打开

  1. $lsnrctl start
  2. SQL> startup mount
  3. SQL> alter database recover managed standby database using current logfile disconnect;

e.验证standby db patch结果

- Convert the standby database into a snapshot standby

<1>.stop redo apply

alter database recover managed standby database cancel;

<2>.Ensure that the database is mounted, but not open

<3>.Ensure that a fast recovery area has been configured. It is not necessary for flashback database to be enabled.

alter system set db_recovery_file_dest_size=6g scope=both;

alter system set db_recovery_file_dest='/arch/flash_area' scope=both;

<4>.perform the conversion

ALTER DATABASE CONVERT TO SNAPSHOT STANDBY;


- Perform any required SQL installation steps for the patch on the snapshot standby.

<1>.读写方式打开DB

ALTER DATABASE OPEN READ WRITE;

<2>. Loading Modified SQL Files into the Database

点击(此处)折叠或打开

  1. $./datapatch -verbose
  2. SQL Patching tool version 12.2.0.1.0 Production on Tue Feb 13 09:14:52 2018
  3. Copyright (c) 2012, 2017, Oracle. All rights reserved.
  4. Log file for this invocation: /oracle/app/oracle/cfgtoollogs/sqlpatch/sqlpatch_62762_2018_02_13_09_14_52/sqlpatch_invocation.log
  5. Connecting to database...OK
  6. Bootstrapping registry and package to current versions...done
  7. Determining current state...done
  8. Current state of SQL patches:
  9. Bundle series DBRU:
  10. ID 180116 in the binary registry and not installed in the SQL registry
  11. Adding patches to installation queue and performing prereq checks...
  12. Installation queue:
  13. Nothing to roll back
  14. The following patches will be applied:
  15. 27105253 (DATABASE RELEASE UPDATE 12.2.0.1.180116)
  16. Installing patches...
  17. Patch installation complete. Total patches installed: 1
  18. Validating logfiles...
  19. Patch 27105253 apply: SUCCESS
  20. logfile: /oracle/app/oracle/cfgtoollogs/sqlpatch/27105253/21862470/27105253_apply_RACDB12C_2018Feb13_09_15_25.log (no errors)
  21. SQL Patching tool complete on Tue Feb 13 09:19:39 2018

<3>.验证

select * from dba_registry_sqlpatch;
select * from dba_registry_history;

<4>.Use Oracle Real Application Testing to evaluate stability and performance of the new software using real application workload.


- Converting a Snapshot Standby Database into a Physical Standby Database

<1>.Ensure that the database is mounted, but not open.

<2>.转换回PHYSICAL STANDBY

ALTER DATABASE CONVERT TO PHYSICAL STANDBY;

<3>.验证

select OPEN_MODE,PROTECTION_MODE,ACTIVATION#,DATABASE_ROLE,SWITCHOVER#,SWITCHOVER_STATUS FROM V$DATABASE;

role=PHYSICAL STANDBY

SQL> select * from dba_registry_sqlpatch;

no rows selected


4.在PRIMARY(rac)端安装RU27100009

(1).Patch Installation Prerequisites

a.check the consistency of inventory information for GI home and each database home to be patched

$ /OPatch/opatch lsinventory -detail -oh

* grid用户和oracle用户都要运行,结果OPatch succeeded,将输出结果进行保存


b.unzip patch

创建NFS共享目录/patch_share,将patch unzip至共享目录


c.Run OPatch Conflict Check

点击(此处)折叠或打开

  1. For Grid Infrastructure Home, as grid user:
  2. [grid@rac1:/home/grid]$$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /patch_share/27100009/27105253
  3. Oracle Interim Patch Installer version 12.2.0.1.12
  4. Copyright (c) 2018, Oracle Corporation. All rights reserved.
  5. PREREQ session
  6. Oracle Home : /oracle/app/12.2.0.1/grid
  7. Central Inventory : /oracle/app/oraInventory
  8. from : /oracle/app/12.2.0.1/grid/oraInst.loc
  9. OPatch version : 12.2.0.1.12
  10. OUI version : 12.2.0.1.4
  11. Log file location : /oracle/app/12.2.0.1/grid/cfgtoollogs/opatch/opatch2018-02-13_15-24-27PM_1.log
  12. Invoking prereq "checkconflictagainstohwithdetail"
  13. Prereq "checkConflictAgainstOHWithDetail" passed.
  14. OPatch succeeded.
  15. [grid@rac1:/home/grid]$$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /patch_share/27100009/27335416
  16. Oracle Interim Patch Installer version 12.2.0.1.12
  17. Copyright (c) 2018, Oracle Corporation. All rights reserved.
  18. PREREQ session
  19. Oracle Home : /oracle/app/12.2.0.1/grid
  20. Central Inventory : /oracle/app/oraInventory
  21. from : /oracle/app/12.2.0.1/grid/oraInst.loc
  22. OPatch version : 12.2.0.1.12
  23. OUI version : 12.2.0.1.4
  24. Log file location : /oracle/app/12.2.0.1/grid/cfgtoollogs/opatch/opatch2018-02-13_15-24-48PM_1.log
  25. Invoking prereq "checkconflictagainstohwithdetail"
  26. Prereq "checkConflictAgainstOHWithDetail" passed.
  27. OPatch succeeded.
  28. [grid@rac1:/home/grid]$$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /patch_share/27100009/27128906
  29. Oracle Interim Patch Installer version 12.2.0.1.12
  30. Copyright (c) 2018, Oracle Corporation. All rights reserved.
  31. PREREQ session
  32. Oracle Home : /oracle/app/12.2.0.1/grid
  33. Central Inventory : /oracle/app/oraInventory
  34. from : /oracle/app/12.2.0.1/grid/oraInst.loc
  35. OPatch version : 12.2.0.1.12
  36. OUI version : 12.2.0.1.4
  37. Log file location : /oracle/app/12.2.0.1/grid/cfgtoollogs/opatch/opatch2018-02-13_15-25-02PM_1.log
  38. Invoking prereq "checkconflictagainstohwithdetail"
  39. Prereq "checkConflictAgainstOHWithDetail" passed.
  40. OPatch succeeded.
  41. [grid@rac1:/home/grid]$$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /patch_share/27100009/26839277
  42. Oracle Interim Patch Installer version 12.2.0.1.12
  43. Copyright (c) 2018, Oracle Corporation. All rights reserved.
  44. PREREQ session
  45. Oracle Home : /oracle/app/12.2.0.1/grid
  46. Central Inventory : /oracle/app/oraInventory
  47. from : /oracle/app/12.2.0.1/grid/oraInst.loc
  48. OPatch version : 12.2.0.1.12
  49. OUI version : 12.2.0.1.4
  50. Log file location : /oracle/app/12.2.0.1/grid/cfgtoollogs/opatch/opatch2018-02-13_15-25-16PM_1.log
  51. Invoking prereq "checkconflictagainstohwithdetail"
  52. Prereq "checkConflictAgainstOHWithDetail" passed.
  53. OPatch succeeded.
  54. [grid@rac1:/home/grid]$$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /patch_share/27100009/27144050
  55. Oracle Interim Patch Installer version 12.2.0.1.12
  56. Copyright (c) 2018, Oracle Corporation. All rights reserved.
  57. PREREQ session
  58. Oracle Home : /oracle/app/12.2.0.1/grid
  59. Central Inventory : /oracle/app/oraInventory
  60. from : /oracle/app/12.2.0.1/grid/oraInst.loc
  61. OPatch version : 12.2.0.1.12
  62. OUI version : 12.2.0.1.4
  63. Log file location : /oracle/app/12.2.0.1/grid/cfgtoollogs/opatch/opatch2018-02-13_15-25-30PM_1.log
  64. Invoking prereq "checkconflictagainstohwithdetail"
  65. Prereq "checkConflictAgainstOHWithDetail" passed.
  66. OPatch succeeded.

点击(此处)折叠或打开

  1. For Database home, as home user:
  2. [oracle@rac1:/home/oracle]$$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /patch_share/27100009/27105253
  3. Oracle Interim Patch Installer version 12.2.0.1.12
  4. Copyright (c) 2018, Oracle Corporation. All rights reserved.
  5. PREREQ session
  6. Oracle Home : /oracle/app/oracle/product/12.2.0.1/db_1
  7. Central Inventory : /oracle/app/oraInventory
  8. from : /oracle/app/oracle/product/12.2.0.1/db_1/oraInst.loc
  9. OPatch version : 12.2.0.1.12
  10. OUI version : 12.2.0.1.4
  11. Log file location : /oracle/app/oracle/product/12.2.0.1/db_1/cfgtoollogs/opatch/opatch2018-02-13_15-29-40PM_1.log
  12. Invoking prereq "checkconflictagainstohwithdetail"
  13. Prereq "checkConflictAgainstOHWithDetail" passed.
  14. OPatch succeeded.
  15. [oracle@rac1:/home/oracle]$$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /patch_share/27100009/27335416
  16. Oracle Interim Patch Installer version 12.2.0.1.12
  17. Copyright (c) 2018, Oracle Corporation. All rights reserved.
  18. PREREQ session
  19. Oracle Home : /oracle/app/oracle/product/12.2.0.1/db_1
  20. Central Inventory : /oracle/app/oraInventory
  21. from : /oracle/app/oracle/product/12.2.0.1/db_1/oraInst.loc
  22. OPatch version : 12.2.0.1.12
  23. OUI version : 12.2.0.1.4
  24. Log file location : /oracle/app/oracle/product/12.2.0.1/db_1/cfgtoollogs/opatch/opatch2018-02-13_15-29-54PM_1.log
  25. Invoking prereq "checkconflictagainstohwithdetail"
  26. Prereq "checkConflictAgainstOHWithDetail" passed.
  27. OPatch succeeded.

d.Run OPatch SystemSpace Check

点击(此处)折叠或打开

  1. For Grid Infrastructure Home, as home user:
  2. vi /tmp/patch_list_gihome.txt
  3. /patch_share/27100009/27144050
  4. /patch_share/27100009/26839277
  5. /patch_share/27100009/27128906
  6. /patch_share/27100009/27335416
  7. /patch_share/27100009/27105253
  8. [grid@rac1:/home/grid]$$ORACLE_HOME/OPatch/opatch prereq CheckSystemSpace -phBaseFile /tmp/patch_list_gihome.txt
  9. Oracle Interim Patch Installer version 12.2.0.1.12
  10. Copyright (c) 2018, Oracle Corporation. All rights reserved.
  11. PREREQ session
  12. Oracle Home : /oracle/app/12.2.0.1/grid
  13. Central Inventory : /oracle/app/oraInventory
  14. from : /oracle/app/12.2.0.1/grid/oraInst.loc
  15. OPatch version : 12.2.0.1.12
  16. OUI version : 12.2.0.1.4
  17. Log file location : /oracle/app/12.2.0.1/grid/cfgtoollogs/opatch/opatch2018-02-13_15-40-21PM_1.log
  18. Invoking prereq "checksystemspace"
  19. Prereq "checkSystemSpace" passed.
  20. OPatch succeeded.


点击(此处)折叠或打开

  1. For Database home, as home user:
  2. vi /tmp/patch_list_dbhome.txt
  3. /patch_share/27100009/27335416
  4. /patch_share/27100009/27105253
  5. [oracle@rac1:/home/oracle]$$ORACLE_HOME/OPatch/opatch prereq CheckSystemSpace -phBaseFile /tmp/patch_list_dbhome.txt
  6. Oracle Interim Patch Installer version 12.2.0.1.12
  7. Copyright (c) 2018, Oracle Corporation. All rights reserved.
  8. PREREQ session
  9. Oracle Home : /oracle/app/oracle/product/12.2.0.1/db_1
  10. Central Inventory : /oracle/app/oraInventory
  11. from : /oracle/app/oracle/product/12.2.0.1/db_1/oraInst.loc
  12. OPatch version : 12.2.0.1.12
  13. OUI version : 12.2.0.1.4
  14. Log file location : /oracle/app/oracle/product/12.2.0.1/db_1/cfgtoollogs/opatch/opatch2018-02-13_15-45-46PM_1.log
  15. Invoking prereq "checksystemspace"
  16. Prereq "checkSystemSpace" passed.
  17. OPatch succeeded.

(2).opatchauto(所有node执行相同步骤)

* rolling patch 时DG端保持ADG模式,non-rolling patch时DG端保持mount状态并开启MRP。

本次采用non-rolling patch,先关闭database

a.patch GI

点击(此处)折叠或打开

  1. <1>.# export PATH=$PATH:/oracle/app/12.2.0.1/grid/OPatch
  2. <2>.
  3. [root@rac1 patch_share]# opatchauto apply /patch_share/27100009 -oh /oracle/app/12.2.0.1/grid
  4. OPatchauto session is initiated at Tue Feb 13 16:28:59 2018
  5. System initialization log file is /oracle/app/12.2.0.1/grid/cfgtoollogs/opatchautodb/systemconfig2018-02-13_04-29-14PM.log.
  6. Session log file is /oracle/app/12.2.0.1/grid/cfgtoollogs/opatchauto/opatchauto2018-02-13_04-30-19PM.log
  7. The id for this session is LEAJ
  8. Executing OPatch prereq operations to verify patch applicability on home /oracle/app/12.2.0.1/grid
  9. Patch applicability verified successfully on home /oracle/app/12.2.0.1/grid
  10. Bringing down CRS service on home /oracle/app/12.2.0.1/grid
  11. Prepatch operation log file location: /oracle/app/grid/crsdata/rac1/crsconfig/crspatch_rac1_2018-02-13_04-33-09PM.log
  12. CRS service brought down successfully on home /oracle/app/12.2.0.1/grid
  13. Start applying binary patch on home /oracle/app/12.2.0.1/grid
  14. Binary patch applied successfully on home /oracle/app/12.2.0.1/grid
  15. Starting CRS service on home /oracle/app/12.2.0.1/grid
  16. Postpatch operation log file location: /oracle/app/grid/crsdata/rac1/crsconfig/crspatch_rac1_2018-02-13_04-52-32PM.log
  17. CRS service started successfully on home /oracle/app/12.2.0.1/grid
  18. OPatchAuto successful.
  19. --------------------------------Summary--------------------------------
  20. Patching is completed successfully. Please find the summary as follows:
  21. Host:rac1
  22. CRS Home:/oracle/app/12.2.0.1/grid
  23. Summary:
  24. ==Following patches were SUCCESSFULLY applied:
  25. Patch: /patch_share/27100009/26839277
  26. Log: /oracle/app/12.2.0.1/grid/cfgtoollogs/opatchauto/core/opatch/opatch2018-02-13_16-35-36PM_1.log
  27. Patch: /patch_share/27100009/27105253
  28. Log: /oracle/app/12.2.0.1/grid/cfgtoollogs/opatchauto/core/opatch/opatch2018-02-13_16-35-36PM_1.log
  29. Patch: /patch_share/27100009/27128906
  30. Log: /oracle/app/12.2.0.1/grid/cfgtoollogs/opatchauto/core/opatch/opatch2018-02-13_16-35-36PM_1.log
  31. Patch: /patch_share/27100009/27144050
  32. Log: /oracle/app/12.2.0.1/grid/cfgtoollogs/opatchauto/core/opatch/opatch2018-02-13_16-35-36PM_1.log
  33. Patch: /patch_share/27100009/27335416
  34. Log: /oracle/app/12.2.0.1/grid/cfgtoollogs/opatchauto/core/opatch/opatch2018-02-13_16-35-36PM_1.log
  35. OPatchauto session completed at Tue Feb 13 16:58:24 2018
  36. Time taken to complete the session 29 minutes, 26 seconds

b.patch DB_HOME

点击(此处)折叠或打开

  1. # /oracle/app/oracle/product/12.2.0.1/db_1/OPatch/opatchauto apply /patch_share/27100009 -oh /oracle/app/oracle/product/12.2.0.1/db_1
  2. [root@rac1 ~]# /oracle/app/oracle/product/12.2.0.1/db_1/OPatch/opatchauto apply /patch_share/27100009 -oh /oracle/app/oracle/product/12.2.0.1/db_1
  3. OPatchauto session is initiated at Wed Feb 14 16:17:57 2018
  4. System initialization log file is /oracle/app/oracle/product/12.2.0.1/db_1/cfgtoollogs/opatchautodb/systemconfig2018-02-14_04-18-11PM.log.
  5. Session log file is /oracle/app/oracle/product/12.2.0.1/db_1/cfgtoollogs/opatchauto/opatchauto2018-02-14_04-18-51PM.log
  6. The id for this session is JAYC
  7. Executing OPatch prereq operations to verify patch applicability on home /oracle/app/oracle/product/12.2.0.1/db_1
  8. Patch applicability verified successfully on home /oracle/app/oracle/product/12.2.0.1/db_1
  9. Verifying SQL patch applicability on home /oracle/app/oracle/product/12.2.0.1/db_1
  10. SQL patch applicability verified successfully on home /oracle/app/oracle/product/12.2.0.1/db_1
  11. Preparing to bring down database service on home /oracle/app/oracle/product/12.2.0.1/db_1
  12. Successfully prepared home /oracle/app/oracle/product/12.2.0.1/db_1 to bring down database service
  13. Bringing down database service on home /oracle/app/oracle/product/12.2.0.1/db_1
  14. Database service successfully brought down on home /oracle/app/oracle/product/12.2.0.1/db_1
  15. Performing prepatch operation on home /oracle/app/oracle/product/12.2.0.1/db_1
  16. Perpatch operation completed successfully on home /oracle/app/oracle/product/12.2.0.1/db_1
  17. Start applying binary patch on home /oracle/app/oracle/product/12.2.0.1/db_1
  18. Binary patch applied successfully on home /oracle/app/oracle/product/12.2.0.1/db_1
  19. Performing postpatch operation on home /oracle/app/oracle/product/12.2.0.1/db_1
  20. Postpatch operation completed successfully on home /oracle/app/oracle/product/12.2.0.1/db_1
  21. Starting database service on home /oracle/app/oracle/product/12.2.0.1/db_1
  22. Database service successfully started on home /oracle/app/oracle/product/12.2.0.1/db_1
  23. Preparing home /oracle/app/oracle/product/12.2.0.1/db_1 after database service restarted
  24. No step execution required.........
  25. Prepared home /oracle/app/oracle/product/12.2.0.1/db_1 successfully after database service restarted
  26. Trying to apply SQL patch on home /oracle/app/oracle/product/12.2.0.1/db_1
  27. SQL patch applied successfully on home /oracle/app/oracle/product/12.2.0.1/db_1
  28. OPatchAuto successful.
  29. --------------------------------Summary--------------------------------
  30. Patching is completed successfully. Please find the summary as follows:
  31. Host:rac1
  32. RAC Home:/oracle/app/oracle/product/12.2.0.1/db_1
  33. Summary:
  34. ==Following patches were SKIPPED:
  35. Patch: /patch_share/27100009/27128906
  36. Reason: This patch is not applicable to this specified target type - "rac_database"
  37. Patch: /patch_share/27100009/26839277
  38. Reason: This patch is not applicable to this specified target type - "rac_database"
  39. Patch: /patch_share/27100009/27144050
  40. Reason: This patch is not applicable to this specified target type - "rac_database"
  41. ==Following patches were SUCCESSFULLY applied:
  42. Patch: /patch_share/27100009/27105253
  43. Log: /oracle/app/oracle/product/12.2.0.1/db_1/cfgtoollogs/opatchauto/core/opatch/opatch2018-02-14_16-19-45PM_1.log
  44. Patch: /patch_share/27100009/27335416
  45. Log: /oracle/app/oracle/product/12.2.0.1/db_1/cfgtoollogs/opatchauto/core/opatch/opatch2018-02-14_16-19-45PM_1.log
  46. Patching session reported following warning(s):
  47. _________________________________________________
  48. [WARNING] The database instance 'racdb12c1' from '/oracle/app/oracle/product/12.2.0.1/db_1', in host'rac1' is not running. SQL changes, if any, will not be applied.
  49. To apply. the SQL changes, bring up the database instance and run the command manually from any one node (run as oracle).
  50. Refer to the readme to get the correct steps for applying the sql changes.
  51. OPatchauto session completed at Wed Feb 14 16:23:41 2018
  52. Time taken to complete the session 5 minutes, 46 seconds

c.在其他节点重复a,b步骤

点击(此处)折叠或打开

  1. [root@rac2 patch_share]# export PATH=$PATH:/oracle/app/12.2.0.1/grid/OPatch
  2. [root@rac2 patch_share]# opatchauto apply /patch_share/27100009 -oh /oracle/app/12.2.0.1/grid
  3. OPatchauto session is initiated at Thu Feb 15 08:28:27 2018
  4. System initialization log file is /oracle/app/12.2.0.1/grid/cfgtoollogs/opatchautodb/systemconfig2018-02-15_08-29-54AM.log.
  5. Session log file is /oracle/app/12.2.0.1/grid/cfgtoollogs/opatchauto/opatchauto2018-02-15_08-31-26AM.log
  6. The id for this session is XN8U
  7. Executing OPatch prereq operations to verify patch applicability on home /oracle/app/12.2.0.1/grid
  8. Patch applicability verified successfully on home /oracle/app/12.2.0.1/grid
  9. Bringing down CRS service on home /oracle/app/12.2.0.1/grid
  10. Prepatch operation log file location: /oracle/app/grid/crsdata/rac2/crsconfig/crspatch_rac2_2018-02-15_08-36-39AM.log
  11. CRS service brought down successfully on home /oracle/app/12.2.0.1/grid
  12. Start applying binary patch on home /oracle/app/12.2.0.1/grid
  13. Binary patch applied successfully on home /oracle/app/12.2.0.1/grid
  14. Starting CRS service on home /oracle/app/12.2.0.1/grid
  15. Postpatch operation log file location: /oracle/app/grid/crsdata/rac2/crsconfig/crspatch_rac2_2018-02-15_08-54-58AM.log
  16. CRS service started successfully on home /oracle/app/12.2.0.1/grid
  17. OPatchAuto successful.
  18. --------------------------------Summary--------------------------------
  19. Patching is completed successfully. Please find the summary as follows:
  20. Host:rac2
  21. CRS Home:/oracle/app/12.2.0.1/grid
  22. Summary:
  23. ==Following patches were SUCCESSFULLY applied:
  24. Patch: /patch_share/27100009/26839277
  25. Log: /oracle/app/12.2.0.1/grid/cfgtoollogs/opatchauto/core/opatch/opatch2018-02-15_08-37-50AM_1.log
  26. Patch: /patch_share/27100009/27105253
  27. Log: /oracle/app/12.2.0.1/grid/cfgtoollogs/opatchauto/core/opatch/opatch2018-02-15_08-37-50AM_1.log
  28. Patch: /patch_share/27100009/27128906
  29. Log: /oracle/app/12.2.0.1/grid/cfgtoollogs/opatchauto/core/opatch/opatch2018-02-15_08-37-50AM_1.log
  30. Patch: /patch_share/27100009/27144050
  31. Log: /oracle/app/12.2.0.1/grid/cfgtoollogs/opatchauto/core/opatch/opatch2018-02-15_08-37-50AM_1.log
  32. Patch: /patch_share/27100009/27335416
  33. Log: /oracle/app/12.2.0.1/grid/cfgtoollogs/opatchauto/core/opatch/opatch2018-02-15_08-37-50AM_1.log
  34. OPatchauto session completed at Thu Feb 15 09:03:15 2018
  35. Time taken to complete the session 34 minutes, 55 seconds
  36. [root@rac2 patch_share]# /oracle/app/oracle/product/12.2.0.1/db_1/OPatch/opatchauto apply /patch_share/27100009 -oh /oracle/app/oracle/product/12.2.0.1/db_1
  37. OPatchauto session is initiated at Thu Feb 15 09:45:14 2018
  38. System initialization log file is /oracle/app/oracle/product/12.2.0.1/db_1/cfgtoollogs/opatchautodb/systemconfig2018-02-15_09-45-30AM.log.
  39. Session log file is /oracle/app/oracle/product/12.2.0.1/db_1/cfgtoollogs/opatchauto/opatchauto2018-02-15_09-46-21AM.log
  40. The id for this session is JKSC
  41. Executing OPatch prereq operations to verify patch applicability on home /oracle/app/oracle/product/12.2.0.1/db_1
  42. Patch applicability verified successfully on home /oracle/app/oracle/product/12.2.0.1/db_1
  43. Verifying SQL patch applicability on home /oracle/app/oracle/product/12.2.0.1/db_1
  44. SQL patch applicability verified successfully on home /oracle/app/oracle/product/12.2.0.1/db_1
  45. Preparing to bring down database service on home /oracle/app/oracle/product/12.2.0.1/db_1
  46. Successfully prepared home /oracle/app/oracle/product/12.2.0.1/db_1 to bring down database service
  47. Bringing down database service on home /oracle/app/oracle/product/12.2.0.1/db_1
  48. Database service successfully brought down on home /oracle/app/oracle/product/12.2.0.1/db_1
  49. Performing prepatch operation on home /oracle/app/oracle/product/12.2.0.1/db_1
  50. Perpatch operation completed successfully on home /oracle/app/oracle/product/12.2.0.1/db_1
  51. Start applying binary patch on home /oracle/app/oracle/product/12.2.0.1/db_1
  52. Binary patch applied successfully on home /oracle/app/oracle/product/12.2.0.1/db_1
  53. Performing postpatch operation on home /oracle/app/oracle/product/12.2.0.1/db_1
  54. Postpatch operation completed successfully on home /oracle/app/oracle/product/12.2.0.1/db_1
  55. Starting database service on home /oracle/app/oracle/product/12.2.0.1/db_1
  56. Database service successfully started on home /oracle/app/oracle/product/12.2.0.1/db_1
  57. Preparing home /oracle/app/oracle/product/12.2.0.1/db_1 after database service restarted
  58. No step execution required.........
  59. Prepared home /oracle/app/oracle/product/12.2.0.1/db_1 successfully after database service restarted
  60. Trying to apply SQL patch on home /oracle/app/oracle/product/12.2.0.1/db_1
  61. SQL patch applied successfully on home /oracle/app/oracle/product/12.2.0.1/db_1
  62. OPatchAuto successful.
  63. --------------------------------Summary--------------------------------
  64. Patching is completed successfully. Please find the summary as follows:
  65. Host:rac2
  66. RAC Home:/oracle/app/oracle/product/12.2.0.1/db_1
  67. Summary:
  68. ==Following patches were SKIPPED:
  69. Patch: /patch_share/27100009/27128906
  70. Reason: This patch is not applicable to this specified target type - "rac_database"
  71. Patch: /patch_share/27100009/26839277
  72. Reason: This patch is not applicable to this specified target type - "rac_database"
  73. Patch: /patch_share/27100009/27144050
  74. Reason: This patch is not applicable to this specified target type - "rac_database"
  75. ==Following patches were SUCCESSFULLY applied:
  76. Patch: /patch_share/27100009/27105253
  77. Log: /oracle/app/oracle/product/12.2.0.1/db_1/cfgtoollogs/opatchauto/core/opatch/opatch2018-02-15_09-47-26AM_1.log
  78. Patch: /patch_share/27100009/27335416
  79. Log: /oracle/app/oracle/product/12.2.0.1/db_1/cfgtoollogs/opatchauto/core/opatch/opatch2018-02-15_09-47-26AM_1.log
  80. Patching session reported following warning(s):
  81. _________________________________________________
  82. [WARNING] The database instance 'racdb12c2' from '/oracle/app/oracle/product/12.2.0.1/db_1', in host'rac2' is not running. SQL changes, if any, will not be applied.
  83. To apply. the SQL changes, bring up the database instance and run the command manually from any one node (run as oracle).
  84. Refer to the readme to get the correct steps for applying the sql changes.
  85. OPatchauto session completed at Thu Feb 15 09:51:56 2018
  86. Time taken to complete the session 6 minutes, 45 seconds

d.Apply SQL change

<1>.启动instance

srvctl start database -d db_name

<2>.在任一node上运行 datapatch

点击(此处)折叠或打开

  1. $ cd OPatch
  2. $./datapatch -verbose
  3. SQL Patching tool version 12.2.0.1.0 Production on Thu Feb 15 13:03:03 2018
  4. Copyright (c) 2012, 2017, Oracle. All rights reserved.
  5. Log file for this invocation: /oracle/app/oracle/cfgtoollogs/sqlpatch/sqlpatch_84965_2018_02_15_13_03_04/sqlpatch_invocation.log
  6. Connecting to database...OK
  7. Bootstrapping registry and package to current versions...done
  8. Determining current state...done
  9. Current state of SQL patches:
  10. Bundle series DBRU:
  11. ID 180116 in the binary registry and not installed in the SQL registry
  12. Adding patches to installation queue and performing prereq checks...
  13. Installation queue:
  14. Nothing to roll back
  15. The following patches will be applied:
  16. 27105253 (DATABASE RELEASE UPDATE 12.2.0.1.180116)
  17. Installing patches...
  18. Patch installation complete. Total patches installed: 1
  19. Validating logfiles...
  20. Patch 27105253 apply: SUCCESS
  21. logfile: /oracle/app/oracle/cfgtoollogs/sqlpatch/27105253/21862470/27105253_apply_RACDB12C_2018Feb15_13_04_32.log (no errors)
  22. SQL Patching tool complete on Thu Feb 15 13:08:45 2018

<3>.确认状态

确认primar和STD APPLY is "SUCCESS"

select * from dba_registry_sqlpatch;APPLY is "SUCCESS"


e.编译无效对象

$cd $ORACLE_HOME/rdbms/admin

SQL> CONNECT / AS SYSDBA
SQL> @utlrp.sql


相关参考文档:

RU readme

https://support.oracle.com/epmos/faces/DocumentDisplay?_afrLoop=249151180273701&id=1265700.1&_afrWindowMode=0&_adf.ctrl-state=5ay3io5k_63
https://docs.oracle.com/en/database/oracle/oracle-database/12.2/sbydb/managing-oracle-data-guard-physical-standby-databases.html#GUID-36B87563-A971-43B4-8320-52BBA27EE749
https://updates.oracle.com/Orion/Services/download?type=readme&aru=21862470#GUID-578016F3-4DA5-461A-A3E8-E0D75974361E

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

转载于:http://blog.itpub.net/15412087/viewspace-2151094/

你可能感兴趣的:(ORACLE12.2 RAC+DG(2+1) RU patch步骤)