首先在alert log裡面頻繁的看見如下錯誤:

DBMS_STATS: GATHER_STATS_JOB encountered errors.  Check the trace file.
Errors in file /oracle/diag/rdbms/phalr/phalr/trace/phalr_j001_5306.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.

查看trc文件

oracle@phalrdb1: /oracle/diag/rdbms/phalr/phalr/trace> more /oracle/diag/rdbms/phalr/phalr/trace/phalr_j001_5306.trc
Trace file /oracle/diag/rdbms/phalr/phalr/trace/phalr_j001_5306.trc
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
ORACLE_HOME = /oracle/product/11.2.0
System name:    Linux
Node name:    phalrdb1
Release:    2.6.32-431.el6.x86_64
Version:    #1 SMP Sun Nov 10 22:19:54 EST 2013
Machine:    x86_64
Instance name: phalr
Redo thread mounted by this instance: 1
Oracle process number: 46
Unix process pid: 5306, image: oracle@phalrdb1 (J001)

*** 2016-11-19 06:00:13.568
*** SESSION ID:(2209.51473) 2016-11-19 06:00:13.568
*** CLIENT ID:() 2016-11-19 06:00:13.568
*** SERVICE NAME:(SYS$USERS) 2016-11-19 06:00:13.568
*** MODULE NAME:(DBMS_SCHEDULER) 2016-11-19 06:00:13.568
*** ACTION NAME:(ORA$AT_OS_OPT_SY_2339) 2016-11-19 06:00:13.568
 
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.

*** 2016-11-19 06:00:13.568
DBMS_STATS: GATHER_STATS_JOB: GATHER_TABLE_STATS('"PHALWDA1"','"ET$081400230001"','""', ...)
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.

不太看得明白,去MOS搜索到一篇文章

ORA-20011 ORA-29913 and ORA-29400 with Associated KUP-XXXXX Errors from DBMS_STATS.GATHER_STATS_JOB (Doc ID 1274653.1)

该文详尽的描述了解决这个异常,我们在datadump导入导出的都是,都会产生一个类似SYS_EXPORT_TABLE_02的表,如果是正常导完oracle会自动清除这个表,那么如果导入导出的时候中断,那么这个表就不会被清除,这个ora错误的引起就与这个有关系。

Temporary Datapump external tables have not been cleaned up properly. The dictionary information should have been dropped when the DataPump jobs completed.

解决方案就是清除Datapump遗留的临时外部表,下面是详细过程

[BEGIN] 2016/11/25 下午 05:19:51
SET lines 200
COL owner_name FORMAT a10;
COL job_name FORMAT a20
COL state FORMAT a12
COL operation LIKE state
COL job_mode LIKE state
COL owner.object for a50
SQL>
-- locate Data Pump jobs:
SQL>
SELECT owner_name, job_name, rtrim(operation) "OPERATION",
       rtrim(job_mode) "JOB_MODE", state, attached_sessions
  FROM dba_datapump_jobs
WHERE job_name NOT LIKE 'BIN$%'
  5   ORDER BY 1,2;

OWNER_NAME JOB_NAME        OPERATION    JOB_MODE      STATE        ATTACHED_SESSIONS
---------- -------------------- ------------ ------------ ------------ -----------------
PHALWDA1   SYS_EXPORT_TABLE_01    EXPORT         TABLE      NOT RUNNING               0
PHALWDA1   SYS_EXPORT_TABLE_02    EXPORT         TABLE      NOT RUNNING               0
PHALWDA1   SYS_IMPORT_FULL_01    IMPORT         FULL      NOT RUNNING               0

SELECT o.status, o.object_id, o.object_type,
       o.owner||'.'||object_name "OWNER.OBJECT"
  FROM dba_objects o, dba_datapump_jobs j
WHERE o.owner=j.owner_name AND o.object_name=j.job_name
  5     AND j.job_name NOT LIKE 'BIN$%' ORDER BY 4,2;

STATUS               OBJECT_ID OBJECT_TYPE                           OWNER.OBJECT
--------------------- ---------- --------------------------------------------------------- --------------------------------------------------
VALID               76494 TABLE                               PHALWDA1.SYS_EXPORT_TABLE_01
VALID               76497 TABLE                               PHALWDA1.SYS_EXPORT_TABLE_02
VALID               81868 TABLE                               PHALWDA1.SYS_IMPORT_FULL_01

SQL> drop table PHALWDA1.SYS_EXPORT_TABLE_01;

Table dropped.

SQL> drop table PHALWDA1.SYS_EXPORT_TABLE_02;

Table dropped.

SQL> drop table PHALWDA1.SYS_IMPORT_FULL_01;

Table dropped.

SQL> purge dba_recyclebin;

DBA Recyclebin purged.

SET lines 200
COL owner_name FORMAT a10;
COL job_name FORMAT a20
COL state FORMAT a12
COL operation LIKE state
COL job_mode LIKE state
COL owner.object for a50
SQL>
-- locate Data Pump jobs:
SQL>
SELECT owner_name, job_name, rtrim(operation) "OPERATION",
       rtrim(job_mode) "JOB_MODE", state, attached_sessions
  FROM dba_datapump_jobs
WHERE job_name NOT LIKE 'BIN$%'
  5   ORDER BY 1,2;

no rows selected

spool obj.out
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
SQL>
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$%'
/

select owner, TABLE_NAME, DEFAULT_DIRECTORY_NAME, ACCESS_TYPE

OWNER                   OBJECT_NAME              OBJECT_TYPE        STATUS              CREATED            LAST_DDL_TIME
------------------------------ ------------------------------ ------------------------- --------------------- ------------------------- -------------------------
PHALWDA1               ET$081400230001              TABLE            VALID              01-oct-2016 08:35:49    01-oct-2016 08:35:49

from dba_external_tables
order by 1,2
/

OWNER                   TABLE_NAME
------------------------------ ------------------------------------------------------------------------------------------
DEFAULT_DIRECTORY_NAME                                       ACCESS_TYPE
------------------------------------------------------------------------------------------ ---------------------
PHALWDA1               ET$081400230001
BACKUP                                               CLOB

SQL> SQL> spool off
SQL> quit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
oracle@phalrdb1: /home/oracle> ls
cc  chk_cmd  chk_lst  dba_cmd  obj.out
oracle@phalrdb1: /home/oracle> more obj.out
SQL> set linesize 200 trimspool on
SQL> set pagesize 2000
SQL> col owner form a30
SQL> col created form a25
SQL> col last_ddl_time form a25
SQL> col object_name form a30
SQL> col object_type form a25
SQL>
SQL> select OWNER,OBJECT_NAME,OBJECT_TYPE, status,
  2  to_char(CREATED,'dd-mon-yyyy hh24:mi:ss') created
  3  ,to_char(LAST_DDL_TIME , 'dd-mon-yyyy hh24:mi:ss') last_ddl_time
  4  from dba_objects
  5  where object_name like 'ET$%'
  6  /

OWNER                          OBJECT_NAME                    OBJECT_TYPE               STATUS                CREATED                   LAST_DDL_TIME
------------------------------ ------------------------------ ------------------------- --------------------- ------------------------- --------------------
-----
PHALWDA1                       ET$081400230001                TABLE                     VALID                 01-oct-2016 08:35:49      01-oct-2016 08:35:49

SQL>
SQL> select owner, TABLE_NAME, DEFAULT_DIRECTORY_NAME, ACCESS_TYPE
  2  from dba_external_tables
  3  order by 1,2
  4  /

OWNER                          TABLE_NAME
------------------------------ ------------------------------------------------------------------------------------------
DEFAULT_DIRECTORY_NAME                                                                     ACCESS_TYPE
------------------------------------------------------------------------------------------ ---------------------
PHALWDA1                       ET$081400230001
BACKUP                                                                                     CLOB

SQL>
SQL> spool off
oracle@phalrdb1: /home/oracle> sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Fri Nov 25 17:33:55 2016

Copyright (c) 1982, 2013, Oracle.  All rights reserved.

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> drop table PHALWDA1.ET$081400230001 purge;

Table dropped.

[END] 2016/11/25 下午 05:35:40

参考:

ORA-20011 ORA-29913 and ORA-29400 with Associated KUP-XXXXX Errors from DBMS_STATS.GATHER_STATS_JOB (Doc ID 1274653.1)

How To Cleanup Orphaned DataPump Jobs In DBA_DATAPUMP_JOBS ? (Doc ID 336014.1)

ORA-20011 ORA-29913 and ORA-29400 with Associated KUP-XXXXX Errors from DBMS_STATS.GATHER_STATS_JOB(Doc ID 1274653.1)的更多相关文章

  1. Oracle的tnsnames.ora配置(PLSQL Developer)

    首先打开tnsnames.ora的存放目录,一般为D:\app\Administrator\product\11.2.0\client_1\network\admin,就看安装具体位置了. 步骤阅读 ...

  2. listener.ora/sqlnet.ora/tnsnames.ora配置文件详解

    oracle网络配置 三个配置文件 listener.ora.sqlnet.ora.tnsnames.ora ,都是放在$ORACLE_HOME/network/admin目录下. 英文说明: The ...

  3. ORACLE配置tnsnames.ora文件实例

    ORACLE配置tnsnames.ora文件实例客户机为了和服务器连接,必须先和服务器上的监听进程联络.ORACLE通过tnsnames.ora文件中的连接描述符来说明连接信息.一般tnsnames. ...

  4. ORACLE RAC 下非缺省端口监听配置(listener.ora tnsnames.ora)

    不论是单实例还是RAC,对于非缺省端口下(1521)的监听器,pmon进程不会将service/instance注册到监听器,即不会实现动态注册.与单实例相同,RAC非缺省端口的监听器也是通过设置参数 ...

  5. 在TNSNAMES.ORA文件中配置本机装的oracle

    首先,感谢这两位网友:http://zhidao.baidu.com/link?url=eGYeoEa-EhQdVitSGqjE36uNfVmEsryXH1WUjPue6YvArDSx-Y1N9_rd ...

  6. oracle的sqlnet.ora , tnsnames.ora , Listener.ora 文件的作用(转)

    oracle网络配置三个配置文件 listener.ora.sqlnet.ora.tnsnames.ora ,都是放在$ORACLE_HOME/network/admin目录下.1. sqlnet.o ...

  7. init.ora, pfile, spfile

    实例启动时,查找初始化参数文件的顺序为: spfile<sid>.oraspfile.orainit<sid>.ora 如果以上3个文件都不存在,则实例无法启动. init.o ...

  8. ORA-19566: exceeded limit of 0 corrupt blocks for file E:\xxxx\<datafilename>.ORA.

    How to Format Corrupted Block Not Part of Any Segment (Doc ID 336133.1) To BottomTo Bottom In this D ...

  9. Orace 12.2 ORA-12012: error on auto execute of job "SYS"."ORA$AT_OS_OPT_SY_21"

    一个测试环境的12.2.0.1数据库后台alert不断报出以下错误信息: Errors in file /d12/app/oracle/diag/rdbms/test/test/trace/test_ ...

随机推荐

  1. deepin 15.3 安装数据库MariaDB10.0

    直接终端执行安装命令即可 sudo apt-get install mariadb-server -y 查询DB编码 #进入数据库 mysql -uroot -p #显示默认编码 show varia ...

  2. yii 核心类classes.php详解(持续更新中...)

    classes.php在yii运行的时候将被自动加载,位于yii2文件夹底下. <?php /** * Yii core class map. * * This file is automati ...

  3. gulp watch出现Error: watch null EPERM的问题解释

    出现这样的问题,一般是第一次运行导致的,而且任务上有删除文件的操作. 我观察发现,只要把输出目录的文件删除,然后重新运行watch就一些ok,后者再运行一次gulp watch就一切正常.

  4. 基于Linux平台的libpcap源码分析和优化

    目录 1..... libpcap简介... 1 2..... libpcap捕包过程... 2 2.1        数据包基本捕包流程... 2 2.2        libpcap捕包过程... ...

  5. BZOJ4567[Scoi2016]背单词

    4567: [Scoi2016]背单词 Time Limit: 10 Sec Memory Limit: 256 MB Submit: 304 Solved: 114 [Submit][Status] ...

  6. MQTT开发笔记之《MQTT Server》

    MQTT SERVER 性能测试报告 : http://w3yyb.sinaapp.com/archives/1601各个MQTT SERVER功能列表: http://blog.lenix.xyz/ ...

  7. asp.net mvc 通过T4模板生成框架

    http://www.cnblogs.com/rdst/archive/2012/08/13/2637210.html http://www.kuqin.com/shuoit/20140716/341 ...

  8. CSS3学习(圆角、图片、阴影、背景、渐变、文本、字体、2D、3D、过渡等)

    matrix CSS3 1.  圆角 border-radius:边框圆角的圆角半径 四个值:第一个值为左上角,第二个值为右上角,第三个值为右下角,第四个值为左下角. 三个值:第一个值为左上角, 第二 ...

  9. 解决COM组件80070005错误

    前段时间在维护公司以前的项目时遇到一个问题,客户需要添加一个word文档合并功能,按理说这功能比较好实现,只要调用Office自带的COM组件就搞定了,但实际上并非如此,在客户端部署上以后运行报错,提 ...

  10. php中session锁--如何防止阻塞请求(译)

    现代浏览器限制到一个host并发连接的数量一般为4或6.这意味着,如果您的web页面加载几十个来自同一个host的assert file(js.图像.css)时,由于并发数的限制,会产生排队.同样甚至 ...