1.准备文件

    2.解压替换OPatch

    1. rm -rf /u01/app/19c/grid/OPatch
    2. unzip /setup/OPATCH19P_2205-70004508.ZIP -d /u01/app/19c/grid/
    3. chown grid:oinstall /u01/app/19c/grid/OPatch -R
    4. rm -rf /u01/app/oracle/product/19c/dbhome_1/OPatch
    5. unzip /setup/OPATCH19P_2205-70004508.ZIP -d /u01/app/oracle/product/19c/dbhome_1
    6. chown oracle:oinstall /u01/app/oracle/product/19c/dbhome_1/OPatch -R

    3.验证已安装补丁

    1. /u01/app/19c/grid/OPatch/opatch lsinventory -detail -oh /u01/app/19c/grid
    2. /u01/app/oracle/product/19c/dbhome_1/OPatch/opatch lsinventory -detail -oh /u01/app/oracle/product/19c/dbhome_1

    4.验证准备安装的补丁

    1. 每个节点执行
    2. cd /setup
    3. unzip GIRU19P_2202-70004508.ZIP
    4. chmod 777 /setup -R
    5. su - grid
    6. /u01/app/19c/grid/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /setup/33509923/33239955
    7. /u01/app/19c/grid/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /setup/33509923/33515361
    8. /u01/app/19c/grid/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /setup/33509923/33529556
    9. /u01/app/19c/grid/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /setup/33509923/33534448
    10. /u01/app/19c/grid/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /setup/33509923/33575402
    11. su - oracle
    12. /u01/app/oracle/product/19c/dbhome_1/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /setup/33509923/33515361
    13. /u01/app/oracle/product/19c/dbhome_1/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /setup/33509923/33529556
    14. su - grid
    15. [grid@rac2 ~]$ /u01/app/19c/grid/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /setup/33509923/33239955
    16. ========================================================
    17. GENERIC OPATCH VERSION - FOR USE IN SAP ENVIRONMENT ONLY
    18. ========================================================
    19. Oracle Interim Patch Installer version 12.2.0.1.29
    20. Copyright (c) 2022, Oracle Corporation. All rights reserved.
    21. PREREQ session
    22. Oracle Home : /u01/app/19c/grid
    23. Central Inventory : /u01/app/oraInventory
    24. from : /u01/app/19c/grid/oraInst.loc
    25. OPatch version : 12.2.0.1.29 FOR USE IN SAP ENVIRONMENT ONLY
    26. OUI version : 12.2.0.7.0
    27. Log file location : /u01/app/19c/grid/cfgtoollogs/opatch/opatch2022-06-06_23-38-34PM_1.log
    28. Invoking prereq "checkconflictagainstohwithdetail"
    29. Prereq "checkConflictAgainstOHWithDetail" passed.
    30. OPatch succeeded.
    31. [grid@rac2 ~]$ /u01/app/19c/grid/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /setup/33509923/33529556
    32. ========================================================
    33. GENERIC OPATCH VERSION - FOR USE IN SAP ENVIRONMENT ONLY
    34. ========================================================
    35. Oracle Interim Patch Installer version 12.2.0.1.29
    36. Copyright (c) 2022, Oracle Corporation. All rights reserved.
    37. PREREQ session
    38. Oracle Home : /u01/app/19c/grid
    39. Central Inventory : /u01/app/oraInventory
    40. from : /u01/app/19c/grid/oraInst.loc
    41. OPatch version : 12.2.0.1.29 FOR USE IN SAP ENVIRONMENT ONLY
    42. OUI version : 12.2.0.7.0
    43. Log file location : /u01/app/19c/grid/cfgtoollogs/opatch/opatch2022-06-06_23-42-16PM_1.log
    44. Invoking prereq "checkconflictagainstohwithdetail"
    45. Prereq "checkConflictAgainstOHWithDetail" passed.
    46. OPatch succeeded.
    47. [grid@rac2 ~]$ /u01/app/19c/grid/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /setup/33509923/33239955
    48. ========================================================
    49. GENERIC OPATCH VERSION - FOR USE IN SAP ENVIRONMENT ONLY
    50. ========================================================
    51. Oracle Interim Patch Installer version 12.2.0.1.29
    52. Copyright (c) 2022, Oracle Corporation. All rights reserved.
    53. PREREQ session
    54. Oracle Home : /u01/app/19c/grid
    55. Central Inventory : /u01/app/oraInventory
    56. from : /u01/app/19c/grid/oraInst.loc
    57. OPatch version : 12.2.0.1.29 FOR USE IN SAP ENVIRONMENT ONLY
    58. OUI version : 12.2.0.7.0
    59. Log file location : /u01/app/19c/grid/cfgtoollogs/opatch/opatch2022-06-06_23-42-42PM_1.log
    60. Invoking prereq "checkconflictagainstohwithdetail"
    61. Prereq "checkConflictAgainstOHWithDetail" passed.
    62. OPatch succeeded.
    63. [grid@rac2 ~]$ /u01/app/19c/grid/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /setup/33509923/33515361
    64. ========================================================
    65. GENERIC OPATCH VERSION - FOR USE IN SAP ENVIRONMENT ONLY
    66. ========================================================
    67. Oracle Interim Patch Installer version 12.2.0.1.29
    68. Copyright (c) 2022, Oracle Corporation. All rights reserved.
    69. PREREQ session
    70. Oracle Home : /u01/app/19c/grid
    71. Central Inventory : /u01/app/oraInventory
    72. from : /u01/app/19c/grid/oraInst.loc
    73. OPatch version : 12.2.0.1.29 FOR USE IN SAP ENVIRONMENT ONLY
    74. OUI version : 12.2.0.7.0
    75. Log file location : /u01/app/19c/grid/cfgtoollogs/opatch/opatch2022-06-06_23-42-55PM_1.log
    76. Invoking prereq "checkconflictagainstohwithdetail"
    77. Prereq "checkConflictAgainstOHWithDetail" passed.
    78. OPatch succeeded.
    79. [grid@rac2 ~]$ /u01/app/19c/grid/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /setup/33509923/33529556
    80. ========================================================
    81. GENERIC OPATCH VERSION - FOR USE IN SAP ENVIRONMENT ONLY
    82. ========================================================
    83. Oracle Interim Patch Installer version 12.2.0.1.29
    84. Copyright (c) 2022, Oracle Corporation. All rights reserved.
    85. PREREQ session
    86. Oracle Home : /u01/app/19c/grid
    87. Central Inventory : /u01/app/oraInventory
    88. from : /u01/app/19c/grid/oraInst.loc
    89. OPatch version : 12.2.0.1.29 FOR USE IN SAP ENVIRONMENT ONLY
    90. OUI version : 12.2.0.7.0
    91. Log file location : /u01/app/19c/grid/cfgtoollogs/opatch/opatch2022-06-06_23-43-19PM_1.log
    92. Invoking prereq "checkconflictagainstohwithdetail"
    93. Prereq "checkConflictAgainstOHWithDetail" passed.
    94. OPatch succeeded.
    95. [grid@rac2 ~]$ /u01/app/19c/grid/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /setup/33509923/33534448
    96. ========================================================
    97. GENERIC OPATCH VERSION - FOR USE IN SAP ENVIRONMENT ONLY
    98. ========================================================
    99. Oracle Interim Patch Installer version 12.2.0.1.29
    100. Copyright (c) 2022, Oracle Corporation. All rights reserved.
    101. PREREQ session
    102. Oracle Home : /u01/app/19c/grid
    103. Central Inventory : /u01/app/oraInventory
    104. from : /u01/app/19c/grid/oraInst.loc
    105. OPatch version : 12.2.0.1.29 FOR USE IN SAP ENVIRONMENT ONLY
    106. OUI version : 12.2.0.7.0
    107. Log file location : /u01/app/19c/grid/cfgtoollogs/opatch/opatch2022-06-06_23-43-33PM_1.log
    108. Invoking prereq "checkconflictagainstohwithdetail"
    109. Prereq "checkConflictAgainstOHWithDetail" passed.
    110. OPatch succeeded.
    111. [grid@rac2 ~]$ /u01/app/19c/grid/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /setup/33509923/33575402
    112. ========================================================
    113. GENERIC OPATCH VERSION - FOR USE IN SAP ENVIRONMENT ONLY
    114. ========================================================
    115. Oracle Interim Patch Installer version 12.2.0.1.29
    116. Copyright (c) 2022, Oracle Corporation. All rights reserved.
    117. PREREQ session
    118. Oracle Home : /u01/app/19c/grid
    119. Central Inventory : /u01/app/oraInventory
    120. from : /u01/app/19c/grid/oraInst.loc
    121. OPatch version : 12.2.0.1.29 FOR USE IN SAP ENVIRONMENT ONLY
    122. OUI version : 12.2.0.7.0
    123. Log file location : /u01/app/19c/grid/cfgtoollogs/opatch/opatch2022-06-06_23-43-53PM_1.log
    124. Invoking prereq "checkconflictagainstohwithdetail"
    125. Prereq "checkConflictAgainstOHWithDetail" passed.
    126. OPatch succeeded.
    127. su - oracle
    128. [root@rac1 setup]# su - oracle
    129. Last login: Mon Jun 6 23:39:14 EDT 2022
    130. [oracle@rac1 ~]$ /u01/app/oracle/product/19c/dbhome_1/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /setup/33509923/33515361
    131. ========================================================
    132. GENERIC OPATCH VERSION - FOR USE IN SAP ENVIRONMENT ONLY
    133. ========================================================
    134. Oracle Interim Patch Installer version 12.2.0.1.29
    135. Copyright (c) 2022, Oracle Corporation. All rights reserved.
    136. PREREQ session
    137. Oracle Home : /u01/app/oracle/product/19c/dbhome_1
    138. Central Inventory : /u01/app/oraInventory
    139. from : /u01/app/oracle/product/19c/dbhome_1/oraInst.loc
    140. OPatch version : 12.2.0.1.29 FOR USE IN SAP ENVIRONMENT ONLY
    141. OUI version : 12.2.0.7.0
    142. Log file location : /u01/app/oracle/product/19c/dbhome_1/cfgtoollogs/opatch/opatch2022-06-06_23-44-24PM_1.log
    143. Invoking prereq "checkconflictagainstohwithdetail"
    144. Prereq "checkConflictAgainstOHWithDetail" passed.
    145. OPatch succeeded.
    146. [oracle@rac1 ~]$
    147. [oracle@rac1 ~]$ /u01/app/oracle/product/19c/dbhome_1/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -phBaseDir /setup/33509923/33529556
    148. ========================================================
    149. GENERIC OPATCH VERSION - FOR USE IN SAP ENVIRONMENT ONLY
    150. ========================================================
    151. Oracle Interim Patch Installer version 12.2.0.1.29
    152. Copyright (c) 2022, Oracle Corporation. All rights reserved.
    153. PREREQ session
    154. Oracle Home : /u01/app/oracle/product/19c/dbhome_1
    155. Central Inventory : /u01/app/oraInventory
    156. from : /u01/app/oracle/product/19c/dbhome_1/oraInst.loc
    157. OPatch version : 12.2.0.1.29 FOR USE IN SAP ENVIRONMENT ONLY
    158. OUI version : 12.2.0.7.0
    159. Log file location : /u01/app/oracle/product/19c/dbhome_1/cfgtoollogs/opatch/opatch2022-06-06_23-45-00PM_1.log
    160. Invoking prereq "checkconflictagainstohwithdetail"
    161. Prereq "checkConflictAgainstOHWithDetail" passed.
    162. OPatch succeeded.

    5.检查磁盘空间

    1. [oracle@rac1 ~]$ vi /tmp/patch_list_gihome.txt
    2. [oracle@rac1 ~]$ cat /tmp/patch_list_gihome.txt
    3. /setup/33509923/33239955
    4. /setup/33509923/33515361
    5. /setup/33509923/33529556
    6. /setup/33509923/33534448
    7. /setup/33509923/33575402
    8. su - oracle
    9. /u01/app/oracle/product/19c/dbhome_1/OPatch/opatch prereq CheckSystemSpace -phBaseFile /tmp/patch_list_gihome.txt
    10. su - grid
    11. /u01/app/19c/grid/OPatch/opatch prereq CheckSystemSpace -phBaseFile /tmp/patch_list_gihome.txt
    12. [oracle@rac1 ~]$ /u01/app/oracle/product/19c/dbhome_1/OPatch/opatch prereq CheckSystemSpace -phBaseFile /tmp/patch_list_gihome.txt
    13. ========================================================
    14. GENERIC OPATCH VERSION - FOR USE IN SAP ENVIRONMENT ONLY
    15. ========================================================
    16. Oracle Interim Patch Installer version 12.2.0.1.29
    17. Copyright (c) 2022, Oracle Corporation. All rights reserved.
    18. PREREQ session
    19. Oracle Home : /u01/app/oracle/product/19c/dbhome_1
    20. Central Inventory : /u01/app/oraInventory
    21. from : /u01/app/oracle/product/19c/dbhome_1/oraInst.loc
    22. OPatch version : 12.2.0.1.29 FOR USE IN SAP ENVIRONMENT ONLY
    23. OUI version : 12.2.0.7.0
    24. Log file location : /u01/app/oracle/product/19c/dbhome_1/cfgtoollogs/opatch/opatch2022-06-06_23-50-52PM_1.log
    25. Invoking prereq "checksystemspace"
    26. Prereq "checkSystemSpace" passed.
    27. OPatch succeeded.
    28. [oracle@rac1 ~]$
    29. [oracle@rac1 ~]$ /u01/app/19c/grid/OPatch/opatch prereq CheckSystemSpace -phBaseFile /tmp/patch_list_gihome.txt
    30. ========================================================
    31. GENERIC OPATCH VERSION - FOR USE IN SAP ENVIRONMENT ONLY
    32. ========================================================
    33. Oracle Interim Patch Installer version 12.2.0.1.29
    34. Copyright (c) 2022, Oracle Corporation. All rights reserved.
    35. PREREQ session
    36. Oracle Home : /u01/app/oracle/product/19c/dbhome_1
    37. Central Inventory : /u01/app/oraInventory
    38. from : /u01/app/oracle/product/19c/dbhome_1/oraInst.loc
    39. OPatch version : 12.2.0.1.29 FOR USE IN SAP ENVIRONMENT ONLY
    40. OUI version : 12.2.0.7.0
    41. Log file location : /u01/app/oracle/product/19c/dbhome_1/cfgtoollogs/opatch/opatch2022-06-06_23-51-36PM_1.log
    42. Invoking prereq "checksystemspace"
    43. Prereq "checkSystemSpace" passed.
    44. OPatch succeeded.

    6.节点依次执行升级

    1. /u01/app/19c/grid/OPatch/opatchauto apply /setup/33509923 -analyze