说明:本文为Oracle11g expdp/impdp停止/关闭指导手册
温馨提示:如果您发现本文哪里写的有问题或者有更好的写法请留言或私信我进行修改优化
有别于早期的exp/imp,新版本中的expdp/impdp不再可以通过ctrl+c来取消或中断,因为它变成了Oracle-job,所以只能通过停止job来实现expdp/impdp的中断。下面给大家举例说明如何停止一个expdp/impdp
★ 导出语句:
expdp system/oracle directory=d dumpfile=s.dump logfile=s.log full=y reuse_dumpfiles=y
★ 查看expdp后台job
SQL> select job_name,state,OWNER_NAME from dba_datapump_jobs ;
JOB_NAME STATE OWNER_NAME
------------------------------ ------------------------------ ------------------------------
SYS_EXPORT_FULL_01 EXECUTING SYSTEM
★ 从expdp客户端中查看指定job名称的工作情况
[oracle@localhost ~]$ expdp \"system/oracle\" attach=SYS_EXPORT_FULL_01
Export: Release 11.2.0.3.0 - Production on 星期四 4月 9 12:14:48 2020
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
UDE-28002: 操作产生了 ORACLE 错误 28002
ORA-28002: the password will expire within 7 days
连接到: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
作业: SYS_EXPORT_FULL_01
所有者: SYSTEM
操作: EXPORT
创建者权限: TRUE
GUID: A2D4D52A61503743E055000000000001
开始时间: 星期四, 09 4月, 2020 12:14:50
模式: FULL
实例: ora11g
最大并行度: 1
EXPORT 个作业参数:
参数名 参数值:
CLIENT_COMMAND system/******** directory=d dumpfile=s.dump logfile=s.log full=y reuse_dumpfiles=y
状态: IDLING
处理的字节: 0
当前并行度: 1
作业错误计数: 0
转储文件: /home/oracle/s.dump
写入的字节: 4,096
Worker 1 状态:
进程名: DW00
状态: UNDEFINED
对象方案: APEX_030200
对象名: WWV_FLOW_REGION_REPORT_COLUMN
对象类型: DATABASE_EXPORT/SCHEMA/TABLE/TABLE
完成的对象数: 1,263
Worker 并行度: 1
★ 停止运行的JOB
Export> kill_job
是否确实要停止此作业 ([Y]/N): 【回车即可】
★ 查看并确认JOB是否停止(查不到即表示该JOB已停止)
※ 温馨提示:虽然此时job已经停止,但是在dba_datapump_jobs中该job依然存在只是状态变为not runing状态,不过该job会话稍后会自动释放
[oracle@localhost ~]$ expdp \"system/oracle\" attach=SYS_EXPORT_FULL_01
Export: Release 11.2.0.3.0 - Production on 星期四 4月 9 12:15:03 2020
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
连接到: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
ORA-31626: 作业不存在
ORA-06512: 在 "SYS.DBMS_SYS_ERROR", line 79
ORA-06512: 在 "SYS.KUPV$FT", line 405
ORA-31638: 无法连接作业 SYS_EXPORT_FULL_01 (用户 SYSTEM)
ORA-31632: 主表 "SYSTEM.SYS_EXPORT_FULL_01" 未找到, 无效或不可访问
ORA-00942: 表或视图不存在
over