How To Break And Restart A DataPump Export Or Import Job
1. DataPump Export
expdp system/<password> directory=tmp dumpfile=parttab001_%u.dmp logfile=expdp_parttab001.log tables=test_usr.parttab001 job_name=test_usr parallel=2
connect / as sysdba
select * from dba_datapump_jobs where job_name = ‘TEST_USR’
JOB_MODE
————
EXECUTING
To perform an orderly shutdown, use STOP_JOB (without any associated value). A warning requiring confirmation will be issued. An orderly shutdown stops the job after worker processes have finished their current tasks.
At this point break the expdp process with CTRL-C and then:
Export> stop_job
Are you sure you wish to stop this job ([yes]/no): y
The job status in the database changes to:
connect / as sysdba
select * from dba_datapump_jobs where job_name = ‘TEST_USR’
JOB_MODE
————
STOP PENDING
To perform an immediate shutdown, specify STOP_JOB=IMMEDIATE.
After the job was shutdown, the job status changes to:
connect / as sysdba
select * from dba_datapump_jobs where job_name = ‘TEST_USR’
JOB_MODE
————
NOT RUNNING
The DataPump export job is now stopped.
To restart the job TEST_USR, first perform:
#> expdp system/<password> attach=test_usr
Then restart the job with:
Export> continue_client
2. DataPump Import
impdp system/<password> job_name=test_usr directory=tmp dumpfile=parttab001_%u.dmp tables=test_usr.parttab001 logfile=impdp_parttab001.log parallel=2
At this point, break the impdp process with CTRL-C and then:
Import> stop_job=immediate
Are you sure you wish to stop this job ([yes]/no): y
The DataPump import job is now stopped.
select * from dba_datapump_jobs where job_name = ‘TEST_USR’
To restart the job TEST_USR, first perform:
#> impdp system/<password> attach=test_usr
Then restart the job with:
Import> continue_client