ITPub博客

首页 > 数据库 > Oracle > 关于包冲突

关于包冲突

原创 Oracle 作者:zhangsharp20 时间:2016-03-10 18:32:58 0 删除 编辑
All patches may not be compatible with one another. For example, if you apply a patch, all the bugs the patch fixes could reappear after you apply another patch. This is called a conflict situation. OPatch detects such situations and raises an error when it detects a conflict.
$ OPatch/opatch apply -no_bug_superset <Path_To_Patch>

Types of Conflicts


OPatch can detect the following types of conflicts.

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 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.

Example

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 C, to be installed, fixes bugs 1, 2, 3, and 4.

Patch C is considered a superset of Patch A.

Using the -no_bug_superset Flag
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 example output shows the message you would see when you use the -no_bug_superset flag:

Oracle interim Patch Installer version 11.2.0.0.1
Copyright (c) 2009, Oracle Corporation.  All rights reserved.
Oracle Home       : /home/oracle_TEST/product/11.1.0/db_1
Central Inventory : /home/OUIHome_Opatch
from           : /home/oracle_TEST/product/11.2.0/db_1/oraInst.loc
OPatch version    : 11.1.0.6.6
OUI version       : 11.1.0.6.6
OUI location      : /home/oracle_TEST/product/11.1.0/db_1/oui
Log file location : /home/oracle_TEST/product/11.1.0/db
_1/cfgtoollogs/opatch/opatch-2008_May_25_14-03-33-IST_Wed.log
ApplySession applying interim patch '111000' to OH '/home/oracle
_TEST/product/11.1.0/db_1'
Apply Session failed: ApplySession failed to prepare the system. Interim patch
 111000 is a superset of the patch(es) [ 111000 ] in OH /home/oracle
_TEST/product/11.1.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.

Example

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_subsetoption 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.

Example 7-1 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).

Example 7-1
opatch napply <patch_location> -skip_subset -skip_duplicate

Example 7-2 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).

Example 7-2

opatch napply <patch_location> -id 1,2,3 -skip_subset -skip_duplicate

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

上一篇: oracle集群patching
下一篇: 关于failover
请登录后发表评论 登录
全部评论

注册时间:2014-08-12

  • 博文量
    382
  • 访问量
    801410