PROBLEM:
While importing schema objects, got below errors.
ORA-39083: Object type TYPE:”PADADM10″.”NAME_AND_COUNT_ARRAY” failed to create with error:
ORA-02304: invalid object identifier literal
Failing sql is:
CREATE EDITIONABLE TYPE “PADADM10″.”NAME_AND_COUNT_ARRAY” OID ‘576CD3FFA14D4400E05400144FFFAA04‘ IS VARRAY(30) OF name_and_count_t;
ROOT CAUSE:
OID value of TYPE should be unique in the database and So if try to import TYPE with SAME OID, it will fail with this error.
In the above error, the OID is OID ‘576CD3FFA14D4400E05400144FFFAA04’. So check whether that OID is already present or not.
SQL> select owner,type_oid from dba_types where TYPE_OID='576CD3FFA14D4400E05400144FFFAA04'; OWNER TYPE_OID --------------- -------------------------------- TASDB 576CD3FFA14D4400E05400144FFFAA04
As the OID has already existed in the database, so TYPE getting imported should be generated using NEW OID.
SOLUTION:
So the solution to avoid this type of error is to use TRANSFORM=oid:n parameter with impdp.
Impdp command will look as below
impdp dumpfile=TEST_%U.dmp logfile=TEST_imp.log directory=T remap_schema=TEST:TEST10 parallel=4 TRANSFORM=oid:n
This command will import the TYPES with NEW OIDs