Rebuilding the Configuration Area

If the configuration area is corrupt, you must use the dataserver -f option to force SAP ASE to reconstruct the configuration area.

Prerequisites
Note: Your dataserver command may include other options such as command line flags specifying the device path name, server name, interfaces file name, and so on. These options are listed in the RUN_servername file that normally starts this server.
The following restrictions apply:
  • You can specify the page size if it is wrong (for example, -z8k).

  • You can specify the device size if it is wrong (for example, -b125M).

  • Any allocation units on the disk that appear corrupt, or that are not currently allocated, are allocated to the master database.

Warning!   Do not attempt to use this procedure to change your server’s logical page size. Doing so furthor corrupts the device to the point where you cannot recover it. Any device size you specify must be accurate; dataserver -w does not alter the device’s size, but it may fail to find parts of some databases if the specified size is too small, and can fail entirely if the specified size is too large.

The -w master option, with or without -f, re-creates only the master database. All other allocation units on the disk remain unchanged, so you may be able to recover the data using disk refit.

If the entire master device is corrupt (for example, in the case of a disk failure), replace the entire device by starting SAP ASE using the dataserver -zpage_size. . .-bdevice_size:

Task
  1. If the existing master device is not on a raw partition and you plan to reuse it, remove the old master device file.
  2. Start the server with dataserver -zpage_size. . .-bdevice_size.
Warning!   You cannot use this command to change the server’s page size at this time. All the other devices for this server use the configured page size, and will not recover properly if you use a different page size. However, since you are creating a new file, you can change the device size.

When determining how large to make your master device, keep in mind that this device reserves 8KB for its configuration area. For example, if you specify the device size as 96MB, some space is wasted because there is not enough space for a full allocation unit. Add an additional .01MB to the space you require for the device to account for this overhead. For example, to use a full 96MB for the device, specify -b96.01M.

When you use this method to rebuild the master device, SAP ASE creates new, default databases for master, model, tempdb, and sybsystemdb. These databases are all as small as possible for your installation’s logical page size. If you intend to load backups to these databases, they may now be too small. Before loading these backups, use alter database to increase the size of the databases.

The rebuilt master device is configured with a default character set and sort order. Follow the steps in System Administration Guide, Volume 1 > Configuring Character Sets, Sort Orders, and Languages to change the character set and sort order to those used by the original master device.

No matter which method you use to restore your master device, all users and passwords in your master database will be gone. The only remaining privileged login is “sa”, with no password.

See the Utility Guide for information about re-creating users and passwords.