今天在导出一个模式的时候,约140GB,出现例如以下错误:

UDE-00008: operation generated ORACLE error 31626

ORA-31626: job does not exist

ORA-06512: at "SYS.KUPC$QUE_INT", line 536

ORA-25254: time-out in LISTEN while waiting for a message

ORA-06512: at "SYS.DBMS_DATAPUMP", line 2772

ORA-06512: at "SYS.DBMS_DATAPUMP", line 3886

ORA-06512: at line 1

MOS上面给的解释:

CAUSE

The problem is due to the fact that there are so-called orphaned Datapump jobs (i.e. Datapump actions that failed but are not cleaned up properly) still in the database.

SOLUTION

The solution is to clean the traces of these orphaned jobs by using the steps outlined in 

Note 336014.1 - How To Cleanup Orphaned DataPump Jobs In DBA_DATAPUMP_JOBS ?

After that, restart the Datapump operation.





How To Cleanup Orphaned DataPump Jobs In DBA_DATAPUMP_JOBS ? (文档 ID 336014.1) 转究竟部

In this Document


Goal

Solution

Additional
Resources

APPLIES TO:

Oracle Database – Enterprise Edition – Version 10.1.0.2 to 12.1.0.1 [Release 10.1 to 12.1]

Oracle Database – Standard Edition – Version 10.1.0.2 to 12.1.0.1 [Release 10.1 to 12.1]

Oracle Database – Personal Edition – Version 10.1.0.2 to 12.1.0.1 [Release 10.1 to 12.1]

Enterprise Manager for Oracle Database – Version 10.1.0.2 to 12.1.0.6.0 [Release 10.1 to 12.1]

Information in this document applies to any platform.

***Checked for relevance on 29-Apr-2014***

GOAL

How to cleanup orphaned Data Pump jobs in DBA_DATAPUMP_JOBS ?

SOLUTION

The jobs used in this example:

- Export job SCOTT.EXPDP_20051121 is a schema level export that is running

- Export job SCOTT.SYS_EXPORT_TABLE_01 is an orphaned table level export job

- Export job SCOTT.SYS_EXPORT_TABLE_02 is a table level export job that was stopped

- Export job SYSTEM.SYS_EXPORT_FULL_01 is a full database export job that is temporary stopped

Step 1. Determine in SQL*Plus which Data Pump jobs exist in the database:

%sqlplus /nolog

CONNECT / as sysdba 

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

– locate Data Pump jobs:

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

 ORDER BY 1,2;

OWNER_NAME JOB_NAME            OPERATION JOB_MODE  STATE       ATTACHED

———- ——————- ——— ——— ———– ——–

SCOTT      EXPDP_20051121      EXPORT    SCHEMA    EXECUTING          1

SCOTT      SYS_EXPORT_TABLE_01 EXPORT    TABLE     NOT RUNNING        0 

SCOTT      SYS_EXPORT_TABLE_02 EXPORT    TABLE     NOT RUNNING        0 

SYSTEM     SYS_EXPORT_FULL_01  EXPORT    FULL      NOT RUNNING        0

Step 2. Ensure that the listed jobs in dba_datapump_jobs are not export/import Data Pump jobs that are active: status should be 'NOT RUNNING'.

Step 3. Check with the job owner that the job with status 'NOT RUNNING' in dba_datapump_jobs is not an export/import Data Pump job that has been temporary stopped, but is actually a job that failed. (E.g. the full database export
job by SYSTEM is not a job that failed, but was deliberately paused with STOP_JOB).

Step 4. Determine in SQL*Plus the related master tables:

– locate Data Pump master tables:

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 

   AND j.job_name NOT LIKE 'BIN$%' ORDER BY 4,2;

STATUS   OBJECT_ID OBJECT_TYPE  OWNER.OBJECT 

——- ———- ———— ————————- 

VALID        85283 TABLE        SCOTT.EXPDP_20051121 

VALID        85215 TABLE        SCOTT.SYS_EXPORT_TABLE_02 

VALID        85162 TABLE        SYSTEM.SYS_EXPORT_FULL_01

Step 5. For jobs that were stopped in the past and won't be restarted anymore, delete the master table. E.g.:

DROP TABLE scott.sys_export_table_02;

– For systems with recycle bin additionally run:

purge dba_recyclebin;

Step 6. Re-run the query on dba_datapump_jobs and dba_objects (step 1 and 4). If there are still jobs listed in dba_datapump_jobs, and these jobs do not have a master table anymore, cleanup the job while connected as the job owner.
E.g.:

CONNECT scott/tiger

SET serveroutput on 

SET lines 100 

DECLARE 

   h1 NUMBER; 

BEGIN 

   h1 := DBMS_DATAPUMP.ATTACH('SYS_EXPORT_TABLE_01','SCOTT'); 

   DBMS_DATAPUMP.STOP_JOB (h1); 

END; 

/

Note that after the call to the STOP_JOB procedure, it may take some time for the job to be removed. Query the view user_datapump_jobs to check whether the job has been removed:

CONNECT scott/tiger

SELECT * FROM user_datapump_jobs;

Step 7. Confirm that the job has been removed:

CONNECT / as sysdba 

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

– locate Data Pump jobs:

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

 ORDER BY 1,2;

OWNER_NAME JOB_NAME            OPERATION JOB_MODE  STATE       ATTACHED 

———- ——————- ——— ——— ———– ——– 

SCOTT      EXPDP_20051121      EXPORT    SCHEMA    EXECUTING          1 

SYSTEM     SYS_EXPORT_FULL_01  EXPORT    FULL      NOT RUNNING        0

– locate Data Pump master tables:

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 

   AND j.job_name NOT LIKE 'BIN$%' ORDER BY 4,2;

STATUS   OBJECT_ID OBJECT_TYPE  OWNER.OBJECT 

——- ———- ———— ————————- 

VALID        85283 TABLE        SCOTT.EXPDP_20051121 

VALID        85162 TABLE        SYSTEM.SYS_EXPORT_FULL_01

Remarks:

1. Orphaned Data Pump jobs do not have an impact on new Data Pump jobs. The view dba_datapump_jobs is a view, based on gv$datapump_job, obj$, com$, and user$. The view shows the Data Pump jobs that are still running, or jobs for which the master table was kept
in the database, or in case of an abnormal end of the Data Pump job (the orphaned job). If a new Data Pump job is started, a new entry will be created, which has no relation to the old Data Pump jobs.

2. When starting the new Data Pump job and using a system generated name, we check the names of existing Data Pump jobs in the dba_datapump_job in order to obtain a unique new system generated jobname. Naturally, there needs to
be enough free space for the new master table to be created in the schema that started the new Data Pump job.

3. A Data Pump job is not the same as a job that is defined with DBMS_JOBS. Jobs created with DBMS_JOBS use there own processes. Data Pump jobs use a master process and worker process(es). In case a Data Pump still is temporary
stopped (STOP_JOB while in interactive command mode), the Data Pump job still exists in the database (status: NOT RUNNING), while the master and worker process(es) are stopped and do not exist anymore. The client can attach to the job at a later time, and
continue the job execution (START_JOB).

4. The possibility of corruption when the master table of an active Data Pump job is deleted, depends on the Data Pump job.

4.a. If the job is an export job, corruption is unlikely as the drop of the master table will only cause the Data Pump master and worker processes to abort. This situation is similar to aborting an export of the
original export client.

4.b. If the job is an import job then the situation is different. When dropping the master table, the Data Pump worker and master processes will abort. This will probably lead to an incomplete import: e.g. not all
table data was imported, and/or table was imported incomplete, and indexes, views, etc. are missing. This situation is similar to aborting an import of the original import client.

The drop of the master table itself, does not lead to any data dictionary corruption. If you keep the master table after the job completes (using the undocumented parameter: KEEP_MASTER=Y), then a drop of the master table afterwards,
will not cause any corruption

UDE-00008 ORA-31626 ORA-06512 ORA-25254的更多相关文章

  1. Oracle启动中,spfile.ora、init<SID>.ora、spfile<SID>.ora 这三个文件正确的先后顺序是什么?

    Oracle启动中,spfile.ora.init<SID>.ora.spfile<SID>.ora 这三个文件正确的先后顺序是什么? 解答:启动数据库,使用startup命令 ...

  2. oracle--本地网络配置tnsnames.ora和监听器listener.ora

    文件tnsnames.ora 是给orcl客户端使用 配置本地网络服务:(客户端) 第一种使用暴力方式直接操作: 修改:C:\app\Administrator\product\11.2.0\dbho ...

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

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

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

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

  5. Oracle的sqlnet.ora与password文件试验

    先看有没有sqlnet.ora [oracle@localhost ~]$ cd $ORACLE_HOME[oracle@localhost dbhome_1]$ cd network[oracle@ ...

  6. 转载《Oracle的tnsnames.ora配置(PLSQL Developer)》

    源地址:https://www.cnblogs.com/qq3245792286/p/6212617.html. 首先打开tnsnames.ora的存放目录,一般为D:\app\Administrat ...

  7. [转帖]sqlnet.ora常用参数

    sqlnet.ora常用参数 注﹕在修改sqlnet.ora文件之后重新启动监听﹐修改才能生效﹗﹗﹗ oracle网络设置主要包括三个文件,sqlnet.ora\ lisnter.ora\ tnsna ...

  8. PLSQL连接ORACLE配置字符串简介 oracle网络配置 三个配置文件 listener.ora、sqlnet.ora、tnsnames.ora原理解释

    PLSQL连接ORACLE配置字符串简介 oracle网络配置 三个配置文件 listener.ora.sqlnet.ora.tnsnames.ora原理解释 oracle网络配置三个配置文件 lis ...

  9. oracle安装完成后目录中不论有没有tnsnames.ora和listener.ora文件 PLSQL都能连上的问题解决方法

    今天遇到这个问题了,发现listener.ora文件和tnsnames.ora文件在Net Work文件夹下没有,正常情况下安装完oracle或者是oracle Client是会有的,但是在Net M ...

  10. oracle: listener.ora 、sqlnet.ora 、tnsnames.ora的配置及例子

    1.解决问题:TNS或者数据库不能登录.      最简单有效方法:使用oracle系统提供的工具 netca 配置(把原来的删除掉重新配置)     $netca  2.然而,仍有疑问:如何指定'l ...

随机推荐

  1. 移动无边框窗体(设置标志位更流畅,或者发送WM_SYSCOMMAND和SC_MOVE + HTCAPTION消息)

    移动无边框窗体的代码网上很多,其原理都是一样的,但是是有问题的,我这里只是对其修正一下 网上的代码仅仅实现了两个事件 void EditDialog::mousePressEvent(QMouseEv ...

  2. 让盘古分词支持最新的Lucene.Net 3.0.3

    原文:让盘古分词支持最新的Lucene.Net 3.0.3 好多年没升级过的Lucene.Net最近居然升级了,到了3.0.3后接口发生了很大变化,原来好多分词库都不能用了,所以上次我把MMSeg给修 ...

  3. Hongwei Xi

    Hongwei Xi Hongwei Xi Hongwei Xi's Curriculum Vita Hongwei Xi

  4. ios捕获异常并发送图片,便于解决bug

    在开发过程中,我们有时候会留下Bug,用户在使用我们的app 的时候,有时会出现闪退,这时候我们能够让用户给我们发送邮件,以让我们开发者更加高速的地位到Bug的所在.以最快的时间解决.同一时候也提高用 ...

  5. 正則表達式验证邮箱,qq,座机,手机,网址

    手机: var reg=/^1[34578]\d{9}$/; if(reg.test("你输入的手机号码") ) { alert("手机号码输入正确") } e ...

  6. Repeater

  7. ADO面板上的控件简介

    ADO面板上的控件简介 一. TADOConnection组件该组件用于建立数据库的连接.ADO的数据源组件和命令组件可以通过该组件运行命令及数据库中提取数据等.该组件用于建立数据库的连接,该连接可被 ...

  8. Java模拟POST表单提交HttpClient操作

    public static void Login() { String url = "http://www.***.com/login"; PostMethod postMetho ...

  9. osgEarth开发之OSG解构——失败的尝试

    概述 本文在吸收了<最长的一帧>以及相关参考资料的基础之上解读OSG的基础数据结构,渲染方法. 实现 在这第一部分里,要理解的是run函数的实现,因为以下这一段证明了它的重要性和强大的能力 ...

  10. HTTP POST请求的Apache Rewrite规则设置

    最近自测后端模块时有个业务需求需要利用WebServer(我用的是Apache)将HTTP POST请求转发至后端C模块,后端处理后返回2进制加密数据.http post请求的url格式为:     ...