ISSUE:
Command "opatch lsinventory" or "opatch apply" reports below error:
<<
OUI-67076:OracleHomeInventory was not able to create a lock file, probably due to a failed OPatch Session. The loaded inventory might not show correctly what you have in the Oracle Home.
>>
REASON:
- A previous "opatch apply" session failed and so a lock still exists on the local inventory.
- When Opatch is invoked, it creates patch_locked file in $ORACLE_HOME/.patch_storage during its execution.
- Hence, on an attempt to re-apply the patch or find list of patch (with opatch lsinventory) the presence of patch_locked file does not allow further processing and throws error.
- If the patch application is interrupted or cancelled, this file gets retained under /.patch_storage directory.
SOLUTION:
If above error is observed while applying patch(opatch apply) then follow below steps:
Step 1) Check if the file "patch_locked" is present in the directory $ORACLE_HOME/.patch_storage
Step 2) If present, rename, move or remove the patch_locked file from $ORACLE_HOME/.patch_storage.
cd $ORACLE_HOME/.patch_storage
$ rm -rf patch_locked
Step 3) Re-apply the patch.
If above error is observed while checking for list of applied patches(opatch lsinventory) then follow below procedure:
Step 1) Take
a backup of $ORACLE_HOME/.patch_storage
$ cd $ORACLE_HOMEStep 2) Remove $ORACLE_HOME/.patch_storage/patch_locked
$ cd $ORACLE_HOME/.patch_storage/
$ rm -rf patch_locked
Step 3) Create $ORACLE_HOME/.patch_storage/patch_free
$ cd $ORACLE_HOME/.patch_storage/
$ touch patch_free
Step 4) Verify that "opatch lsinventory" no longer reports the error.
export ORACLE_HOME=$ORACLE_HOME
export PATH=$ORACLE_HOME/OPatch:$PATH
$ opatch lsinventory
No comments:
Post a Comment