當使用 impdp/expdp 作資料庫匯出/匯入時,一旦要中斷程序,只是 Ctrl + C ,Job 是不會停止的。
狀況一:在 expdp/impdp 的命令列,立即中斷或暫停
執行 Ctrl + C 中斷目前程序 Export> kill_job Are you sure you wish to stop this job ([yes]/no): yes or Export> stop_job=immediate 暫時停止
狀況二:已經離開 expdp/impdp 命令列
找出匯出或匯入的 JOB_NAME
SQL> set linesize 350 SQL> col owner_name format a12 SQL> col job_mode format a10 SQL> col operation format a10 SQL> SELECT owner_name, job_name, operation, job_mode, state FROM dba_datapump_jobs; OWNER_NAME JOB_NAME OPERATION JOB_MODE STATE ------------ ------------------------------ ---------- ---------- ------------------------------ SYSTEM SYS_EXPORT_SCHEMA_01 EXPORT SCHEMA EXECUTING <==== SYSTEM SYS_IMPORT_SCHEMA_02 IMPORT SCHEMA NOT RUNNING SYSTEM SYS_IMPORT_SCHEMA_01 IMPORT SCHEMA NOT RUNNING
重新進入這個 job 的命令列
expdp system ATTACH=<job_name> Export> kill_job or Export> stop_job=immediate
如果是暫時停止,恢復任務的步驟:
Export> start_job Export> continue_client
Images 0 | ||
---|---|---|
No images to display in the gallery. |