Previous Topic: How to Create and Use an Input FileNext Topic: Database Backup


Drop and Restore Constraints

Some of the mdb tables that start with ca_ (such as ca_contact_) have referential constraints that may impact mass loading of data using pdm_load, pdm_userload, and pdm_restore tools. If mass loading these tables is required, you may need to drop the referential constraints prior to mass loading of the data.

Two SQL scripts are provided for each DBMS type to drop and restore constraints. Prior to mass loading of data affecting ca_* tables, run the Drop version of the script. After the data load has completed, run the Add version of the script.

For SQL Server the scripts are located in installation-directory\samples\views\SQLServer directory. Run the following command to drop constraints:

osql -E -e < SQLDropConstraints.sql'

Run the following command to add back constraints:

osql -E -e < SQLAddConstraints.sql

For Oracle, the scripts are located in installation-directory\samples\views\Oracle directory.

Run the following command to drop constraints:

sqlplus mdbadmin/ <password> < OracleDropConstraints.sql

Run the following command to add back constraints:

sqlplus mdbadmin/ <password> < OracleAddConstraints.sql