impdp ORA-39014 One or more workers have prematurely exited

同事进行数据导入时报错,简单记录之。

 

1、impdp导入数据时报错,错误信息如下所示:

ORA-39014: One or more workers have prematurely exited.

ORA-39029: worker 7 with process name "DW0M" prematurely terminated

ORA-31684: Object type PROCEDURE:" ADM"."AAAAA" already exists

从报错信息可以看出,并行导入的进程(worker 7)遇到错误退出,错误原因是ORA-31684: Object type PROCEDURE:" ADM"."AAAAA" already exists。正常情况下,如果是一个干净的环境,导入数据时,不可能报object already exists这种错误。

 

2、导入脚本如下所示:

DIRECTORY=dpdir

LOGFILE=impdp_adm_20211101.log

cluster=n

dumpfile=expdp_adm_%U.dmp

parallel=8

JOB_NAME=impdp_adm

导入脚本中没有特殊的参数,但开了并行,也即使用了parallel参数。上面的那个ORA-31684: Object type PROCEDURE:" ADM"."AAAAA" already exists错误,怀疑是impdp的并行进程重复做了相同的事。

 

3、让同事在impdp时去掉parallel参数,过一段时间后,反馈导入成功。说明这个问题就是由parallel参数导致。

 

4、搜索MOS,找到文档:Errors ORA-39014 ORA-39029 ORA-31672 On DataPump Import (Doc ID 464082.1),文中提到:

The parallelism (specified with parameter PARALLEL) should be less than or equal to the number of dump files in the dump file set. If there are not enough dump files, the performance will not be optimal because multiple threads of execution will be trying to access the same dump file.

在这个案例中,源库导出时使用了parallel=8,而目标库导入时指定的parallel也为8,但报错,即使把parallel改为4也报错,说明不是这个文档中涉及的情况。

 

5、MOS上关于expdp或impdp时报ORA-39014 ORA-39029的BUG还挺多的,但涵盖19.12版本的BUG很少,只找到Bug30477767 - ORA-02095 And Worker Crashes During Import When Using Parallel Parameter (Doc ID 30477767.8)。在MOS上看不到这个BUG的细节,也无法最终确认。

 

6、最终只能让同事在impdp时去掉parallel参数,作为这个CASE的workaround。

原文地址:https://www.cnblogs.com/missyou-shiyh/p/15496470.html