Show TOC

Checking Database StructuresLocate this document in the navigation structure

Use

During a database structure check, the system checks the structural consistency of the database in the cache and the data area. Note that the semantic data model is not checked, which is why you cannot find logical errors with a database structure check.

Recommendation

Check the database structures once a week.

Prerequisites

You are logged on to the database as database system administrator or as a DBM operator.

Procedure
  1. Select the database in the explorer tree.

  2. In the context menu of the database, choose Start of the navigation path Administration Tasks Next navigation step Check Database Structure... End of the navigation path

Depending on your database size, database usage and general system environment, select the appropriate checking procedure.

Table 1: Procedures for Checking Database Structures

Procedure

Operational State

Description

Advantages

Disadvantages

Check the complete database structure and clean up the data area

ONLINE

The system checks the following:

  • Tables

  • Indexes

  • LOBs

  • History pages

Using the results of this check, the system removes unused pages and LOBs that are not referenced from the data area.

Internally, the system creates a snapshot of the data area and carries out the database structure check on this snapshot. This snapshot is automatically deleted by the system after the database structure check is finished.

The system is available without any restrictions (no pages are locked).

  • Additional space is used in the data area during the check (depending on the change activity in the database during the check).

  • The check may run slowly because its I/O operations have a low priority and all data needs to be read from the data area.

    Even though the check is carried out on a snapshot, the system still needs to read data from the same disks that are used by normal database operation.

Check the complete database structure

ONLINE

The system checks the following:

  • Tables

  • Indexes

    To speed up the check, you can exclude indexes from the check.

  • LOBs

In general, the check runs fast because its I/O operations have a high priority and a part of the data can be read from the cache.

The system is only available with restrictions (pages are temporarily locked). This may significantly impact normal database operation.

We recommend that you carry out the check in times of low database usage.

Check a table

ONLINE

The system checks the specified table.

Options:

  • Check the table structure

  • Check table structure with additional LOB checks

    If the table contains LOB columns, the system checks whether all the LOB values that are specified in the table actually exist. To ensure the consistency of the transaction, the system requests a share lock for the duration of the check.

  • Check the catalog for the table (optional)

In general, the check runs fast because its I/O operations have a high priority and a part of the data can be read from the cache.

Depending on the options you choose, the system is only be available with restrictions (pages are temporarily locked).

Check an index

ONLINE

The system checks the consistency of the specified index.

Note that the consistency between index and table is not checked.

-

The index is temporarily locked.

Check the complete database structure and clean up the data area in operational state ADMIN

ADMIN

The system checks the following:

  • Tables

  • Indexes

  • LOBs

  • History pages

Using the results of this check, the system removes unused pages and LOBs that are not referenced from the data area.

You can use this check during a recovery (after restoring data backups).

The system is not available for users during the check.

You can perform database structure checks on a specified snapshot. Perform as described in Making Snapshots of the Data Area.

Result

If the system finds errors, it displays an error message and writes the errors to the Database Errors log file (kernel log file). For more information, see Displaying Configuration and Log Files.

More Information

Database Administration, Checking Database Structures