今天巡检发现alert中报如下错:
ORA-20011:Approximate NDV failed:ORA-29913:M-VM-4M-PM-P ODCIEXTTABLEOPEN M-5M-wM-3M-vM-JM-1M-3M-vM-4M-m
KUP-11024:This external table can only be accessed from within a Data Pump job
错误分析:
导出任务结束后,外部表没有正常删除,数据字典中还有信息残留,表实际已不存在。
当数据库运行收集统计信息job时收集这些外部表时就报错。
详细处理如下:
1、查找ET开头的对象:
select owner,
object_name,
object_type,
status,
to_char(created, 'yyyy-mm-dd hh24:mi:ss') created,
to_char(last_ddl_time, 'yyyy-mm-dd hh24:mi:ss') last_ddl_time
from dba_objects
where object_name like 'ET$%'
OWNER OBJECT_NAME OBJECT_TYPE STATUS CREATED LAST_DDL_TIME
------------------------------ ---------------------------------------- ------------------- ------- ------------------- -------------------
UOP_D10086 ET$293004F90001 SYNONYM VALID 2015-02-05 14:58:10 2015-02-05 14:58:10
UOP_D10086 ET$149335F10002 SYNONYM VALID 2015-01-19 21:36:03 2015-01-19 22:05:07
UOP_D10086 ET$0D4D77230001 SYNONYM VALID 2015-01-29 10:47:17 2015-01-29 10:47:17
UOP_D10086 ET$08D223970001 SYNONYM VALID 2015-01-19 21:36:03 2015-01-19 22:05:07
UU_DB ET$293004F90001 TABLE VALID 2015-01-29 12:52:07 2015-01-29 12:52:07
UU_DB ET$21D463950002 TABLE VALID 2015-02-08 00:38:00 2015-02-08 00:38:00
UU_DB ET$1EFC4B190002 TABLE VALID 2015-02-07 14:41:35 2015-02-07 14:41:35
2、确认属于dump生成的外部表
select owner,table_name,default_directory_name,access_type from dba_external_tables order by 1,2;
OWNER TABLE_NAME DEFAULT_DIRECTORY_NAME ACCESS_
------------------------------ ------------------------------ ------------------------------ -------
UU_DB ET$0D4D77230001 DMP CLOB
UU_DB ET$1EFC4B190002 DMP CLOB
UU_DB ET$21D463950002 DMP CLOB
UU_DB ET$293004F90001 DMP CLOB
UU_DB1 ET$14C780870001 DMP CLOB
3、删除之后,连续观察2天发现不在报错。
drop table UU_DB.ET$0D4D77230001;
drop table UU_DB.ET$1EFC4B190002;
drop table UU_DB.ET$21D463950002;
drop table UU_DB.ET$293004F90001;
drop table UU_DB1.ET$14C780870001;
: