Repair Rebuild In SQL Server to Fix Master Database Corruption

Daniel Jones ~ Modified: February 25th, 2023 ~ SQL, SQL Master Database ~ 7 Minutes Reading

Fix Master Database Corruption

Master Database is the most important part of SQL Server. It stores the user login credentials and information pointers to all databases in SQL Server. Needless to say, If something happens to the master database, users are unable to access or work smoothly. Therefore, in this post, we will cover possible solutions to fix corrupt master database in SQL Server. One such way is to use Repair_Rebuild in SQL Server. You can use other options to fix master database corruption as well.

It’s not that difficult to rebuild master database in SQL server as users usually say. Let’s find out more in the following segment.

Possible Solutions to Repair Master Database

There are multiple methods through which a system administrator can repair or fix master database corruption. Following are some of the methods listed below:


Download Now Purchase Now

Solution#1 Using The Microsoft SQL Server Management Studio Express

This is a Management platform provided by Microsoft for SQL Server Administration. It is a great facility to recover a corrupt master database file. For using this management tool user needs to first have Microsoft Web Platform installed on their system. After that, install the MS SQL Management Studio Express according to the SQL Server version.

  • Step 1: Launch the Management Studio Express from C:/Program files/Microsoft SQL Server / SQL Server Management Studio Express.
  • Step 2: Now, Type the Windows Authentication login credentials
  • Step 3: After that, Expand databases and find wt_shed. Right-click on this file and then go to Properties >> Options
  • Step 4: Next, Scroll down to the bottom of the page. Then, modify Restrict Access to SINGLE_USER
  • Step 5: Now, select OK button and repeat step#2 for wtMaster part of the database to recover master database SQL 2005 or any other version.
  • Step 6: From here, select New Query from the toolbar. After that, copy and paste the commands below into the query pane.
    • dbcc checkdb(‘wtMaster’,REPAIR_REBUILD)
    • dbcc checkdb(‘wt_sched’,REPAIR_REBUILD)
  • Step 7: Now, select Execute for repairing the SQL Server
  • Step 8: After that, follow steps 4 and 5 and change back the Restrict Access from SINGLE_USER to MULTIPLE_USER

Solution#2 Using The Rebuild Wizard

This is also a prominent solution for fixing corrupt master database or MSDB files. It may prevent the SQL Server from starting. In such cases, users can rebuild the master database and restart SQL Server from a previously backed up version. The rebuild wizard is used to rebuild the master database.

Well, this is a long and time-consuming step as SQL Server in being installed again. It requires a lot of patience and technical knowledge. Users must take a precautionary backup of server files before rebuilding it from scratch. Follow the steps below in order to rebuild and restore SQL Server. The Rebuild Wizard or Rebuildm.exe file can be found on the default location \Program Files\Microsoft SQL Server\80\Tools\BINN directory.

  • First, Launch the Rebuild Master by double clicking Rebuildm.exe
  • Now, In the Rebuild Wizard check whether the collation settings and database location are correct. And then, click Rebuild
  • Next, click Yes on the confirmation box. Now the rebuilding process has started
  • After that, a message box will appear at the end of the rebuilding process. Click OK to move to the next step
  • Now, Go to Command prompt and enter the \Program Files\Microsoft SQL Server\MSSQL\BINN\ directory.
  • After that, type sqlservr.exe –c -m to launch the SQL Server Configuration Manager
  • In the SQL Server Configuration Manager, go to the Startup Parameter tab.
  • Now, type ‘-m’ in the startup parameter box
  • Next, Click on Add and then Apply to confirm the changes
  • After that, restart SQL Server
  • Having done that, type the following command in the query pane to rebuild master database in SQL Server
    Start /wait setup.exe /qn INSTANCENAME= REINSTALL=SQL_Engine REBUILDDATABASE=1 sapwd=

Rebuild Wizard Easy Solution

It will rebuild the corrupt database in SQL Server including the master database file. Now, restore the master database file, users need to have the latest backup of master.mdf and master.ldf files. Launch the SQL Server in single user mode and follow the steps below for recovering SQL server from a backup file.

  • Open SQL Server Configuration Manager and select SQL Server 2005 Services
  • Next, Go to SQL Server instance and right click on it. And then, click Properties
  • Now, On the SQL Server Properties Window, select the Advanced tab.
  • Now, Go to the startup parameters tab and prefix ‘-m’ in the startup parameters text box. Remove the prefix after the process is complete.
  • Now, Launch the SQL Server and type in the following command to restore SQL Server from a master backup file.
    • RESTORE DATABASE master FROM DISK = ‘C:\BackupLocation\master.bak’ WITH REPLACE; GO

Solution#3 Alternative Solution To Fix Master Database Corruption

At times, the manual solution can be very difficult to understand and follow. A thorough knowledge of working as a system administrator of SQL Server is required. Hence, users look for a workaround from the tedious and irrelevant procedures. Users can opt for an alternate solution to perform the lengthy steps. This involves downloading a third-party application like SQL Database Repair Tool.

It is a reliable and efficient solution for recovering corrupt database files of SQL Server. The software is very easy-to-use and can be used by both technical and non-technical users. Follow the below steps just like mentioned in the respective images to get the best results. This is so far the best way to repair or fix corrupted master database in the SQL server. Most of the users demand the software to recover master database SQL 2008 version. Well, this utility can repair files of SQL Server 2000, 2005, 2008, 2012, 2014, 2016, 2017, & 2019.

Step-1. Launch the Tool & then Click on the Open button to begin.

Click on Open button

Step-2. Select the Quick or Advanced Scan option as per your choice.

Select Scan mode

Step-3. Preview your database Files & Click on the Export option on top.

Preview files & proceed

Step-4. Select the Destination Location & Adjust other settings preferably.

Select destination location here

Step-5. Finally, Click on the Export button to complete this recovery task with ease.

Click export to Fix Master Database Corruption

Important Note: In case users have damaged database, & they not only want to repair them but also to migrate them to another server, they can get a better solution that this. For the purpose of data migration of SQL server, users can download the below migration tool for free. It can help users to copy table from one database to another server safely.

Download Now Purchase Now

Wrapping It Up

Corruption in the master database is a major issue that can prevent users from accessing SQL Server. Once the master database is corrupted all the essential information regarding login details are lost as well. Hence, users can use the manual solutions suggested in this post for SQL Server Repair Rebuild Usage.

An alternative solution is also suggested for non-technical users to fix master database corruption. Therefore, professional solution like SQL Recovery software can make the entire task easier and simpler.

User Reviews

After trying the solution for SQL recovery, I felt quite relieved. It helped me remove corruption from all of my master database files in SQL. I haven’t seen any other tool working so flawlessly. The simplified GUI is the best thing about this tool to rebuild master database in SQL server. Keep it up!
Logan Green, USA

The less it shows, the more it does. This is the kind of tool that performs better than it claims. I didn’t know that fixing & repairing damaged MDF files is so easy. Moreover, to fix my master DB corrupted in SQL server DB, this is my first & only choice at any time.
Nylah Parker, USA

It’s been almost 2 years that I’m using this classy recovery tool. I must say that it works more than what its name signifies. Also, top-notch security & interesting features make the task even easier for beginners. This definitely saves plenty of money & time to fix master database corruption issues.
Emerson Bennet, USA

No matter how complicated is the damage in the MDF file, If you have this automated utility, you’re pretty much sorted. The way it fixes damaged files, no other tool can beat this. In addition, I liked how they offer the capability to recover master database SQL 2000, 2005, 2008, 2008R2, 2012, 2014, 2016, 2017 & 2019.
Jocelyn Hill, USA