Cancel datapump Jobs

First of all, use hand this handy query to checkout Datapump Job status.


SELECT owner_name, job_name, operation, job_mode, state FROM dba_datapump_jobs;

OWNER_NAME JOB_NAME             OPERATION  JOB_MODE   STATE      
---------- -------------------- ---------- ---------- ------------
SYSTEM     EXP_FULL             EXPORT     FULL       NOT RUNNING

You can use this drop table command to delete this datapump jobs.


drop table  SYSTEM.EXP_FULL purge;
-- Here Table Name=> OWNER_NAME.JOB_NAME of dba_datapump_jobs;

Let's say, you have so many unnecessary rows in dba_datapump_jobs, use this script to generate drop table SQL Script.


SELECT 'drop table '||owner_name||'.'||job_name || ' purge;' FROM dba_datapump_jobs;

-- which will generate script like the following one, use this one to clean datapump jobs.

drop table SYSTEM.SYS_EXPORT_SCHEMA_04 purge;                                  
drop table SYSTEM.SYS_EXPORT_SCHEMA_05 purge;                                  
drop table SYSTEM.SYS_EXPORT_SCHEMA_08 purge;                                  
drop table SYSTEM.SYS_EXPORT_SCHEMA_01 purge; 

Now, let's consider a different scenario. You are in expdp or impdp console then press CTRL+C to resume datapump Job, user KILL_JOB or STOP_JOB=IMMEDIATE to cancel this job.


Processing object type DATABASE_EXPORT/SCHEMA/TABLE/TABLE_DATA
[CTRL+C]
Export> KILL_JOB
--..or..
Export> STOP_JOB=IMMEDIATE
Are you sure you wish to stop this job ([yes]/no): yes

Thanks
A Rahim Khan

Advertisements
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: