We have received the
below error while working on the 6-node cluster patching. The patch has been
applied on software GRID and RDBMS on all the node but the datapatch execution
is failed with ORA-27477.
rac06:dbp01:/u01/app/oracle/product/12.1.0.2/database/OPatch$
./datapatch -verbose
SQL Patching tool version 12.1.0.2.0 on Wed Oct 25 12:55:45 2017
Copyright (c) 2016, Oracle. All rights reserved.
Copyright (c) 2016, Oracle. All rights reserved.
Log file for this invocation: /u01/app/oracle/cfgtoollogs/sqlpatch/sqlpatch_12298_2017_10_25_12_55_45/sqlpatch_invocation.log
Connecting to database…OK
Bootstrapping registry and package to current versions…done
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_12298_2017_10_25_12_55_45/sqlpatch_invocation.log for the complete error.
Execute ‘select dbms_sqlpatch.verify_queryable_inventory from dual’
and/or check the invocation log /u01/app/oracle/cfgtoollogs/sqlpatch/sqlpatch_12298_2017_10_25_12_55_45/sqlpatch_invocation.log for the complete error.
Prereq
check failed, exiting without installing any patches.
Solution: The above error occurs when
datapatch trying to read the inventory across all the nodes using predefined
set of jobs. If the predefined jobs are removed from any of the node in RAC.
You will see the above error.
Hence, drop the jobs from all
the cluster nodes and run the datapatch to fix the issue.
1.) Lets validate, the
inventory is queryable or not.
SQL> select
dbms_sqlpatch.verify_queryable_inventory from dual;
VERIFY_QUERYABLE_INVENTORY
——————————————————————————–
ORA-27477: “SYS”.”LOAD_OPATCH_INVENTORY_1″ already exists
——————————————————————————–
ORA-27477: “SYS”.”LOAD_OPATCH_INVENTORY_1″ already exists
2.) Check the predefined job status on all the nodes.
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-17 06.00.50.791058 AM +00:00
LOAD_OPATCH_INVENTORY_1 STOPPED 25-OCT-17 07.11.49.606570 AM +00:00
LOAD_OPATCH_INVENTORY_2 DISABLED 25-OCT-17 07.11.50.543851 AM +00:00
————————— ————— ————————————
LOAD_OPATCH_INVENTORY DISABLED 25-OCT-17 06.00.50.791058 AM +00:00
LOAD_OPATCH_INVENTORY_1 STOPPED 25-OCT-17 07.11.49.606570 AM +00:00
LOAD_OPATCH_INVENTORY_2 DISABLED 25-OCT-17 07.11.50.543851 AM +00:00
3.)
Clear all existing job entries
SQL> exec
DBMS_SCHEDULER.DROP_JOB(‘LOAD_OPATCH_INVENTORY’);
SQL> exec DBMS_SCHEDULER.DROP_JOB(‘LOAD_OPATCH_INVENTORY_1’);
SQL> exec DBMS_SCHEDULER.DROP_JOB(‘LOAD_OPATCH_INVENTORY_2’);
4.) Validate, there should not be any jobs.
SQL> select job_name,state, start_date from dba_scheduler_jobs where job_name like ‘LOAD_OPATCH%’;
SQL> exec DBMS_SCHEDULER.DROP_JOB(‘LOAD_OPATCH_INVENTORY_1’);
SQL> exec DBMS_SCHEDULER.DROP_JOB(‘LOAD_OPATCH_INVENTORY_2’);
4.) Validate, there should not be any jobs.
SQL> select job_name,state, start_date from dba_scheduler_jobs where job_name like ‘LOAD_OPATCH%’;
4.) Execute the datapatch
again. This time, the datapatch should be executed successfully.
$ ./datapatch -verbose
Note:- Test, Test and Test before executing the above solutions in your
environment or consult the oracle support.
Comments
Post a Comment