How to rebuild Master Database in SQL Server

How to rebuild Master Database in SQL Server

We recently resolved a request from a client that he is not able to access a SQL machine. We have logged into the sql box and we cam to know that the master database has been corrupted. IT is a SQL Server 2008 machine.

We generally use the statement shown below, using the “REBUILDDATABASE” option in setup.exe and the “/qn” parameter for installation to run silently:

Here is the script help us to know how to rebuild a master dtaabase in sql server

start /wait  setup.exe / qn
INSTANCENAME=  
REINSTALL=SQL_Engine
REBUILDDATABASE=1 
SAPWD=

 

We wondered , we found that the statement doe’s not work and still the problem alive. We almost had a 108 rounds around the Google and finally found the solution from a blog. It was really helped us in resolving the issue. We ran the below statement

setup.exe
/QUIET
/ACTION=REBUILDDATABASE 
/INSTANCENAME=instance_name 
/SQLSYSADMINACCOUNTS= accounts 
[/SAPWD=password] 
[/SQLCOLLATION=collation_name]

Thank God the database backed up and services were started , we have restored the master database with the latest backup and all the databases were online w/o any issue

 

Posted in SQL Scripts, SQL Server DBA | Tagged , , , , , , | Leave a comment
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments