暂无图片
暂无图片
暂无图片
暂无图片
暂无图片

How to Rollback a Failed Interim Patch Installation (文档 ID 312767.1)

226

Applies to:

Oracle Universal Installer - Version 1.0.0.0.50 to 1.0.0.0.99
Information in this document applies to any platform.

Symptoms

During the installation of an Interim patch using OPatch, the follow error is returned:

OPatch has encountered an error during the application of the patch.

Do you want to Stop:

Beginning with OPatch 1.0.0.0.53, the following will be included:

Replying 'Y' will terminate the patch installation immediately.It WILL NOT restore any updates that have been performed to this point. It WILL NOT update the inventory.
Replying 'N' will continue with updating the inventory showing the patch has been applied.
NOTE: After replying either 'Y' or 'N' it is critical to review:
      Metalink Note 312767.1 How to rollback a failed Interim patch installation.
Do you want to STOP?
Please respond Y|N >

Changes

Interim patch was applied.

Cause

During the installation of an Interim patch there were errors copying files, updating objects or relinking binaries.

Solution

Use one of the following options to successfully apply or rollback the patch. The steps below will remove patch number 1234567 (replace 1234567 with the patch correct patch number). 

NOTE: OPatch (version pre-10.2) will not automatically rollback the objects that were updated. Rerunning OPatch before rolling back the objects will destroy the rollback.sh script making it impossible to rollback the updates.

There are multiple solutions depending on the option taken to end the patch install:

Do you want to Stop:

Scenario 1: Replying Y:

  •  Run the rollback scripts

% sh $ORACLE_HOME/.patch_storage/1234567/rollback_1234567 .sh

NOTE: Due to a known issue in OPatch, rollback_1234567.sh may throw many errors similar to the following:

  ./rollback_5901872.sh[89]: System: not found.
  ./rollback_5901872.sh[97]: System: not found.

These can be ignored as they should be Remarks in the Script.

% sh $ORACLE_HOME/.patch_storage/1234567/1234567_make.txt

Note: running the 1234567_make.txt is only required if the apply was in the relink phase when aborted. If the patch apply was terminated before the relink phase, 1234567_make.txt will not be generated and relinking will not be needed

  • Rename the OPatch backup directory

% mv $ORACLE_HOME/.patch_storage/1234567 $ORACLE_HOME/.patch_storage/1234567.orig

Scenario 2: Replying N:

Rollback the patch using OPatch

% cd patch number
% opatch rollback -id patch number

Scenario 3: The rollback.sh was overwritten:

  • Move (NOT remove) the original backup directory

% mv $ORACLE_HOME/.patch_storage/1234567 $ORACLE_HOME

  • Rebuild the rollback.sh by reapplying the patch with the no_inventory and no_relink options

% cd patch directory
% opatch apply -no_inventory -no_relink

  • Copy the rollback and make script to the original directory

% cp $ORACLE_HOME/.patch_storage/1234567/rollback_1234567.sh $ORACLE_HOME/1234567
% cp $ORACLE_HOME/.patch_storage/1234567/1234567_make.txt $ORACLE_HOME/1234567

  • Move the original backup directory to $ORACLE_HOME/.patch_storage

% mv $ORACLE_HOME/.patch_storage/1234567 $ORACLE_HOME/1234567.rereun
% mv $ORACLE_HOME/1234567 $ORACLE_HOME/.patch_storage

  • Run the rollback script and make commands

% sh $ORACLE_HOME/.patch_storage/1234567/rollback_1234567.sh

NOTE: Due to a known issue, OPatch, rollback_1234567.sh may throw many errors similar to the following:

  ./rollback_5901872.sh[89]: System: not found.
  ./rollback_5901872.sh[97]: System: not found.

These can be ignored as they should be Remarks in the Script.

% sh $ORACLE_HOME/.patch_storage/1234567/1234567_make.txt

  • Rename the OPatch backup directory

% mv $ORACLE_HOME/.patch_storage/1234567 $ORACLE_HOME/.patch_storage/1234567.orig

@ "rempatch.pl" utility from metalink under patch 4321390 can be used to remove a patch from the inventory. "rempatch.pl" should only be used as a last resort because the ORACLE_HOME files may not be restored to their original state.  Also note that the patch is password protected.


「喜欢这篇文章,您的关注和赞赏是给作者最好的鼓励」
关注作者
【版权声明】本文为墨天轮用户原创内容,转载时必须标注文章的来源(墨天轮),文章链接,文章作者等基本信息,否则作者和墨天轮有权追究责任。如果您发现墨天轮中有涉嫌抄袭或者侵权的内容,欢迎发送邮件至:contact@modb.pro进行举报,并提供相关证据,一经查实,墨天轮将立刻删除相关内容。

评论