expdp导出卡住问题诊断

问题描述:expdp导出卡住问题诊断
C:\Users\Administrator>expdp ccense/CCENSE directory=expdp_dir dumpfile=ecard.dm
p logfile=ecard.log schemas=ccense
Estimate in progress using BLOCKS method…
Processing object type SCHEMA_EXPORT/TABLE/TABLE_DATA
导出一直卡在这里。
问题分析
回归这个问题,那就要找到它到底在做什么,怎么看呢?
select s.EVENT,s.MODULE,s.PROGRAM from gv$session s where s.PROGRAM like ‘%(DW%’;(也可以查MODULE=Data Pump Worker)
看到了有行锁enq: TX - contention,

–dba_datapump_jobs查找数据泵作业

SELECT owner_name, job_name, operation, job_mode,
state, attached_sessions
FROM dba_datapump_jobs
WHERE job_name NOT LIKE ‘BIN$%’
ORDER BY 1,2;
OWNER_NAME JOB_NAME OPERATION JOB_MODE STATE ATTACHED


SCOTT EXPDP_20051121 EXPORT SCHEMA EXECUTING 1
SCOTT SYS_EXPORT_TABLE_01 EXPORT TABLE NOT RUNNING 0
SCOTT SYS_EXPORT_TABLE_02 EXPORT TABLE NOT RUNNING 0
SYSTEM SYS_EXPORT_FULL_01 EXPORT FULL NOT RUNNING 0

–查找数据泵的master表
SELECT o.status, o.object_id, o.object_type,
o.owner||’.’||object_name “OWNER.OBJECT”
FROM dba_objects o, dba_datapump_jobs j
WHERE o.owner=j.owner_name AND o.object_name=j.job_name
AND j.job_name NOT LIKE ‘BIN$%’ ORDER BY 4,2;
STATUS OBJECT_ID OBJECT_TYPE OWNER.OBJECT


VALID 85283 TABLE SCOTT.EXPDP_20051121
VALID 85215 TABLE SCOTT.SYS_EXPORT_TABLE_02
VALID 85162 TABLE SYSTEM.SYS_EXPORT_FULL_01

–删除master表
DROP TABLE scott.sys_export_table_02;
–对于启用了recyclebin的系统,需要额外运行

purge dba_recyclebin;

-------------正常中止expdp作业---------------------------
–查到job_name

select * from dba_datapump_jobs;
OWNER_NAME JOB_NAME OPERATION JOB_MODE STATE DEGREE ATTACHED_SESSIONS DATAPUMP_SESSIONS


SYSTEM SYS_EXPORT_FULL_01 EXPORT FULL EXECUTING 1 1 3

–attach该任务
expdp system/sys attach=SYS_EXPORT_FULL_01

Export> stop_job

Export> KILL_JOB
—再导出
C:\Users\Administrator>expdp ccense/CCENSE directory=expdp_dir dumpfile=ecard.dm
p logfile=ecard.log schemas=ccense

你可能感兴趣的:(oracle)