Lock file left by a different patch, OPatch will not try re-using the lock file.

时间:2023-12-05 17:42:38

OPatch在打补丁的过程中被中断,重新执行后报以下错误:

UtilSession failed: Lock file left by a different patch, OPatch will not try re-using the lock file.
Log file location: /u11/app/oracle/product/11.2.0/dbhome_1/cfgtoollogs/opatch/14084247_Apr_16_2016_13_21_29/apply2016-04-16_13-21-29PM_1.log OPatch failed with error code 73

查看日志文件也报类似的错误。
原因是之前的opatch会话失败后,仍然在本地inventory上持有锁

解决方法:

1. Take a backup of  $ORACLE_HOME/.patch_storage
2. Remove $ORACLE_HOME/.patch_storage/patch_locked
% rm $ORACLE_HOME/.patch_storage/patch_locked
3. Create $ORACLE_HOME/.patch_storage/patch_free
% touch $ORACLE_HOME/.patch_storage/patch_free
4. Verify that "opatch lsinventory" no longer reports the error
% opatch lsinventory -detail