Oracle停止数据泵,如何停止重启数据泵任务

通过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)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值