Tuesday, October 05, 2010

Datapump Orphaned Job

Datapump Orphaned Job

Follow the steps to cleanup Datapump orphaned job


 

Step 1

Connect to Database using SQLPLUS

CONNECT / as sysdba
SET lines 200
COL owner_name FORMAT a10;
COL job_name FORMAT a20
COL state FORMAT a11
COL operation LIKE state
COL job_mode LIKE state

Step 2

locate Data Pump jobs:

SELECT owner_name, job_name, operation, job_mode,
state, attached_sessions
FROM dba_datapump_jobs
WHERE job_name NOT LIKE 'BIN$%'
ORDER BY 1,2;

Step 3

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;
  
Step 4

drop table from the output of step 3

DROP TABLE SCOTT.JOB1;

Hope this help. Regards Rupam