Resuming OMSPatcher Session When it Failed to Apply a Patch
Oracle Enterprise Manager Server ( OMS ) could be tricky when you have a bug, known issues or even an abnormal termination on the patch you intend to apply.
Before you apply the patch, make sure you have the following requirements set:
- An healthy backup of the
- Middleware Home
- Domain Home
- Database RCU
- Database export & restore point
- Patches staged on the file system with usable space
- The oms system stopped or started, depending on the patch requirements
- Run omspatcher with the ‘analyse’ option is successful and is not reporting problems
- All patch requirements listed in the patch README.txt have been validated.
The following is an example of applying the patch 36761595, which resulted in a failed execution:
omsserver.corp.domain USER=oracle SID=oms\ PATH=/home/oracle/OMS/36761595\
$ORACLE_HOME/OMSPatcher/omspatcher apply
OMSPatcher Automation Tool
Copyright (c) 2017, Oracle Corporation. All rights reserved.
OMSPatcher version : 13.9.5.23.0
OUI version : 13.9.4.0.0
Running from : /u01/oracle/mw13c
[...]
Sat Jan 25 09:25:33.184 PST 2025 rcu:Extracted Statement from File Name: '/u01/oracle/mw13c/sysman/emdrep/config/patch/sql/patchPostApply.sql'Line Number: 39
Sat Jan 25 09:25:33.184 PST 2025 rcu:Statement Type: 'BEGIN/END Anonymous Block'
JDBC SQLException - ErrorCode: 20110SQLState:72000 Message: ORA-20110: New invalid objects, patch application is not complete, please contact Oracle Support
ORA-06512: at "SYSMAN.MGMT_PATCH_UTIL", line 193
ORA-06512: at "SYSMAN.MGMT_PATCH_UTIL", line 172
ORA-06512: at line 5
Error encountered executing SQL statement FileName: '/u01/oracle/mw13c/sysman/emdrep/config/patch/sql/patchPostApply.sql' LineNumber: '39'
SQL Statement: [DECLARE
BEGIN
SYSMAN.MGMT_PATCH_UTIL.MGMT_PATCH_POST_CHECKS(SYSMAN.MGMT_PATCH_UTIL.G_PATCH_MODE_APPLY,'false');
END;
]
java.sql.SQLException: ORA-20110: New invalid objects, patch application is not complete, please contact Oracle Support
ORA-06512: at "SYSMAN.MGMT_PATCH_UTIL", line 193
ORA-06512: at "SYSMAN.MGMT_PATCH_UTIL", line 172
ORA-06512: at line 5
OMSPatcher failed to execute some of the patching steps. Please check the Patching summary,individual logs and try to resolve the issue. Once the issue is resolved,Please execute below command to complete patching session:
omspatcher resume
------------------------------------------------------------------------------------------------
OMSPatcher wont allow any other patching operations unless the script is executed successfully
------------------------------------------------------------------------------------------------
Log file location: /u01/oracle/mw13c/cfgtoollogs/omspatcher/36761595/omspatcher_2025-01-25_08-58-08AM_apply.log
Recommended actions: Please check log file(s) for failed RCU artifact action(s) and contact Oracle Support with the logs.
OMSPatcher failed with error code 245
There is a known issue for the error as per EM13C:Patching Failed with Error ORA-20110: New Invalid Objects, Patch Application Is Not Complete(GC_DIAG2_EXT,GC_DIAG3_EXT) (Doc ID 3060905.1) where two unwanted package bodies can be dropped.
Now it’s time to work around the root cause of patch failure:
SQL> select owner,object_name,object_type,status,last_ddl_Time
from dba_objects
where status='INVALID' order by 3;
select count(*) from dba_objects where status='INVALID';
OWNER OBJECT_NAME OBJECT_TYPE STATUS LAST_DDL_TIME
-------------------- ------------------------------ ----------------------- ------- ------------------------------
SYSMAN GC_DIAG3_EXT PACKAGE BODY INVALID 25-JAN-25
SYSMAN GC_DIAG2_EXT PACKAGE BODY INVALID 25-JAN-25
SQL> SQL>
COUNT(*)
----------
2
SQL> drop package SYSMAN.GC_DIAG2_EXT;
Package dropped.
SQL> drop package SYSMAN.GC_DIAG3_EXT;
Package dropped.
SQL>
After using the above workaround, resume the patch from the point where it failed, and it will be completed successfully.
$$ORACLE_HOME/OMSPatcher/omspatcher resume
[...]
OMSPatcher succeeded
Happy OEM Patching!
Oracle Database Consulting Services
Ready to optimize your Oracle Database for the future?
Share this
Share this
More resources
Learn more about Pythian by reading the following blogs and articles.
Oracle Database 12c: PSUs vs database proactive bundle patches
“The Cluster Upgrade State is [ROLLING PATCH]” with Correct Patch Level in all Nodes
How to patch an exadata (part 6) - timing
Ready to unlock value from your data?
With Pythian, you can accomplish your data transformation goals and more.