Heim >Datenbank >MySQL-Tutorial >impdp异常中断导致出现问题的解决

impdp异常中断导致出现问题的解决

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-07 16:50:041853Durchsuche

今天查看数据库的负载,发现cpu消耗异常的高。里面有不少dw的进程.但是查看impdp的进程却不存在。查看datapump的进程情况,发现大

今天查看数据库的负载,发现cpu消耗异常的高。里面有不少dw的进程.但是查看impdp的进程却不存在。
 查看datapump的进程情况,,发现大量的job,但是状态都是not running.
 select * from dba_datapump_jobs where owner_name='MIG_TEST';
 SYS_IMPORT_TABLE_01
 SYS_IMPORT_TABLE_02
 SYS_IMPORT_TABLE_03
 SYS_IMPORT_TABLE_04
 SYS_IMPORT_TABLE_05
 SYS_IMPORT_TABLE_06
 SYS_IMPORT_TABLE_07
 SYS_IMPORT_TABLE_08
 SYS_IMPORT_TABLE_09
 SYS_IMPORT_TABLE_10
 SYS_IMPORT_TABLE_12
 SYS_IMPORT_TABLE_13
 SYS_IMPORT_TABLE_14
 SYS_IMPORT_TABLE_15
 SYS_IMPORT_TABLE_16
 SYS_IMPORT_TABLE_17
 SYS_IMPORT_TABLE_18
 SYS_IMPORT_TABLE_20
 SYS_IMPORT_TABLE_21
 SYS_IMPORT_TABLE_23
 SYS_IMPORT_TABLE_24
 SYS_IMPORT_TABLE_25
 SYS_IMPORT_TABLE_26
 SYS_IMPORT_TABLE_28

 。。。。
 查看数据库的session情况,发现有一个临时测试用户下有120多个session.这个环境平时没有人用,不会有那么多的session.
 没有impdp的任务,查看那个临时用户,发现下面有很多SYS_IMPORT_TABLE_xx的表,ETxxx, ERRxxx的表。这些表都是datapump在数据导入的时候创建的临时表。
 ERR的表类似下面的形式。
 ERR$DP13FC20810001
 ERR$DP16F10AF10001
 ERR$DP1AA200C30001
 ERR$DP1C125B790001
 ERR$DP1C1B86AF0001
 
ET的表类似下面的形式。
 ET$000D0F650001
 ET$00C11B410001
 ET$024502130001
 ET$02FBAF530001
 ET$02FE249B0001
 ET$03B551550001
 ET$03BE47230001
 ET$05312FFF0001
 ET$05380F350001
 ET$05F70DAD0001

通过expdp&impdp把11g的数据迁移到10g平台的要点

Oracle Data Pump使用范例及部分注意事项(expdp/impdp)

Oracle datapump expdp/impdp 导入导出数据库时hang住

expdp/impdp做Oracle 10g 到11g的数据迁移

 查看里面的内容也是被禁止的。
 SQL> select *from ET$1B5C6DCF0001;
 ERROR:
 ORA-29913: error in executing ODCIEXTTABLEOPEN callout
 KUP-11024: This external table can only be accessed from within a Data Pump
 job.
 
既然没有对应的impdp的任务来跑,那些session也就是在空跑了。
 和同事确认了下,这个测试中的数据任务执行时间太长,就被删除了进程。没想到杀掉impdp的进程,对应的parallel process还是存在,
 把一张分区表分成了100份,每一份包含一些分区的数据,这样并行4个,下来就有120个左右的session了,
 他们使用的脚本类似下面的形式。
 nohup  impdp xxxx/xxxx directory=memo_dir dumpfile=par1_xxxxxxxx.dmp parallel=2 include=table_data logfile=par1_xxxxxxxx_impdp.log parfile=xxxxxxxx_partition_parallel_1.par_impdp TABLE_EXISTS_ACTION=append REMAP_SCHEMA=prdappo:MIG_TEST DATA_OPTIONS=SKIP_CONSTRAINT_ERRORS  &
 nohup  impdp xxxx/xxxx directory=memo_dir dumpfile=par2_xxxxxxxx.dmp parallel=2 include=table_data logfile=par2_xxxxxxxx_impdp.log parfile=xxxxxxxx_partition_parallel_2.par_impdp TABLE_EXISTS_ACTION=append REMAP_SCHEMA=prdappo:MIG_TEST DATA_OPTIONS=SKIP_CONSTRAINT_ERRORS  &
 nohup  impdp xxxx/xxxx directory=memo_dir dumpfile=par3_xxxxxxxx.dmp parallel=2 include=table_data logfile=par3_xxxxxxxx_impdp.log parfile=xxxxxxxx_partition_parallel_3.par_impdp TABLE_EXISTS_ACTION=append REMAP_SCHEMA=prdappo:MIG_TEST DATA_OPTIONS=SKIP_CONSTRAINT_ERRORS  &
 nohup  impdp xxxx/xxxx directory=memo_dir dumpfile=par4_xxxxxxxx.dmp parallel=2 include=table_data logfile=par4_xxxxxxxx_impdp.log parfile=xxxxxxxx_partition_parallel_4.par_impdp TABLE_EXISTS_ACTION=append REMAP_SCHEMA=prdappo:MIG_TEST DATA_OPTIONS=SKIP_CONSTRAINT_ERRORS  &
 nohup  impdp xxxx/xxxx directory=memo_dir dumpfile=par5_xxxxxxxx.dmp parallel=2 include=table_data logfile=par5_xxxxxxxx_impdp.log parfile=xxxxxxxx_partition_parallel_5.par_impdp TABLE_EXISTS_ACTION=append REMAP_SCHEMA=prdappo:MIG_TEST DATA_OPTIONS=SKIP_CONSTRAINT_ERRORS  &

确认了下,准备删除session。可以使用如下的sql来查找对应的session,确认后删除。
 select 'alter system kill session '||chr(39)||sid||','||serial#||chr(39) ||';' from v$session where username='MIG_TEST';

更多详情见请继续阅读下一页的精彩内容:

linux

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn