Stop or kill a datapump job

Summary 

A very simple way to stop/kill a datapump job.

1. First check what datapump jobs are running:

SQL> select * from dba_datapump_jobs;

OWNER_NAME  JOB_NAME              OPERATION   JOB_MODE   STATE      DEGREE ATTAC
------------------------------ ------------------------------ -------------------
SYSTEM      SYS_EXPORT_FULL_01    EXPORT        FULL   EXECUTING     32         1

2. To stop/kill the datapump job, login as sysdba and execute from sqlplus:

DECLARE
   h1 NUMBER;
BEGIN
   h1 := DBMS_DATAPUMP.ATTACH('JOB_NAME','OWNER_NAME');
   DBMS_DATAPUMP.STOP_JOB (h1,1,0);
END;
/

for example:

DECLARE
   h1 NUMBER;
BEGIN
   h1 := DBMS_DATAPUMP.ATTACH('SYS_EXPORT_FULL_01','SYSTEM');
   DBMS_DATAPUMP.STOP_JOB (h1,1,0);
END;
/

3. After stopping the datapump job, oracle removes and the dmp files that already have been produced. Check again: 

SQL> select * from dba_datapump_jobs;

Comments

Popular posts from this blog

ORA-01565: error in identifying file '?/dbs/spfile@.ora'

Reboot Exadata Machine

How to combine Oracle .ova files