17 July 2006
Errors: IMP-00017 and ORA-02304 during an import with TYPEs
This situation hapens when you export a schema that has TYPEs and then try to import it into the same database or the replica database. The import will try to create all TYPEs from the dump file using the unique object identifiers which are embedded into the dump file. As each TYPE must have an unique OID, you will get errors:
- . importing LRP017's objects into LRPPROD
IMP-00017: following statement failed with ORACLE error 2304: - "CREATE TYPE "LRPTYPE" TIMESTAMP '2006-06-17:13:37:55' OID '"
- "1662950A9F7A50B6E043AC1C2D1550B6' AS OBJECT"
- ...
- IMP-00003: ORACLE error 2304 encountered
- ORA-02304: invalid object identifier literal
- IMP-00017: following statement failed with ORACLE error 2304
- If using 10.2 version, just skip to the Data Pump and use the TRANSFORM option:
- expdp directory=DATA_PUMP_DIR dumpfile=source_data.dmp logfile=export.log schemas=SOURCE_SCHEMA
- impdp directory=DATA_PUMP_DIR dumpfile=source_data.dmp logfile=import.log REMAP_SCHEMA=SOURCE_SCHEMA:NEW_SCHEMA TRANSFORM=oid:n
- If using version <10.2
- Create the TYPEs manually and then import