Search code examples
oracle-databaseimportexportpartitioningoracle-xe

Importing a dmp with partitioned tables into Oracle XE


I've got a schema containing partitioned tables. I can use exp to create a .dmp, but when I import that into Oracle XE, I get errors because Oracle XE doesn't support partitioned tables.

How do I get the .dmp imported into Oracle XE? I think pre-creating the tables might do it, but how do I extract the DDL in some automated way to do this?

Or can I create the exp somehow without partitions?


Solution

  • Here is what I'm doing with expdp/impdp

    1. Use impdp SQLFILE=Create_Non_Partitioned_Tables.sql EXCLUDE=STATISTICS
    2. Copy that file to Create_Indexes_Constraints.sql
    3. Edit Create_Non_Partitioned_Tables.sql to remove all references to indexes and constraints and partitions, leaving just the CREATE queries.
    4. Edit Create_Indexes_Constraints.sql to remove all references to partitioned tables and the CREATE queries.
    5. Run Create_Non_Partitioned_Tables.sql to create non-partitioned tables.
    6. Run impdp with the option CONTENT=DATA_ONLY
    7. Run Create_Indexes_Constraints.sql to create the indexes and constraints.