Prev | User's Guide | Next |
Checking Consistency and Referential Integrity
Checking the consistency and the integrity of a file and displaying the constraints on a file is a simple process using the Check Database wizard in PCC. Using this wizard, you can perform a consistency test, a referential integrity (RI) test or an index consistency test.
A consistency test checks logical and physical consistency of the selected database, including table and indexes; a referential integrity test checks referential integrity constraints applied to the selected database.
To perform the tests, you must be logged into the database using its data source name.
If you are performing the RI test, your database must be named, stored on the same server as the SRDE, and have referential constraints defined (whether or not RI is enabled).
Listing Referential Constraints
To produce a report that lists all foreign key definitions and related information for any database
- Right-click on the database in the PCC Namespace whose referential constraints are to be viewed.
- Select Properties from the shortcut menu.
- Click on the tab marked Constraints. The following dialog box appears:
Figure 3-32 Database PropertiesChecking Consistency
To check whether the table definitions in your DDFs match the file structure of the data files
- Right-click on the database in the PCC Namespace whose referential integrity is to be checked.
- Select Tasks, then Check Databases from the shortcut menu. The following dialog box appears:
Figure 3-33 Check Database Dialog Box
- Click Consistency test, then click Next. The select table dialog box allows you to specify which tables of the database are to be checked:
Figure 3-34 Select Tables for the Referential Integrity Test Dialog BoxSelect the files you want to check, click Next, and follow the remaining prompts.
Checking Referential Integrity
To check for orphan rows in a database or verify the consistency of a data file's referential integrity constraints
- Right-click on the database in the PCC Namespace whose referential integrity is to be checked.
- Select Tasks, then Check Databases from the shortcut menu. The following dialog box appears:
Figure 3-35 Check Database Dialog Box
- Select Referential Integrity test and click Next.
- The Details dialog box provides options to specify what actions should be taken when inconsistencies or orphan rows are found. Select any desired options and click Next.
Figure 3-36 Details of the Referential Integrity Test Dialog Box
- The select table dialog box allows you to specify which tables of the database are to be checked:
Figure 3-37 Select Tables for the Referential Integrity Test Dialog BoxMake your selections, then click Next.
- The resulting dialog box shows the results of the referential integrity check on the tables as the wizard checks each table selected:
Figure 3-38 Check Database Results Dialog BoxWhen the wizard has finished checking all tables, click Next.
- The Check Database Wizard's result dialog box shows a complete list of foreign keys and the results of each test. You can save the test results to disk or print them out at this time:
Figure 3-39 Referential Integrity Test Results Dialog BoxTo repair inconsistencies, the Check Database wizard updates the information stored in the individual data files to match that in the data dictionary.
Prev Exporting/Importing Data |
Contents Up Check for Revisions | Next License Administrator |