Wednesday, November 14, 2012

Stop Datapump Job Using PL/SQL API

Check the status of all current datapump jobs:
select *
from   dba_datapump_jobs
;
Using the PL/SQL API, attach to the job and stop it:
set serveroutput on
set lines 100
--/
declare
   handle number;
begin
  -- format: dbms_datapump.attach('','');
   handle := dbms_datapump.attach('SYS_IMPORT_SCHEMA_01','SYS');
   dbms_datapump.stop_job (handle,1,0);
end;
/
In a previous post, I showed how to achieve this with the command line utility: killing a datapump job.

No comments: