Oracle introduced TYPE objects given ORA-02304

Oracle introduced TYPE objects given ORA-02304

 

Type is the database object structure we often use. In practice, we can define the type of single type, after use in the PL / SQL code or data table.

 

In a fortuitous opportunity to make use Type I found that the type of data exp / imp in trouble. When we use exp / imp tools with database instance (Instance ) different Schema data between copy, Schema if there is type in the type of problem will be mistakes.

as follows:

 

IMP-00003: 遇到 ORACLE 错误 2304

ORA-02304: 无效的对象标识符文字
IMP-00017: 由于 ORACLE 错误 2304, 以下语句失败:

 "CREATE TYPE "T_REC_TABLE" TIMESTAMP '2010-12-21:18:17:33' OID 'D9AFD3FAE0A5"

 "4964B1684CA28C69CEED'   as table of t_rec_test;"

 ""

 ""

IMP-00003: 遇到 ORACLE 错误 2304

ORA-02304: 无效的对象标识符文字
IMP-00017: 由于 ORACLE 错误 2304, 以下语句失败:

 "CREATE TYPE "T_TYP" TIMESTAMP '2012-03-07:10:47:03' OID '8E294AB7CC28493A94"

 "FF82791A376379'   as object (id number);"

 ""

 ""

 

For create type failure, can be added at the end of the import command  transform = OID: N

You can refer to the following description.

That is, if the effect parameter is set to TRANSFORM OID = N, represented in imp time, the newly created table or confer a new type OID, the OID instead of the value included dmp file. But the default value of the parameter is OID = Y, thus making Imp, when the newly created table or type would give the same OID, if it is in a different schema on the same database, it will cause problems OID conflict, So to solve this problem is very simple, only we need impdp when the display setting parameters for the OID = N transform both it. As follows,

(cmd> impdp test/test directory=dump_dir dumpfile=dump.dmp logfile=dump.log remap_schema=frank:test  transform=OID:N 

 

Reference Address: http://www.shangxueba.com/jingyan/View.aspx?id=52990

http://blog.itpub.net/17203031/viewspace-732089/

Guess you like

Origin blog.csdn.net/Aria_Miazzy/article/details/93207461