Tuesday, August 11, 2015

GATHER_STATS_JOB encountered errors.

DBMS_STATS: GATHER_STATS_JOB encountered errors.  Check the trace file.
Errors in file /u01/oracle/app/diag/rdbms/sblcbs/sblcbs/trace/sblcbs_j001_6292190.trc:
ORA-20011: Approximate NDV failed: ORA-29913: error in executing ODCIEXTTABLEOPEN callout
KUP-11024: This external table can only be accessed from within a Data Pump job.
End automatic SQL Tuning Advisor run for special tuning task  "SYS_AUTO_SQL_TUNING_TASK"

Cause : Temporary Datapump external tables have not been cleaned up properly.

Solution : The dictionary information should have been dropped when the Data Pump jobs completed.

Find all external table using this query and drop if Data Pump jobs completed.

SELECT OWNER,
       OBJECT_NAME,
       OBJECT_TYPE,
       STATUS
  FROM DBA_OBJECTS
 WHERE OBJECT_NAME LIKE 'ET$%'


SQL> col OBJECT_NAME format a30
SQL>
SQL> SELECT OWNER,
       OBJECT_NAME,
       OBJECT_TYPE,
       STATUS
  FROM DBA_OBJECTS
 WHERE OBJECT_NAME LIKE 'ET$%'  2    3    4    5    6  ;
OWNER                          OBJECT_NAME                    OBJECT_TYPE         STATUS
------------------------------ ------------------------------ ------------------- -------
CBSPROD                        ET$0C0900F50001                TABLE               VALID
SQL>
SQL> DROP TABLE CBSPROD.ET$0C0900F50001 PURGE;
Table dropped.
SQL>

No comments:

Post a Comment