Recovering a database: step-by-step instructions

The symptoms of media failure are as variable as the causes. If only a single block on the disk is bad, your database may appear to function perfectly for some time after the corruption occurs, unless you are running dbcc commands frequently. If an entire disk or disk controller is bad, you will not be able to use a database. Adaptive Server marks the database as suspect and displays a warning message. If the disk storing the master database fails, users will not be able to log in to the server, and users already logged in will not be able to perform any actions that access the system tables in master.

When your database device fails, Sybase recommends the following steps:

  1. Get a current log dump of every database on the device.

  2. Examine the space usage of every database on the device.

  3. After you have gathered this information for all databases on the device, drop each database.

  4. Drop the failed device.

  5. Initialize new devices.

  6. Re-create the databases, one at a time.

  7. Load the most recent database dump into each database.

  8. Apply each transaction log dump in the order in which it was created.

These steps are described in detail in the following sections.