3.Run the restore job.

NOTE: This may take some time, typically 10 to 15 minutes, depending on the size of the master database. Restore only the master database while in single user mode. Do not restore any other databases.

If for some reason, your restore operation doesn’t work, rebuild the master database and attach all of your databases that reside in the data directory. To attach databases:

In Enterprise Manager, right-click Databases and select Attach Database.

In Query Analyzer, write and run a script that is similar to the following sample:

EXEC sp_attach_db @dbname = N'test_database', @filename1 = N'c:\Program Files\Microsoft SQL Server\MSSQL\Data\test_database.mdf', @filename2 = N'c:\Program Files\Microsoft SQL Server\MSSQL\Data\test_database.ldf'

Apply changes to the master database

1.Go to the SQL Server Manager and right-click the SQL server instance. Select Properties to open the SQL Server Properties window.

2.Under the General tab in the SQL Server Properties window, open the Startup Parameters window and remove “–m” from the list of existing parameters.

3.Restart the SQL server instance. (Right-click the SQL server instance and select Stop; right-click the SQL server instance and select Start.)

If there have been no changes to the master database since the last dump, proceed to Drop invalid databases (page 57)

.

4.If login IDs or devices have been added to or dropped from the master database since the last backup, those changes must be reapplied. Restart the server and reapply the changes manually or from saved batch files.

5.If databases have been created, expanded or shrunk since the last dump of master, those databases must be dropped and then restored.

Drop invalid databases

Use the SQL Enterprise manager to drop any invalid database devices and databases from the newly restored master database.

NOTE: If you are recovering from a disaster where you have lost a database device file, the master database you have just restored still contains a reference to it. Data Protector Express will not be able to restore any databases contained on the database device until the file is restored or the database device is dropped. If the database device is dropped, Data Protector Express will automatically recreate the device when a database contained on the device is restored.

Working with Microsoft SQL Server 57