V11 SP8
Loading...

Full System Recovery of Sybase Server: Restoring Defective Devices and Suspected Databases

A full Sybase restore may fail if one or more database devices are defective or have been physically deleted and the corresponding databases have therefore been marked as suspected. In such a case, all the databases marked as suspected and the corresponding devices whose files have been lost must be dropped and re-created.

Before You Begin

Complete the following task:

Rebuilding the Operating system

Procedure

  1. Issue the following command to determine whether the database is suspected:

    sp_marksuspect (<database name>)

    Example:

    sp_marksuspect (<sybdb1>)

  2. Drop the suspected database using the following command:

    dbcc dbrepair (<database name>, dropdb)

    Example:

    dbcc dbrepair (<sybdb1>, dropdb)

  3. If the database to be recovered is sybsystemprocs (system database), use the following command to drop the corresponding device (since stored procedures are not available at this point):

    disk release name = <device name>

    Example

    disk release name = <tempdbdev>

  4. If any of the data device files do not exist but the device entry exists in sysdevices, drop those devices using the following command:

    sp_dropdevice <device name>

    Example:

    sp_dropdevice <tempdbdev>

  5. Repeat the above procedure for each suspected database.
  6. Resume the restore starting with the first database that was deemed suspected.