Oracle® OPatch User's Guide 10g Release 2 (10.2) for Windows and UNIX Part Number E15294-01 |
|
|
PDF · Mobi · ePub |
All patches may not be compatible with one another. For example, if a patch has been applied, all the bugs fixed by that patch could reappear after another patch is applied. This is called a conflict situation. OPatch detects such situations and raises an error when a it detects a conflict. This chapter includes the following topics:
OPatch can detect the following types of conflicts:
Bug Superset — If all the bugs fixed by a patch in the system are also fixed by the patch to be applied, this patch (the patch to be applied) is considered to be a superset of the patch already applied. If a bug superset condition is detected, it is not considered an error situation. All the subset patches are removed from the system and the new patch is applied.
For example, consider a scenario where four patches A,B,C, and D are applied in a system, each of which fixes 2 bugs as shown in Figure 6–1. If you apply a patch E that fixes bugs 5,6,7,8,9, and 10, patch E will be the superset of patch C and D.
If you want OPatch to error out if the current patch bugs-to-fix is a superset or the same as an installed patch bugs-fixed in the Oracle home directory, you can use the -no_bug_superset
flag:
$ OPatch/opatch apply -no_bug_superset <Path_To_Patch>
The following sample output shows the message you would see when you use the -no_bug_superset
flag:
Oracle interim Patch Installer version 10.2.0.4.6 Copyright (c) 2009, Oracle Corporation. All rights reserved.. Oracle Home : /home/oracle_TEST/product/10.2.0/db_1 Central Inventory : /home/OUIHome_Opatch from : /home/oracle_TEST/product/10.2.0/db_1/oraInst.loc OPatch version : 10.2.0.4.6 OUI version : 10.2.0.4.6 OUI location : /home/oracle_TEST/product/10.2.0/db_1/oui Log file location : /home/oracle_TEST/product/10.2.0/db _1/cfgtoollogs/opatch/opatch-2008_May_25_14-03-33-IST_Wed.log ApplySession applying interim patch '102000' to OH '/home/oracle _TEST/product/10.2.0/db_1' Apply Session failed: ApplySession failed to prepare the system. Interim patch 102000 is a superset of the patch(es) [ 102000 ] in OH /home/oracle _TEST/product/10.2.0/db_1 System intact, OPatch will not attempt to restore the system OPatch failed with error code 73
Subset — Patches to be applied can be subsets of other patches installed in the Oracle home.
Consider the following scenario:
Patch A, installed in the Oracle home, fixed bugs 1, 2, and 3.
Patch B, installed in the Oracle home, fixed bugs 10, 11, and 12.
Patch D, to be installed, fixes bugs 1 and 2.
Patch D is a subset of Patch A.
Using the skip_subset Option
When you want to skip patches formerly applied in the Oracle home that are now subsets of other patches you want to apply now, you can use the skip_subset
option of napply
. For example, if you used napply
yesterday for patch A that fixed bugs 1 and 2, then you use napply
today with the skip_subset
option for patch B that fixes bug 1 and patch C that fixes bugs 1, 2, and 3, then subset patch A is skipped, and patch C then becomes a superset of patch A.
The following example applies all patches under the <patch_location>
directory. OPatch skips duplicate patches and subset patches (patches under <patch_location>
that are subsets of patches installed in the Oracle home).
opatch napply <patch_location> -skip_subset -skip_duplicate
The following example applies patches 1, 2, and 3 that are under the <patch_location>
directory. OPatch skips duplicate patches and subset patches (patches under <patch_location>
that are subsets of patches installed in the Oracle home).
opatch napply <patch_location> -id 1,2,3 -skip_subset -skip_duplicate
See the description for the skip_subset
option in Table 4–3 for more information.
Duplicate — A duplicate patch fixes the same set of bugs that another patch fixed. For example, if you applied Patch A that fixed bugs 1, 2 and 3, and now apply Patch B that also fixes bugs 1, 2 and 3, then Patch B is a duplicate of Patch A. A patch is always a duplicate of itself.
Using the skip_duplicate Option
If you specify this option, OPatch removes duplicate patches from the list of patches to be applied. For example, if you used napply
yesterday for Patch A discussed above, then use napply
today with the -skip_duplicate
option for Patch A and other patches, duplicate Patch A is skipped.
Bug Conflict — If a set of bugs to be fixed by the current interim patch includes some but not all bugs already fixed by one or more previously installed interim patches, this is considered a bug conflict. You must remove the bug conflict before proceeding with the patch by using the apply
command with the -force
flag, which rolls back the conflicting patches before applying the new one.
For example, consider a scenario where four patches A,B,C, and D are applied in a system, each of which fixes 2 bugs as shown in Figure 6–2. If you apply a patch E that fixes bugs 1,3,5,7,9, and 10, this patch fixes bugs 1,3,5,7,9, and 10, opens bugs 2,4,6, and, 8. This is a conflict situation.
File Conflict — If a set of files to be patched by the current interim patch include files already patched by one or more previously installed interim patches and it is not a bug superset, this is considered a file conflict. You must remove the file conflict before you proceed with patching by using the apply
command with the -force
flag, which rolls back the conflicting patches before applying the new one.
Combination Conflict — If a set of patches has a combination of a bug superset and bug or file conflict, this is considered a combination conflict and is an error situation. In this case, OPatch removes all conflicting patches as well as the subset patches and then re-applies the new patch.
For example, consider a scenario where four patches A,B,C, and D are applied in a system, each of which fixes 2 bugs as shown in Figure 6–3. Patch C is the subset of patch D. Patch A and patch B are conflicting patches of patch D. If you apply this patch D that fixes bugs 1,3,5,6,7, and 8 with the -force
flag, OPatch rolls back patches A, B, and C and applies patch D.
You can use the -silent, -force
, and -no_bug_superset
options in Real Application Clusters. Their expected behavior is described in Table 6–1.
-silent | -force | -no_bug_superset | Expected behavior |
---|---|---|---|
N |
N |
N |
OPatch prompts questions and applies the patches depending upon your responses. |
N |
N |
Y |
OPatch errors out if the current patch bugs-to-fix is a superset or the same as an installed patch bugs-fixed in the Oracle home directory. If it is a conflict case, OPatch prompts questions and applies the patches depending upon your responses. |
N |
Y |
N |
OPatch prompts questions and applies the patches depending upon your responses. |
N |
Y |
Y |
OPatch errors out if the current patch bugs-to-fix is a superset or the same as an installed patch bugs-fixed in the Oracle home directory. If it is a conflict case, OPatch prompts questions and applies the patches depending upon your responses. |
Y |
N |
N |
OPatch rolls back and applies the patch if the current patch bugs-to-fix is a superset or the same as an installed patch bugs-fixed in the Oracle home directory. If it is a conflict case, OPatch errors out. |
Y |
N |
Y |
OPatch errors out if the current patch bugs-to-fix is a superset or the same as an installed patch bugs-fixed in the Oracle home directory. If it is a conflict case also, OPatch errors out. |
Y |
Y |
N |
OPatch rolls back all the patches and reapplies them without warning, even if the current patch bugs-to-fix is a superset, or a conflict, or the same as an installed patch bugs-fixed in the Oracle home directory. |
Y |
Y |
Y |
OPatch errors out if the current patch bugs-to-fix is a superset or the same as an installed patch bugs-fixed in the Oracle home directory. If it is a conflict case, OPatch rolls back and applies the new patch. |
The expected behavior for the Apply and Napply commands is listed in Table 6–2.
Table 6-2 Expected Behavior for Apply and Napply Commands
Command | Superset | Subset | Duplicate | File Conflict or Bug Conflict Patch |
---|---|---|---|---|
Apply |
OPatch performs an automatic rollback, then an apply. |
After the merge request, OPatch performs an automatic rollback, then performs an apply. |
OPatch performs an automatic rollback, then performs a reapply. |
OPatch reports the conflict. After the merge request, OPatch performs an automatic rollback, then an apply. |
Napply |
OPatch performs an automatic rollback, then an apply. |
OPatch reports the subset and skips the subset patch. It then continues and applies the other patches. |
OPatch performs an automatic rollback, then a reapply. |
OPatch reports the conflict, then asks you to run again without applying a bug conflict patch. You can use the -force option to instruct OPatch to automatically roll back the conflicting patch, then apply the new patch. |
OPatch detects and reports any conflicts encountered when applying an interim patch with a previously applied patch. The patch application fails in case of conflicts. You can use the -force
option of OPatch to override this failure. If you specify -force
, the installer firsts rolls back any conflicting patches and then proceeds with the installation of the desired interim patch.
You may experience a bug conflict and might want to remove the conflicting patch. This process is known as patch rollback. During patch installation, OPatch saves copies of all the files that were replaced by the new patch before the new versions of these files are loaded, and stores them in $ORACLE_HOME/.patch_storage. These saved files are called rollback files and are key to making patch rollback possible. When you roll back a patch, these rollback files are restored to the system. If you have gained a complete understanding of the patch rollback process, you should only override the default behavior by using the -force
flag. To roll back a patch, execute the following command:
$ OPatch/opatch rollback -id <Patch_ID>