Error "Failed SQL stmt: SELECT DBMS_METADATA.GET_DDL('TABLE',:1) from dual" in Production environment.
This error is related to database and because of "DBMS_METADATA" package has got corrupted / invalid.
For this we need to work with your DBA team to resolve the issue.
Findings:
********
LOG FILE
-------------
Filename = PSBUILD.LOG
See the following error:
Failed SQL stmt: SELECT DBMS_METADATA.GET_DDL('TABLE',:1) from dual
Error: AE_FGPY005_AET - SQL Error. Error Position: 0 Return: 4063 - ORA-04063: package body "SYS.DBMS_METADATA" has errors
From database side we found after patch the database registry invalid.
SQL> select substr(comp_name,1,30) comp_name, substr(comp_id,1,10)
comp_id,substr(version,1,12) version,status from dba_registry; 2
COMP_NAME COMP_ID VERSION STATUS
------------------------------ ---------- ------------ -----------
Oracle Database Catalog Views CATALOG 11.2.0.3.0 VALID
Oracle Database Packages and T CATPROC 11.2.0.3.0 INVALID
Oracle Workspace Manager OWM 11.2.0.3.0 VALID
SQL> select comp_id, status, version from dba_registry;
COMP_ID STATUS VERSION
------------------------------ ----------- ------------------------------
CATALOG VALID 11.2.0.3.0
CATPROC INVALID 11.2.0.3.0
OWM VALID 11.2.0.3.0
The DBA has isolated the issue to invalid packages in the UMG92PRD database. Per Oracle's recommendation, we are going to run the catproc.sql to reset the packages.
After applying the solution we are able to validate all the sys objects which were invalid, dbms metada is now valid. The catproc process completed successfully
This error is related to database and because of "DBMS_METADATA" package has got corrupted / invalid.
For this we need to work with your DBA team to resolve the issue.
Findings:
********
LOG FILE
-------------
Filename = PSBUILD.LOG
See the following error:
Failed SQL stmt: SELECT DBMS_METADATA.GET_DDL('TABLE',:1) from dual
Error: AE_FGPY005_AET - SQL Error. Error Position: 0 Return: 4063 - ORA-04063: package body "SYS.DBMS_METADATA" has errors
From database side we found after patch the database registry invalid.
SQL> select substr(comp_name,1,30) comp_name, substr(comp_id,1,10)
comp_id,substr(version,1,12) version,status from dba_registry; 2
COMP_NAME COMP_ID VERSION STATUS
------------------------------ ---------- ------------ -----------
Oracle Database Catalog Views CATALOG 11.2.0.3.0 VALID
Oracle Database Packages and T CATPROC 11.2.0.3.0 INVALID
Oracle Workspace Manager OWM 11.2.0.3.0 VALID
SQL> select comp_id, status, version from dba_registry;
COMP_ID STATUS VERSION
------------------------------ ----------- ------------------------------
CATALOG VALID 11.2.0.3.0
CATPROC INVALID 11.2.0.3.0
OWM VALID 11.2.0.3.0
The DBA has isolated the issue to invalid packages in the UMG92PRD database. Per Oracle's recommendation, we are going to run the catproc.sql to reset the packages.
After applying the solution we are able to validate all the sys objects which were invalid, dbms metada is now valid. The catproc process completed successfully