Pat*_*ick 3 oracle oracle-11g-r2 impdp
我目前有一个针对相当大的架构 (2TB) 运行的 impdp 作业,但遇到了错误。源数据库有一列比目标数据库大。这会导致 ORA-02374 和 ORA-12899 错误。这导致导入作业在这个表上爬行。
我正在尝试克服错误,我能想到的最佳解决方案是修复表定义,或告诉导入作业跳过当前表。我目前无法修复表定义,因为数据泵作业已锁定表。
有没有办法暂停作业,进行列修改,然后恢复导入?或者,有没有办法告诉工作跳过当前表,然后继续?这将允许在作业完成后返回,修复表定义,然后仅重新导入一个表。
ETA:这是导入中的最后几个表之一,我宁愿不杀死整个事情并重新开始。
好吧,您可以停止作业并在表中进行更改,然后跳过或不跳过当前对象继续作业。
演示:
[oracle@localhost]$ impdp jay/password directory=dp_dir tables=imptest, imptest2 content=data_only dumpfile=exp_jay_imptest.dmp
...
ORA-02374: conversion error loading table "JAY"."IMPTEST"
ORA-12899: value too large for column NAME (actual: 12, maximum: 10)
ORA-02372: data for row: NAME : 'mysamplename'
^C--Press CTRL+C keys.
Import> stop_job=immediate
Are you sure you wish to stop this job ([yes]/no): yes
Run Code Online (Sandbox Code Playgroud)
现在更改表定义。
SQL> alter table imptest modify name varchar2(20);
Table altered.
SQL> exit
[oracle@localhost]$ impdp jay/password attach=SYS_IMPORT_TABLE_01--- you can get job name from log file.
Import> start_job
Import> continue_client
Job SYS_IMPORT_TABLE_01 has been reopened at Tue Oct 11 07:39:12 2016
Restarting "JAY"."SYS_IMPORT_TABLE_01": jay/password directory=dp_dir tables=imptest,imptest2 content=data_only dumpfile=exp_jay_imptest.dmp
. . imported "JAY"."IMPTEST" 19.00 MB 1049211 out of 1048576 rows
. . imported "JAY"."IMPTEST2" 7.710 KB 396 rows
Job "JAY"."SYS_IMPORT_TABLE_01" successfully completed at Tue Oct 11 07:40:13 2016 elapsed 0 00:01:02
Run Code Online (Sandbox Code Playgroud)