Document ID: 243093
http://support.veritas.com/docs/243093
E-Mail Colleague IconE-Mail this document to a colleague

SQL Agent: How to restore the master database within Microsoft SQL Server 2000 Backup Exec for Windows Servers

Details:
Reasons for restoring the master database from backup:

1. If the master database is corrupted, symptoms may include but not be limited to:

·
2. If the master database is so corrupt that Microsoft SQL 2000 Server cannot be started, then the master database must be rebuilt before it can be restored from backup

3. Disaster recovery of Microsoft SQL Server 2000:

NOTE 1: This document assumes a complete online backup of all databases exists prior to the reason for the restore.  Any changes made after this backup will be lost and are unrecoverable.

NOTE 2: During the restore, SQL 2000 Enterprise Manager and SQL 2000 Query Analyzer are not used. Shut down these applications if open.

1. To rebuild the master, run rebuildm.exe either from the SQL 2000 CD or from the default location on the SQL server C:\Program Files\Microsoft SQL Server\80\Tools\Binn\rebuildm.exe.

NOTE 3: If Microsoft SQL Server 2000 has been installed fresh, proceed to line 2, bypassing information on rebuildm.exe, as this utility will not be used.



How to rebuild the master database (Rebuild Master utility) (Information provided from MSDN Library Online)
For more information on rebuilding the master database, see the "How to rebuild the master database" topic in SQL Books Online. Also Microsoft Qpapers in the Acknowledgments section at the end of this document.

NOTE 4: Rebuilding the master database is the same as replacing the master database with a new master database. Great care should be taken when performing this action. This action should only be carried out by persons experienced in the use of Microsoft SQL Server 2000.

To rebuild the master database using rebuildm.exe:
· Initially, the default collation settings are shown, but these may not match the collation selected during setup. You can select the same settings used during setup or select new collation settings. When done, click OK.
· Note: To continue, a server that is running may need to be stopped.
End of  (Information provided from MSDN Library Online)

Note: sp_attach_db will not be necessary, as the document assumes Backup Exec will be used to recreate databases from backups.

2. The master database of the Microsoft SQL 2000 instance has to be placed into Single User Mode in order to be restored. Access the Services dialog in Windows via Start | Programs | Administrative Tools | Services

3. Right-click the MSSQLSERVER service and click Stop on the resulting context menu (Figure 1)

Figure 1
 

4. Double-click the MSSQLSERVER service and on the General tab of the service Properties dialog, type -m in the Startup Parameters field. Click on the Start button located on the General tab, then click OK (Figure 2).

FIGURE 2
 



Figure 3
 

6. Click on the Restore button on the toolbar. On the General tab, verify that the correct restore device is selected. On the SQL tab of the Restore dialog box, select the Recover Database option and set the Consistency checking to None.  Click Run Now (Figure 4).

Figure 4
 

7. When Backup Exec indicates that the job is complete, restart the MSSQLSERVER service normally (without applying any parameters in the Startup Parameters field in the service's Properties  dialog box)

With the master restored and MSSQLSERVER service started, the rest of the restore can proceed. If the master database has not been restored correctly or MSSQLSERVER service will not start, please contact Symantec Technical Services or Microsoft Technical Support.

8. Access the Enterprise Manager Console via Windows Start | Programs | Microsoft SQL Server | Enterprise Manager (Figure 5)

Figure 5
 

9. Stop the SQLSERVERAGENT service and place the MSDB database in Single User mode, using SQL Enterprise Manager (Figure 6)

Figure 6
 

10. Right-click on MSDB database | Properties | Options, select Restrict Access, and select Single User (Figure 7)

Figure 7
 

11. Close SQL Enterprise Manager

12. In Backup Exec, select the MSDB database for restore (Figure 8 and Figure 8.1)

Figure 8
 

Figure 8.1 (Backup Exec 9.x / 10.x)
 

13. On the SQL tab in the Restore dialog box, select the Recover Database option (Figure 9)

Figure 9
 

14. Run the job

15. Access Enterprise Manager Console Via Windows Start | Programs | Microsoft SQL Server | Enterprise Manager

16. Place any other databases that exist in Single User mode, using the SQL Enterprise Manager (the master database and MSDB are not to be put in Single User mode at this point, as these databases are not going to be restored)

Note: At this point, it should be noted that other databases may not exist or not be in a ready state.

17. Choose all databases to be restored (not picking the master or MSDB databases (Figure 10)

Figure 10
 

18.  On the SQL tab in the Restore dialog box, select the Recover Database option (Figure 11)

Figure 11
 

19.  Run the job


Acknowledgements
Microsoft Q298568, Q257716, Q312990, Q238678, Q230568, Q307775

Products Applied:
 Backup Exec for Windows Servers 10.0, 10.0 5484, 10.0 5520, 10d (10.1), 10d (10.1) 5629, 11d (11.0), 11d (11.0) 6235, 11d (11.0) 7170, 12.0, 12.5, 9.1, 9.1 4691

Last Updated: July 20 2009 04:59 PM GMT
Expires on: 07-20-2010
Subscribe Via E-Mail IconSubscribe to receive critical updates about this document

Subjects:
 Backup Exec for Windows Servers
   Agent For Sql: Backup-Restore, Troubleshoot
   Application: Sql Module
   Priority: 07

Languages:
 English (US)

Operating Systems:
Windows 2000

Advanced Server, Server

Windows Server 2003

Enterprise Server, Standard Server