Jennifer Lin’s Weblog

March 5, 2008

Original Export and Import

Filed under: EXP/IMP — jennyca @ 6:20 am

Table Objects: Order of Import

Table objects are imported as they are read from the export file. The export file contains objects in the following order:

  1. Type definitions
  2. Table definitions
  3. Table data
  4. Table indexes
  5. Integrity constraints, views, procedures, and triggers
  6. Bitmap, function-based, and domain indexes

The order of import is as follows: new tables are created, data is imported and indexes are built, triggers are imported, integrity constraints are enabled on the new tables, and any bitmap, function-based, and/or domain indexes are built. This sequence prevents data from being rejected due to the order in which tables are imported. This sequence also prevents redundant triggers from firing twice on the same data (once when it is originally inserted and again during the import).

Disabling Referential Constraints

In the normal import order, referential constraints are imported only after all tables are imported. This sequence prevents errors that could occur if a referential integrity constraint exists for data that has not yet been imported.

These errors can still occur when data is loaded into existing tables.

When such an error occurs, Import generates an error message, bypasses the failed row, and continues importing other rows in the table. You can disable constraints manually to avoid this.

Referential constraints between tables can also cause problems. For example, if the emp table appears before the dept table in the export file, but a referential check exists from the emp table into the dept table, some of the rows from the emp table may not be imported due to a referential constraint violation.

To prevent errors like these, you should disable referential integrity constraints when importing data into existing tables.

Manually Ordering the Import

When the constraints are reenabled after importing, the entire table is checked, which may take a long time for a large table. If the time required for that check is too long, it may be beneficial to order the import manually.

To do so, perform several imports from an export file instead of one. First, import tables that are the targets of referential checks. Then, import the tables that reference them. This option works if tables do not reference each other in a circular fashion, and if a table does not reference itself.

Effect of Schema and Database Triggers on Import Operations

Triggers that are defined to trigger on DDL events for a specific schema or on DDL-related events for the database, are system triggers. These triggers can have detrimental effects on certain import operations. For example, they can prevent successful re-creation of database objects, such as tables. This causes errors to be returned that give no indication that a trigger caused the problem.

From

http://download.oracle.com/docs/cd/B19306_01/server.102/b14215/exp_imp.htm#i1023988

Disable Referential Constraints and Triggers before importing dump file,

import dump

Enable Referential Constraints and Triggers

March 4, 2008

EXP-00026

Filed under: EXP/IMP — jennyca @ 11:56 pm

EXP-00026: conflicting modes specified
EXP-00000: Export terminated unsuccessfully

“only one parameter (TABLES, OWNER, or FULL) can be specified”

Cause:  Conflicting export modes specified.
Action: Retry but Specify only one of (tables, owner, full) parameter.

Blog at WordPress.com.