今天巡检发现alert中报如下错:
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.
错误分析:
外部表没有正常删除,数据字典中还有信息残留,表实际已不存在。
当数据库运行收集统计信息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
------------------- --------------------------- ----------------------- -------------- ---------------------------- ------------------
SYS ET$0B2100030001 TABLE VALID 2019-03-23 13:46:49 2019-03-23 13:46:49
SYS ET$09E100030001 TABLE VALID 2019-03-16 16:01:21 2019-03-16 16:01:21
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_
--------------------- ------------------------------ ---------------------------------------------- ------
SYS ET$09E100030001 DP_DIR CLOB
SYS ET$0B2100030001 DP_DIR CLOB
3、删除之后,连续观察2天发现不在报错。
drop table SYS.ET$09E100030001;
drop table SYS.ET$0B2100030001;