Thursday, November 15, 2012

Datapump: Re-Importing TYPEs

When duplicating a schema which contains TYPE objects using expdp/impdp, you will encounter the following error:
Processing object type SCHEMA_EXPORT/TYPE/TYPE_SPEC
ORA-39083: Object type TYPE failed to create with error:
ORA-02304: invalid object identifier literal
This is because Oracle tries to create the type object in the target schema with the same object identifier (OID) as it has in the source schema. But an OID must be unique within a database.

Add the following parameter to your impdp command to make sure new OIDs are generated upon import:
transform=oid:n
Since: Oracle 10gR2
Source: Oracle Support Doc ID 351519.1

No comments: