Friday, May 23, 2014

Oracle: Stop a datapump job run via crontab

Show datapump jobs
select * from dba_datapump_jobs;
Stop a datapump job
DECLARE
   handle NUMBER;
BEGIN
    -- Format: DBMS_DATAPUMP.attach('[job_name]','[owner_name]');
    handle := DBMS_DATAPUMP.attach('SYS_EXPORT_FULL_02','SYSTEM');
    DBMS_DATAPUMP.STOP_JOB(handle, 1, 0);
END;