Friday 3 December 2021

How to kill running expdp/impdp job?

This document describes how to kill running export/import job.

EXPDP/IMPDP is an oracle utility to take logical backup/refresh of database, schemas, tables etc...

Sometimes we may need to stop/kill the running export or import job due to some errors or enhancements.

Export/Import job won't stop if we kill the process of the expdp/impdp or CTRL+C from windows machine.  Job runs in background even if we kill the process. Below is the process to stop the export/import job.

Step 1: Get the running expdp/impdp job details from dba_datapump_jobs view.


SQL> select * from dba_datapump_jobs;

OWNER_NAME                                                             JOB_NAME                                          OPERATION
-------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------------
JOB_MODE                                                             STATE                                                  DEGREE ATTACHED_SESSIONS DATAPUMP_SESSIONS
-------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------------------- ---------- ----------------- -----------------
SYS                                                                 EXPDP_GOLD                                          EXPORT
FULL                                                                 EXECUTING                                           2             1               4


SQL>

Step2: Find the job_name from above detials.

Job Name= EXPDP_GOLD

 

Step3: Connect to the database using attached export job_name

expdp "'/as sysdba'" attach=EXPDP_GOLD


 

Step 4: Find the expdp/impdp job status with "STATUS" command.

Export> status


Step 5: Kill the expdp/impdp job.

Export> KILL_JOB
Are you sure you wish to stop this job ([yes]/no): yes   


Step 6: We can cross verify the datapump job after complete the above  command .





Thanks for going through the blog..................


 

No comments:

Post a Comment