datapatch failing with ORA-27477: “SYS”.”LOAD_OPATCH_INVENTORY_X” already exists

datapatch is failing with ORA-27477, due to existing job_name in dba_scheduler_jobs

db02:orcl01:/u01/product/12.1.0.2/database/OPatch>./datapatch -verbose
SQL Patching tool version 12.1.0.2.0 on Tue Oct 25 12:55:45 2016
Copyright (c) 2016, Oracle. All rights reserved.
Log file for this invocation: /u01/app/oracle/cfgtoollogs/sqlpatch/sqlpatch_3997884_2016_10_25_12_55_45/sqlpatch_invocation.log
Connecting to database…OK
Bootstrapping registry and package to current versions…done
Queryable inventory could not determine the current opatch status.
Execute ‘select dbms_sqlpatch.verify_queryable_inventory from dual’
and/or check the invocation log
/u01/app/oracle/cfgtoollogs/sqlpatch/sqlpatch_3997884_2016_10_25_12_55_45/sqlpatch_invocation.log
for the complete error.
Prereq check failed, exiting without installing any patches.
SQL> select dbms_sqlpatch.verify_queryable_inventory from dual;
VERIFY_QUERYABLE_INVENTORY
——————————————————————————–
ORA-27477: “SYS”.”LOAD_OPATCH_INVENTORY_1″ already exists
SQL> select job_name,state, start_date from dba_scheduler_jobs where job_name like ‘LOAD_OPATCH%’;
JOB_NAME STATE START_DATE
————————— ————— ————————————
LOAD_OPATCH_INVENTORY DISABLED 25-OCT-16 06.00.50.791058 AM +00:00
LOAD_OPATCH_INVENTORY_1 STOPPED 25-OCT-16 07.11.49.606570 AM +00:00
LOAD_OPATCH_INVENTORY_2 DISABLED 25-OCT-16 07.11.50.543851 AM +00:00

Clear all existing job entries

SQL> exec DBMS_SCHEDULER.DROP_JOB(‘LOAD_OPATCH_INVENTORY’);
PL/SQL procedure successfully completed.
SQL> exec DBMS_SCHEDULER.DROP_JOB(‘LOAD_OPATCH_INVENTORY_1’);
PL/SQL procedure successfully completed.
SQL> exec DBMS_SCHEDULER.DROP_JOB(‘LOAD_OPATCH_INVENTORY_2’);
PL/SQL procedure successfully completed.
SQL> select job_name,state, start_date from dba_scheduler_jobs where job_name like ‘LOAD_OPATCH%’;
no rows selected

Re-run datapatch

db02:orcl01:/u01/product/12.1.0.2/database/OPatch>./datapatch -verbose
Advertisements
This entry was posted in datapatch issues, Oracle Administration, Oracle OPatch and tagged , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s