如何停止重启数据泵任务

通过dba_datapump_jobs视图查找对应job,如果指定了attach,attach参数值就为job_name
select owner, job_name,state from dba_datapump_jobs;

ctrl c停止数据泵命令,在交互模式下,使用stop_job=immediate命令可以停止数据泵任务

Processing object type DATABASE_EXPORT/RESOURCE_COST
Processing object type DATABASE_EXPORT/TRUSTED_DB_LINK
Processing object type DATABASE_EXPORT/SCHEMA/SEQUENCE/SEQUENCE
Processing object type DATABASE_EXPORT/SCHEMA/SEQUENCE/GRANT/OWNER_GRANT/OBJECT_GRANT
^C
Export> stop_job
Are you sure you wish to stop this job ([yes]/no): yes
这个时候视图中数据泵任务状态会发生改变,但是任务可能仍然在执行,因为在所有客户端接收到任务中止消息后,任务进程才会停止。使用STOP_JOB=IMMEDIATE不会有丢失数据到风险,且可yirestart任务完成余下工作。

 >expdp scott/tiger

Export: Release 11.2.0.3.0 - Production on Sat Jul 15 02:23:26 2017

Copyright (c) 1982, 2011, Oracle and/or its affiliates.  All rights reserved.

Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production

With the Partitioning, OLAP, Data Mining and Real Application Testing options

Starting "SCOTT"."SYS_EXPORT_SCHEMA_04":  scott/******** 

Estimate in progress using BLOCKS method...

Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA

Total estimation using BLOCKS method: 385 MB

Processing object type SCHEMA_EXPORT/USER

Processing object type SCHEMA_EXPORT/SYSTEM_GRANT

Processing object type SCHEMA_EXPORT/ROLE_GRANT

因为没有使用attach,所以默认的job跟之前的job是一致的

参考文档:
How To Stop A Running Datapump Job Started In Background (文档 ID 958532.1)


来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/31461640/viewspace-2142088/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/31461640/viewspace-2142088/

你可能感兴趣的:(如何停止重启数据泵任务)