Database Utilities (MOSC)

MOSC Banner

Import tables with user defined type columns on 11gR2

edited Jan 10, 2012 5:42PM in Database Utilities (MOSC) 1 commentAnswered
 Hi,

I want to export and import a schema on 11gR2 database running on windows (MS Windows 2003R2) containing tables with user defined object type columns like this:

CREATE OR REPLACE TYPE TP_FIELD AS OBJECT (
    DAT             NUMBER(9)
) FINAL;
/
CREATE TABLE T_TAB (
    FIELD           TP_FIELD
);
INSERT INTO T_TAB VALUES (TP_FIELD(1));
COMMIT;

I want to use PL/SQL and the DBMS_DATAPUMP package. The export works, but I have problem with the import.

During import I must use metadata_transform to transform OIDs like this:

    DBMS_DATAPUMP.METADATA_TRANSFORM (sHANDLER, 'OID', 0);

There are no problems with the object and the table creation, but if I have some records in the table, the import fails:

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center