今天刚执行一个impdp操作发现,硬盘空间可能不够了,赶紧按了Ctrl+C,结果发现磁盘空间仍然在减少。问了一下部门oracle专家,Ctrl+C是无法停止impdp的job的。需要将job进行attach操作,然后kill。过程如下:
1、现在数据库中查找视图,得到job的名称
select * from dba_datapump_jobs;
2、得到Job名称之后登陆数据库服务器,执行如下命令
$ impdp \"/ as sysdba\" attach=SYS_IMPORT_FULL_01 Import: Release 11.2.0.4.0 - Production on Wed Feb 28 19:34:02 2018 Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved. Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options Job: SYS_IMPORT_FULL_01
Owner: SYS
Operation: IMPORT
Creator Privs: TRUE
GUID: 6644D99D3900436BE0530B1310ACE6EF
Start Time: Wednesday, 28 February, 2018 19:14:44
Mode: FULL
Instance: sicsdb
Max Parallelism: 1
EXPORT Job Parameters:
Parameter Name Parameter Value:
CLIENT_COMMAND "/******** AS SYSDBA" dumpfile=aaa.dmp schemas=SICSPC_INT
IMPORT Job Parameters:
CLIENT_COMMAND "/******** AS SYSDBA" dumpfile=aaa.dmp remap_tablespace=111:222 remap_schema=1:2 EXCLUDE=INDEX
State: EXECUTING
Bytes Processed: 28,836,139,448
Percent Done: 88
Current Parallelism: 1
Job Error Count: 0
Dump File: /u01/app/admin/aaadb/dpdump/aaa.dmp Worker 1 Status:
Process Name: DW00
State: EXECUTING
Object Schema: UAT_EST
Object Name: PERIOD_SNL_EST_201705
Object Type: SCHEMA_EXPORT/TABLE/TABLE_DATA
Completed Objects: 17
Completed Rows: 1,385,265
Completed Bytes: 180,716,256
Percent Done: 87
Worker Parallelism: 1
3、 然后会自动进入impdp的命令行,再执行kill操作即可。
Import> kill
Are you sure you wish to stop this job ([yes]/no): yes