0% found this document useful (0 votes)
66 views1 page

Guidelines For Export and Import

The document provides guidelines for exporting and importing tables between databases. It notes that triggers and constraints are exported but may not be checked or fired on import, and procedures and other objects need manual creation. The guidelines describe checking for existing tables, referential integrity steps if importing child or parent tables, and options for handling constraints.

Uploaded by

api-3699150
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
66 views1 page

Guidelines For Export and Import

The document provides guidelines for exporting and importing tables between databases. It notes that triggers and constraints are exported but may not be checked or fired on import, and procedures and other objects need manual creation. The guidelines describe checking for existing tables, referential integrity steps if importing child or parent tables, and options for handling constraints.

Uploaded by

api-3699150
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 1

Guidelines for Export and Import

• Procedures, Functions, Packages, Views and Synonyms are not exported along with tables, we need to
create them manually.

• Triggers are exported automatically(by default), but they are not fired when the table is imported for
the first time. They are only fired for the consecutive imports.

• Constraints are exported automatically(by default), but they are not checked when the table is
imported for the first time. They are only checked for the consecutive imports.

• Possible type conversion are automatically done during export and import.

1. Check whether the table exists in the target database.


2. If the table exists then check whether both the source and target table are structurally same.
3. If the target table has a primary key constraint, then simply import the table, otherwise truncate the
table first, and then import.
4. Referential Integrity check:

4.1. If the table you are trying to import is a child table(say emp_ch), i.e if the table refers some master
table, then follow these steps:

1. First synchronize the master table.


2. Truncate the table(emp_ch).
3. Import the table(emp_ch).

Likewise if the table has more than one master reference, then all the master table needs to be
synchronized.

4.2. If the table you are trying to import is a master table(emp_mast), i.e if the table is referenced by
any child table, then follow these steps:

1. Disable all the referential constraints in the child table.


2. Truncate the table(emp_mast).
3. Import the table(emp_mast).
4. Enable all the referential constraints in the child table.

Likewise if the table is referenced by more than one child, then the referential integrity of all the child
table needs to be disabled, before the master table is truncated.

(or)

Just simply import the master table(using ignore=y option). But this might a long time, when compared
to the above truncation method.

You might also like