oracle impdp compilation,IMPDP ORA-39083: Object type TRIGGER failed

dupicate schema but warnings about trigger

(2010-05-26 15:10:00)

标签:

when import schema to the other schema, but there are some

warnings;

ORA-39082: Object type TRIGGER:"IDM_SERVICES_DEV2"."

TS_ENTITLEMENT_GLOBAL_SEQ" created with compilation warnings

ORA-39082: Object type

TRIGGER:"IDM_SERVICES_DEV2"."TS_ENTITLEMENT_GLOBAL_SEQ" created

with compilation warnings

ORA-39082: Object type

TRIGGER:"IDM_SERVICES_DEV2"."TS_RULE_GLOBAL_SEQ" created with

compilation warnings

ORA-39082: Object type

TRIGGER:"IDM_SERVICES_DEV2"."TS_RULE_GLOBAL_SEQ" created with

compilation warnings

why cause it? Because of the table owner is the before

schema.

how to deal with it?

impdp system/oracle directory=tmp_dir dumpfile=services.expdp.dmp

logfile=services.impdp.log REMAP_SCHEMA=SERVICES:SERVICES_DEV2

sqlfile=script.sql

then import it again

impdp system/oracle directory=tmp_dir dumpfile=services.expdp.dmp

logfile=services.impdp.log

REMAP_SCHEMA=SERVICES:SERVICES_DEV2

and change the triggers on the script.sql

#########################################

One can use

the Oracle data pump import tool (IMPDP.EXE) to import one schema

into another using the REMAP_SCHEMA option. However there is an

issue in that triggers are not properly remapped. This leads to the

trigger not being created at all with an error as

follows:

ORA-39083:

Object type TRIGGER failed to create with error: ORA-00942: table

or view does not exist Failing sql is: CREATE TRIGGER

"NEW_SCHEMA"."METER_ALARMS_BI"

BEFORE INSERT

ON OLD_SCHEMA.METER_ALARMS

...

The reason for

this is because the create SQL still refers to OLD_SCHEMA. It does

say in the Oracle documentation that:

The mapping

may not be 100 percent complete, because there are certain schema

references that Import is not capable of finding. For example,

Import will not find schema references embedded within the body of

definitions of types, views, procedures, and

packages.

IMHO this is a

bit of a cop out by Oracle but that's another

discussion!

According to

Oracle Metalink note 750783.1, the workaround is

to:

Create a

SQLFILE to include the relevant DDL command(s): impdp

system/** directory=test_dp

DUMPFILE=export_schemas.dmp remap_schema=u1:u2

sqlfile=script.sql

Extract the

affected DDL from the written SQLFILE and correct the schema

reference. Then execute the command manually.

This is not a

good way to do it especially if you have many failed objects and

want to automate the process of combining multiple schema for in

field upgrading of databases.

Has anyone

found a better way to do this? I need a solution that must be 100%

reliable if its to be used in the field. I could parse the

generated SQL file but can one get this 100% correct? Is there not

some way to intercept the CREATE SQL statements execute by IMPDP

and correct it on the fly while importing? Could one patch the DMP

file directly?

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值