It may be necessary to temporarily stop a running export/import process for some reason. In this case, we may need to attach it first.
1. Let’s have an export as below.
1 |
-bash-3.2$ expdp "'/ as sysdba'" directory=dump_dir schemas=scott dumpfile=scott.dmp logfile=scott.log reuse_dumpfiles=y |
2. From another terminal window, connect to the database with SQL*Plus and learn the owner of the job and the name of the job with the following query.
1 |
SQL> select OWNER_NAME, JOB_NAME, OPERATION, JOB_MODE, STATE from dba_datapump_jobs; |
3. Attach expdp tool from another terminal window.
1 |
-bash-3.2$ expdp "'/ as sysdba'" attach=sys.SYS_EXPORT_SCHEMA_04 |
4. The job is stopped.
1 |
stop_job |
5. The Attach process is restarted and the job is started.
1 2 |
-bash-3.2$ expdp "'/ as sysdba'" attach=sys.SYS_EXPORT_SCHEMA_04 start_job |
6. When the SQL statement is run again, the job is seen to be completed.
It is then seen that it has been removed from the list.