Restoring Device and Database Information in the System Catalog

If a create database, alter database, or disk init command has been issued since the last database dump of master, or if no valid dump of master exists, and no valid bcp files of system tables exist, refer to “Backing Up and Restoring the System Databases” in the System Administration Guide for information on the use of the disk reinit and disk refit commands. These commands restore the system tables information contained in the master database, which describes all Sybase devices and user databases.

If you kept the disk init scripts originally used to initialize the database devices, you can use them to formulate the disk reinit commands, since disk reinit uses the same parameters. If these scripts are not available, examine the contents of sysdevices before a disaster and build the necessary disk reinit command scripts for use when needed. This information is also available from the server error log and the operating system.

Execute disk reinit on the device on which sybsystemprocs is located if it is on a device other than master. To retrieve the correct parameters for disk reinit, check the values you saved from sysdevices. If this information is not available, check the most recent error log.

NoteThe device on which sybsystemprocs resides will not be included in your disk init script, as srvbuild creates that device during installation. Therefore, record the values in sysdevices for the device on which sybsystemprocs resides, even if you plan to use your disk init scripts.

After all the disk reinit commands complete, compare the current contents of sysdevices with a copy of the sysdevices table that was made before the master device was lost. Since the disk refit command is based on the contents of that table, it is crucial that the table accurately reflect all devices.

After the disk refit command is complete, manually compare the contents of the current sysdatabases and sysusages with copies of those same tables that were made prior to the loss of the master device.

Keep up-to-date copies of these tables on hand, using bcp with the -c option, to ensure the quickest recovery after a disaster. If sysdatabases and sysusages do not match your hardcopy records, contact Sybase Technical Support for assistance.