In today’s article, I will tell you how to Kill Data Pump Jobs in 3 steps.
1. First, Data Pump Jobs are listed.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | 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 -- locate Data Pump jobs: SQL> 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; owner_name job_name operation job_mode state attached_sessions ------------------ ----------------------------- -------------- ------------- --------------- ------------------------ SYS SYS_IMPORT_FULL_01 IMPORT FULL EXECUTING 1 |
2. We got the two information (owner_name, job_name) we need to kill with the above query.
Now we can Kill Data Pump Job.
1 2 3 4 5 6 7 8 9 10 | SET serveroutput on SET lines 100 DECLARE h1 NUMBER; BEGIN -- Format: DBMS_DATAPUMP.ATTACH('[job_name]','[owner_name]'); h1 := DBMS_DATAPUMP.ATTACH('SYS_IMPORT_SCHEMA_01','SCHEMA_USER'); DBMS_DATAPUMP.STOP_JOB (h1,1,0); END; / |
3. We check if the jobs are Kill.
1 2 3 | SQL> 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; no rows selected |