ORA-20011 ORA-29913 KUP-11024 GATHER_TABLE_STATS


--alter 日志
Sat Mar 30 22:01:08 2019
DBMS_STATS: GATHER_STATS_JOB encountered errors. Check the trace file.
Errors in file /u01/app/oracle/diag/rdbms/bapdb/db2/trace/db2_j001_28934.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.

ORA-20011 ORA-29913 KUP-11024

--trace 文件
[oracle@db2 trace]$ more /u01/app/oracle/diag/rdbms/bapdb/db2/trace/db2_j001_28934.trc
Trace file /u01/app/oracle/diag/rdbms/bapdb/db2/trace/db2_j001_28934.trc
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP,
Data Mining and Real Application Testing options
ORACLE_HOME = /u01/app/oracle/11.2.0/db_1
System name: Linux
Node name: db2
Release: 3.8.13-68.3.4.el6uek.x86_64
Version: #2 SMP Tue Jul 14 15:03:36 PDT 2015
Machine: x86_64
Instance name: db2
Redo thread mounted by this instance: 2
Oracle process number: 140
Unix process pid: 28934, image: oracle@db2 (J001)


*** 2019-03-30 22:01:08.506
*** SESSION ID:(6788.22093) 2019-03-30 22:01:08.506
*** CLIENT ID:() 2019-03-30 22:01:08.506
*** SERVICE NAME:(SYS$USERS) 2019-03-30 22:01:08.506
*** MODULE NAME:(DBMS_SCHEDULER) 2019-03-30 22:01:08.506
*** ACTION NAME:(ORA$AT_OS_OPT_SY_32713) 2019-03-30 22:01:08.506

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.

*** 2019-03-30 22:01:08.506
DBMS_STATS: GATHER_STATS_JOB: GATHER_TABLE_STATS('"SYS"','"ET$1F79F0570001"','""', ...)
DBMS_STATS: 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.
[oracle@db2 trace]$

--MOS 文章---1274653.1

---解决办法:

select OWNER,OBJECT_NAME,OBJECT_TYPE, status,
to_char(CREATED,'dd-mon-yyyy hh24:mi:ss') created
,to_char(LAST_DDL_TIME , 'dd-mon-yyyy hh24:mi:ss') last_ddl_time
from dba_objects
where object_name like 'ET$%'

1 SYS ET$1F79F0570001 TABLE VALID 29-mar-2019 03:49:00 29-mar-2019 03:49:00


select owner, TABLE_NAME, DEFAULT_DIRECTORY_NAME, ACCESS_TYPE
from dba_external_tables
order by 1,2

1 SYS ET$1F79F0570001 EXP_SHENGCHAN CLOB


22:19:35 SYS@db2(db2)> select count(1) from SYS.ET$1F79F0570001;
select count(1) from SYS.ET$1F79F0570001
*
ERROR at line 1:
ORA-29913: error in executing ODCIEXTTABLEOPEN callout
KUP-11024: This external table can only be accessed from within a Data Pump
job.


drop table SYS.ET$1F79F0570001 purge;


22:20:02 SYS@db2(db2)> drop table SYS.ET$1F79F0570001 purge;

Table dropped.

22:21:55 SYS@db2(db2)>

原文地址:https://www.cnblogs.com/ss-33/p/10629569.html