Procedure documentationChecking Database Structures Locate this document in the navigation structure

 

During a database structure check, the database system checks whether the database structures (for example the B* trees) in the cache and data area are consistent. The data model semantics are not checked, which is why you cannot find logical errors with a database structure check.

Recommendation Recommendation

Check the database structures once a week.

If you receive one of the following error messages, perform an unscheduled database structure check:

-9053: Data page corrupted

-9023: Illegal entrypos

-9003: Illegal entrylength

-9006: Illegal keylength

-9041: Index not accessible

End of the recommendation.

Procedure

To avoid disrupting operation, you can perform the database structure check on a database copy.

Use one of the following database tools: Database Studio or CCMS (in SAP systems only).

More information:

Procedures for Checking Database Structures

Procedure

Options

Operational State

Description

Check database structures in operational state ONLINE

EXCEPT INDEX: Indexes are not checked. This option usually speeds up the check.

ONLINE

The database system checks the structural consistency of all the tables, indexes, LOB columns etc. in the cache and the data area.

The database system does a complete run through all B* trees and page chains. It checks whether all the pages of the B* trees and page chains can be accessed and whether the administration structures (for example the separators on the B* tree index level) on the pages are intact.

Whenever the database system reads a data page from the data area, it calculates a checksum that has to match the checksum saved on the data page.

In addition, it also checks the key length and whether it is sorted in ascending order, among other things.

Check database structures and clear converter in operational state ADMIN

-

ADMIN

The database system initially executes the same checks as in the ONLINE operational state.

Afterwards, the database system cleans the converter on the basis of the results: It deletes all pages it did not read during the check, which are the pages that no longer exist in the database.

Check database structure for a selected table in operational state ONLINE

WITH LOB CHECK: If the base table to be checked contains LOB columns, the system checks whether all the LOB values defined actually exist. To ensure the consistency of the transaction, an SQL share lock is requested for the duration of the check.

CATALOG: The database catalog for this table is checked. This option cannot be combined with the EXTENDED or WITH LOB CHECK options.

ONLINE

You check a specific table.

The database system performs the same checks as during the check of the entire database in the ONLINE operational state.

Result

The database system lists all the commands used in the database structure check in the log files DBM.UTL and DBM.PRT; errors and return codes are also logged there.

More information: Log Files

Return code 0 means that the database system found no errors during the database structure check. If the database structure check returns any other return code, proceed as described in Fixing Errors in the Database Structure.

More Information

Concepts of the Database System, Logical Access Structures