Preparing to Use dbcc checkstorage

Before you can use dbcc checkstorage, configure SAP ASE and set up the dbccdb database.

Each action is described in detail in the following sections. The examples in this section assume a server that uses 2K logical pages.

This table summarizes the steps and commands in the order you should use them.

Preparing to use dbcc checkstorage



1. Obtain recommendations for database size, devices (if dbccdb does not exist), workspace sizes, cache size, and the number of worker processes for the target database.

use master


2. If necessary, adjust the number of worker processes that SAP ASE uses.


number of worker processes

memory per worker processes

3. (Optional) Create a named cache for dbcc.


4. Configure your buffer pool.


5. If dbccdb already exists, drop it and all associated devices before creating a new dbccdb database.

drop database

6. Initialize disk devices for the dbccdb data and the log.

disk init

7. (Optional) Create dbccdb on the data disk device.

create database

8. (Optional) Add disk segments.

use dbccdb

9. Populate the dbccdb database and install dbcc stored procedures.

isql -Usa -P -i $SYBASE/$SYBASE_ASE/scripts /installdbccdb

Note: dbcc checkstorage runs its checks against the database on disk. If a corruption exists only in memory, dbcc may not detect it. To ensure consistency between two sequential dbcc checkstorage commands, first run a checkpoint. Be aware that running checkpoint may turn a transient memory corruption into a disk corruption.