Checking Database Consistency

Use the database consistency check to check the logical and physical consistency of a database.

Regular database consistency checks detect, and often correct, index and page allocation errors resulting in corrupted tables.

  1. In the left pane of the Administration Console, expand ASE Servers > Schema Objects > Databases.
  2. Select one of:
    • User Databases
    • System Databases
    • Temporary Databases
    • Proxy Databases
    • Archive Databases
    • In-Memory Databases
    • In-Memory Temporary Databases
  3. Click the Name field of the database, then click the drop-down arrow and select Check Consistency.
  4. In the Database Consistency Checker wizard, choose from these options:
    Inputs for the Database Consistency Checker Wizard

    Input

    Description

    Check overall consistency

    Run dbcc checkdb, which checks each table and index in the selected database.

    To skip checking nonclustered indexes on users tables, select Ignore non-clustered indexes; leave it unselected to check all indexes on all tables in the database.

    The generated report for each undamaged table shows the number of data pages and data rows.

    Check allocation

    Run dbcc checkalloc, which checks page allocation.

    To fix allocation errors, select Fix allocation errors. The database is automatically placed in single-user mode while executing dbcc checkalloc, then returned to multiuser mode when processing is complete.

    The generated report shows the amount of space allocated and used by each database table, including the system tables. For each table or index, the report shows the number of pages and extents (8-page blocks of allocated space) used.

    Check system catalogs

    Execute dbcc checkcatalog and check for consistency within and between the system tables found in a database. The generated report lists the segments used by the database.

  5. Click Finish to start the consistency check.
Related tasks
Checkpointing Databases