You check whether the database structures are consistent, the keys have the correct length, and the keys are sorted in ascending order.
Recommendation
Check the database structures once a week.
Checking the database structure is CPU-intensive and time-consuming because the system carries out a lot of I/O operations. In your production system, schedule database structure checks only at times when the load on the database system is low, or carry out the checks on a copy of the current database.
More information: Database Administration, Database Copy
You are logged on to the database as database system administrator or as a DBM operator.
In the context menu of the database, choose Check Database Structure...
Choose the check procedure.
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. |
If the system finds errors, it writes them to the Database Errors log file (kernel log file).
More information: Displaying Configuration and Log Files
Database Administration, Checking Database Structures