Unanswered: ORA-22337 when imp dmp file with user defined type
I got error when I use oracle imp utility to import a dmp file that has user define type. The error are:
Import: Release 126.96.36.199.0 - Production on Mon Nov 24 19:38:01 2003
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to: Oracle9i Enterprise Edition Release 188.8.131.52.0 - Production
With the OLAP and Oracle Data Mining options
JServer Release 184.108.40.206.0 - Production
Export file created by EXPORT:V09.02.00 via conventional path
Warning: the objects were exported by G2FO, not by you
import done in WE8ISO8859P1 character set and AL16UTF16 NCHAR character set
import server uses ZHT16BIG5 character set (possible charset conversion)
export client uses ZHT16BIG5 character set (possible charset conversion)
export server uses UTF8 NCHAR character set (possible ncharset conversion)
. . importing table "ORDER_QTY_DTL"
IMP-00058: ORACLE error 22337 encountered
ORA-22337: the type of accessed object has been evolved
About to enable constraints...
IMP-00086: TOID "HKEX_TYP" not found in export file
Import terminated successfully with warnings.
I couldn't search error ORA-22337. Anybody know that?
This happens if a object type table has been created, then altered and then you export from 901x into another database. The problem is the version information (from the ALTER TYPE command) for the object type can't be imported correctly.
Try this ...
1. Create a copy of the original database.
2. Drop the TYPE and dependent tables on this copied database
3. IMPORT the export file back into this copied database
This should allow the data to import and remove
versioning information from the TYPE and row data
4. Re-export the data now, as it has no versioning information
anymore. This should produce an export file which can be imported
into a second different database.
Manually create the types so they evolve in the same way they did in source database. Do exactly the same create type and alter types you did on the original database then import the data.
If you did
create type x
alter type x add
alter type x add
Then repeat the exact steps on the database you want to import to, then do the import, which will skip the object type table you just created, and import everything else.