msdb-contains information about jobs, alarms, and operators if the media containing the system database has changed, the system database must be rebuilt, and if you can still start the SQL Server service, you can recover the database from the backup of the system database through the RESTORE statement.
A summary of the recovery of the system database is as follows:
In a SQL Server database, System information is stored in the system database, and the primary system databases include:
master-controls user databases and SQL Server operations as a whole, and backs up any user-defined objects after they are created.
Model-provides templates and prototypes for new databases
msdb-contains information about jobs, alarms, and operators if the media containing the system database has changed, the system database must be rebuilt, and if you can still start the SQL Server service, you can recover the database from the backup of the system database through the RESTORE statement.
If Master does not boot the system, you can follow the steps below to restore
1, the rebuilding system database runs C:\mssql7\binn\rebuildm.exe, according to the prompt can, the process needs the System database sample path, may find in the installment CD-ROM;
2. After rebuilding the system database, start the SQL Server service, restore the database with the system database backup. Typically, the restore order is master->msdb->model when restoring Master's backup: it must be done in single user mode, There are several ways to do this:
Enter single user mode:
1, can enter sqlservr-c-f-m or input sqlservr-m in command line mode
Where:-C can shorten startup time, SQL Server does not start as Windows NT service
-F Start SQL Server with minimal configuration
-m single-user mode starts SQL Server
2. You can enter-c-f-m or input-m in the Control Panel-service-mssqlserver startup parameters, click Start
3, there is also a more flexible way to start: with the presence of the registration table startup parameters to start, under the MSSQLServer key to add items SingleUser, the details are as follows:
HKEY_Local_Machine
\software
\microsoft
\MSSQLServer
\singleuser
\parameters
SQLARG0:REG_SZ:-dc:\mssql7\data\master. Dat
SQLARG1:REG_SZ:-ec:\mssql7\log\errorlog
SQLARG2:REG_SZ:-lc:\mssql7\data\mastlog. Dat
SQLARG3:REG_SZ:-M
Enter Sqlservr-c-ssingleuser at the command line, note: You must start Query Analyzer execution statement after entering Single-user mode at the command line:
RESTORE DATABASE Master Form disk= ' C:\ (specific backup file name)