可惡的ORA-200011;KUP-11024

 

 

Errors in file /EAS/app/oracle/diag/rdbms/hseas/hseas/trace/hseas_j000_16527.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.oracle

Errors in file /EAS/app/oracle/diag/rdbms/hseas/hseas/trace/hseas_j000_16527.trcapp

內容以下:orm

*** 2016-07-09 10:09:54.738
DBMS_STATS: GATHER_STATS_JOB: GATHER_TABLE_STATS('"SYS"','"ET$018300070001"','""', ...)
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.ci

*** 2016-07-09 10:09:54.780
DBMS_STATS: GATHER_STATS_JOB: GATHER_TABLE_STATS('"SYS"','"ET$030100010001"','""', ...)
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.文檔

說明:外部表只能經過datapumpjob訪問。it

OK,那咱們先看看外部表的狀況table

set linesize 200 trimspool on
set pagesize 2000
col owner form a30
col created form a25
col last_ddl_time form a25
col object_name form a30
col object_type form a25

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$%';ast

OWNER                   OBJECT_NAME              OBJECT_TYPE        STATUS    CREATED           LAST_DDL_TIME
------------------------------ ------------------------------ ------------------------- ------- ------------------------- -------------------------
SYS                   ET$030100010001              TABLE            VALID    08-jul-2016 23:20:06      08-jul-2016 23:20:06
SYS                   ET$018300070001              TABLE            VALID    08-jul-2016 19:40:03      08-jul-2016 19:40:03form

 

OK,確實存在兩條外部表記錄,在查看下這個外部表類型:sed

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

OWNER                   TABLE_NAME              DEFAULT_DIRECTORY_NAME         ACCESS_
------------------------------ ------------------------------ ------------------------------ -------
SYS                   ET$018300070001              DUMP                 CLOB
SYS                   ET$030100010001              DUMP                 CLOB

SQL> select count(*) from ET$018300070001;
select count(*) from ET$018300070001
*
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.

查詢外表表時,報錯顯示和alert一致。

 

解決方法有兩種

第一種:直接幹掉這些外部表。

SQL> drop table  ET$018300070001 purge;

Table dropped.

SQL> drop table  ET$030100010001 purge;

Table dropped.

 

 

第二種:鎖定這些外部表的統計信息:

dbms_stats.lock_table_stats(‘SYS'.'tabname');

 

而後從新跑impdp。

 

參考: ORA-20011 ORA-29913 and ORA-29400 with Associated KUP-XXXXX Errors from DBMS_STATS.GATHER_STATS_JOB (文檔 ID 1274653.1) How To Cleanup Orphaned DataPump Jobs In DBA_DATAPUMP_JOBS ? (文檔 ID 336014.1)

相關文章
相關標籤/搜索