This experiment describes how to reconstruct the master device and restore the master database to recover the system in the case where the Master database is destroyed. Here, it is assumed that the L Master database is corrupt, or the master is corrupt. l The latest printout of system tables. l The master device consists of only the master database, Tempdb and Model L have the latest backup of the Master database, and the last dump Master database is not initialized or created, change any database. About the recovery process L Reduce the primary device to the default state when the server is installed; l Restores the master database to the default state; l Restore the Master database to the status of the last backup; Note: Recovery Master database In the early stage, the system stored procedure cannot be used. Recovery Step Step 1: Find the system table to find a copy of the system table saved to the file SysDatabases, Sysdevices, Sysusages, sysloginroles, and syslogins. Use these copies to ensure that the system has all recovered at the end of this process. Step 2: Create a new master device If Adaptive Server is running, close it, then rebuild the main device. When rebuilding the main device, the device size must be specified. Before you start reconstruction, remember the following points: l Reserved old equipment to prevent problems, and old equipment can provide critical information. l The Adaptive Server should be turned off before using the buildmaster command. l Commands for creating a master device on different operating systems, such as: Buildmast (UNIX), BLDMASTER (Windows NT), and installs a copy of the Universal Master database. The full name and size of the master device are given in the command. Example: Reconstructing a 30 trillion (15360 2k page) on Window NT: BLDMASTR -DD: /DEVICES /MASTER.DAT -S15360 Step 3: Start Adaptive Server with the main recovery method to start Adaptive Server. On Window NT, start AADAPTIVE Server from the command line using the SQLSRVR command. Sqlsrvr.exe -d: /devices/master.dat -sserver_name -ed: / sybase / install / errorlog -id: / sybase / ini -md: / sybase -m Description: When you start Adaptive Server in the main recovery method, only allow A user (system administrator) logs in. Step 4: Reconstruct the MASTER device assignment Check the written copy of the Sysusages system table, if there is a multi-line DBID = 1 record, you need to increase the size of the Master to load the dump. In the simplest case, additional allocation to Master is only available to Alter Database. Complexity, you must allocate space for other databases to re-construct the correct VStart value required to restore Master. Example: ALTER DATBASE MASTER ON MASTER = 2 Step 5: Check the Backup Server and Sysservers system table information. Use the empty password to log in to the server (if the BACKUP Server's network name is not SYB_BACKUP, you must update Sysservers so that Adaptive Server can communicate with its Backup Server).