Check Data

From DBArtisan
Jump to: navigation, search

Go Up to Available object actions by DBMS

The Check Data Wizard checks tablespaces for violations of referential and check constraints. The wizard also checks for consistency between a base tablespace and a LOB tablespace.

Upon completion, the wizard reports information about violations that are detected and the status of tablespaces that violate any constraints is set to CHECK-PENDING. Also, the CHECK-PENDING status of all tablespaces that do not violate any constraints is reset. Optionally, the utility deletes rows that violate constraints.

Platform Availability

Important Notes

  • Run the Check Data Wizard after a conditional restart or a point-in-time recovery on all tablespaces where parent and dependent tables might not be synchronized or where base tables and auxiliary tables might not be synchronized.
  • Run the Check Data Wizard against a base tablespace only, not a LOB table space.

To Check Tablespace Data

  1. Initiate a Check Data action against a tablespace. For more information see Initiating an object operation.
  2. Use the following table as a guide to understanding and modifying settings in the Check Data Utility wizard:
Step Settings and tasks

1

Select tablespaces:

If the Wizard is opened from the Tablespaces Editor, the target tablespaces are initially displayed. To check additional tablespaces, click the Add button.

Add

Opens theObject Selector Dialog Box.

Delete

Deletes selected tablespace.

2

Do you want the utility to be restartable?

Lets you specify to execute Wizard in restartable mode. You can restart it from the Datasource Navigator/Explorer.

Would you like to specify the scope?

Lets you specify scope options: Pending (default) - DBArtisan keeps track of the data rows that must be checked to ensure referential integrity. Auxonly - Select if you only want to check tables with LOB columns. All - Select whenever the scope information is in doubt. The scope information is recorded in the DB2 catalog. The scope information can become in doubt whenever you start the target table space with ACCESS(FORCE), or the catalog is recovered to a point in time. RefOnly - Select if you want to check all dependent tables in the specified tablespaces except tables with LOB columns.

Would you like to specify the auxiliary error?

Lets you specify the auxiliary error options: Report (default) - DBArtisan sets the base tablespace to the auxiliary CHECK-pending (ACHKP) status. If CHECK DATA encounters only invalid LOB columns and no other LOB column errors, the base table space is set to the auxiliary warning status. Invalidate - DBArtisan sets the base table LOB column to an invalid status, and sets the base table space to the auxiliary warning (AUXW) status. You can use SQL to update a LOB column in the AUXW status, however, any other attempt to access the column will result in a -904 SQL return code.

Exceptions

Lets you specify the number or exceptions, from 0 to 2147483647.

Error ddn

Lets you specify the name of a error data definition (DD) statement that corresponds to a data control block that contains the same name. Lets you select a previously saved dataset template or click Edit to open the Dataset Template Editor.

Work ddn

Lets you specify the name of a work data definition (DD) statement that corresponds to a data control block that contains the same name. Lets you select a previously saved dataset template or click Edit to open the Dataset Template Editor.

3

Exceptions

Displays the Source and Destination tables for each exception. You can select one or more rows from the grid.

Add

Opens the Exceptions dialog. For details, see Exceptions Dialog Box.

Delete

Deletes the selected exception.

4

Do you want to specify the device type for temporary data sets by DFSORT?

Lets you specify the device type for temporary data sets to be dynamically allocated by DFSORT.

Do you want to specify the sort number?

Lets you type the number of datasets to be dynamically allocated by the sort program. The range of the text field is 0 to 2147483647.

3. When ready, click Finish.

Exceptions Dialog Box

The table below describes the options and functionality on the Exceptions dialog:

Option Description

Base Table Owner

Lets you select the base table owner.

Base Table

Lets you select the base table.

Exception Table Owner

Lets you select the exception table owner.

Exception Table

Lets you select the exception table.