打补丁时父补丁和子补丁相关安装回滚问题
[oracle@lissen-n2 32119931]$ $ORACLE_HOME/OPatch/opatch lspatches
30138470;Database Oct 2019 Release Update : 12.2.0.1.191015 (30138470)
30122814;OCW OCT 2019 RELEASE UPDATE 12.2.0.1.191015 (30122814)
30133625;OJVM RELEASE UPDATE: 12.2.0.1.191015 (30133625)
OPatch succeeded.
[oracle@lissen-n2 32119931]$
[oracle@lissen-n2 32119931]$
[oracle@lissen-n2 32119931]$ pwd
/u01/RU2/32126883/32119931
[oracle@lissen-n2 32119931]$ ll
total 96
drwxrwxrwx 3 root root 4096 Nov 27 21:32 etc
drwxrwxrwx 5 root root 4096 Nov 27 21:32 files
-rwxrwxrwx 1 root root 82514 Jan 15 19:41 README.html
-rwxrwxrwx 1 root root 11 Nov 27 21:32 README.txt
[oracle@lissen-n2 32119931]$ $ORACLE_HOME/OPatch/opatch apply
Oracle Interim Patch Installer version 12.2.0.1.24
Copyright © 2021, Oracle Corporation. All rights reserved.
Oracle Home : /u01/app/oracle/product/12.2.0.1/dbhome_1
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle/product/12.2.0.1/dbhome_1/oraInst.loc
OPatch version : 12.2.0.1.24
OUI version : 12.2.0.1.4
Log file location : /u01/app/oracle/product/12.2.0.1/dbhome_1/cfgtoollogs/opatch/opatch2021-03-28_10-22-19AM_1.log
Verifying environment and performing prerequisite checks…
OPatch continues with these patches: 32119931
Do you want to proceed? [y|n]
y
User Responded with: Y
All checks passed.
Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = ‘/u01/app/oracle/product/12.2.0.1/dbhome_1’)
Is the local system ready for patching? [y|n]
y
User Responded with: Y
Backing up files…
Applying interim patch ‘32119931’ to OH ‘/u01/app/oracle/product/12.2.0.1/dbhome_1’
Patching component oracle.javavm.server, 12.2.0.1.0…
Patching component oracle.javavm.server.core, 12.2.0.1.0…
Patching component oracle.rdbms.dbscripts, 12.2.0.1.0…
Patching component oracle.javavm.client, 12.2.0.1.0…
Patching component oracle.rdbms, 12.2.0.1.0…
Patch 32119931 successfully applied.
12.2.0.1.5和11.2.3.14以后打补丁父补丁会覆盖子补丁
Sub-set patch [30133625] has become inactive due to the application of a super-set patch [32119931].
Please refer to Doc ID 2161861.1 for any possible further required actions.
Log file location: /u01/app/oracle/product/12.2.0.1/dbhome_1/cfgtoollogs/opatch/opatch2021-03-28_10-22-19AM_1.log
OPatch succeeded.
[oracle@lissen-n2 32119931]$ $ORACLE_HOME/OPatch/opatch lspatches
32119931;OJVM RELEASE UPDATE 12.2.0.1.210119 (32119931)
30138470;Database Oct 2019 Release Update : 12.2.0.1.191015 (30138470)
30122814;OCW OCT 2019 RELEASE UPDATE 12.2.0.1.191015 (30122814)
OPatch succeeded.
12.2.0.1.5和11.2.3.14以后打补丁父补丁会覆盖子补丁
Note: This enhancement to OPatch exists in 12.2.0.1.5 and 11.2.0.3.14 releases and later
The change
在以前的版本中(12.2.0.1.5和11.2.0.3.14以前),安装父补丁需要回滚子补丁
In the past, when OPatch recognized that the patch being installed is a superset of one already installed, it would rollback the subset patch before installing the new patch.
Beginning with these releases of OPatch, when OPatch recognized that the patch being installed is a superset of one already installed, OPatch no longer rolls back the installed patch prior to it installing the superset patch. Additionally when the superset patch is rolled back, the original patch is reactivated
[oracle@lissen-n2 32119931]$ $ORACLE_HOME/OPatch/opatch lspatches
32119931;OJVM RELEASE UPDATE 12.2.0.1.210119 (32119931)
30138470;Database Oct 2019 Release Update : 12.2.0.1.191015 (30138470)
30122814;OCW OCT 2019 RELEASE UPDATE 12.2.0.1.191015 (30122814)
OPatch succeeded.
[oracle@lissen-n2 32119931]$ pwd
/u01/RU2/32126883/32119931
[oracle@lissen-n2 32119931]$ $ORACLE_HOME/OPatch/opatch rollback -id 32119931
Oracle Interim Patch Installer version 12.2.0.1.24
Copyright © 2021, Oracle Corporation. All rights reserved.
Oracle Home : /u01/app/oracle/product/12.2.0.1/dbhome_1
Central Inventory : /u01/app/oraInventory
from : /u01/app/oracle/product/12.2.0.1/dbhome_1/oraInst.loc
OPatch version : 12.2.0.1.24
OUI version : 12.2.0.1.4
Log file location : /u01/app/oracle/product/12.2.0.1/dbhome_1/cfgtoollogs/opatch/opatch2021-03-28_10-18-17AM_1.log
Patches will be rolled back in the following order:
32119931
The following patch(es) will be rolled back: 32119931
Please shutdown Oracle instances running out of this ORACLE_HOME on the local system.
(Oracle Home = ‘/u01/app/oracle/product/12.2.0.1/dbhome_1’)
Is the local system ready for patching? [y|n]
y
User Responded with: Y
Rolling back patch 32119931…
RollbackSession rolling back interim patch ‘32119931’ from OH ‘/u01/app/oracle/product/12.2.0.1/dbhome_1’
Patching component oracle.javavm.server, 12.2.0.1.0…
Patching component oracle.javavm.server.core, 12.2.0.1.0…
Patching component oracle.rdbms.dbscripts, 12.2.0.1.0…
Patching component oracle.javavm.client, 12.2.0.1.0…
Patching component oracle.rdbms, 12.2.0.1.0…
RollbackSession removing interim patch ‘32119931’ from inventory
#回滚父补丁,子补丁会重新生效
Inactive sub-set patch [30133625] has become active due to the rolling back of a super-set patch [32119931].
Please refer to Doc ID 2161861.1 for any possible further required actions.
Log file location: /u01/app/oracle/product/12.2.0.1/dbhome_1/cfgtoollogs/opatch/opatch2021-03-28_10-18-17AM_1.log
OPatch succeeded.
[oracle@lissen-n2 32119931]$ $ORACLE_HOME/OPatch/opatch lspatches
30138470;Database Oct 2019 Release Update : 12.2.0.1.191015 (30138470)
30122814;OCW OCT 2019 RELEASE UPDATE 12.2.0.1.191015 (30122814)
30133625;OJVM RELEASE UPDATE: 12.2.0.1.191015 (30133625)
OPatch succeeded.
相关知识在MOS文档(2161861.1)