How to rebuild the server when the master database is crashed?
If master is crashed the server will not restart then follow these steps to bring back server online.
Step 1:
First we have to check server error-log there it will mention restore the master database or re-install in event viewer-->windows logs-->application it will show that the master database is crashed, have to restore or re-install.
Step 2:
Rebuild the system databases from command prompt. Go to the following path and run setup as follows
C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\SQLServer2008R2
Step 3:
Step 4:
Restart the SQL server services.
Step 5:
Connect to the instance. But you cannot see any user defined databases. The rebuilding process has created fresh\brand new master database so there are no other databases and all previous configurations are lost.
Step 6:
Now we have to restore the master database to get all the previous configurations. Go to command prompt and run the instance in single user mode
net stop instancename
net start instancename /m
Step 7:
Connect to the instance and take new query to restore master database. Once we restore master database, then we can get all the previous configuration values including user defined databases.
Step 8:
Click on Connect button and connect to the instance.
Step 9:
Restore master database as follows
restore database master from disk='path.bak' with replace
Step 10:
Restart the SQL server instance, it will start in multi user mode, here we can see all the user defined databases.
First we have to check server error-log there it will mention restore the master database or re-install in event viewer-->windows logs-->application it will show that the master database is crashed, have to restore or re-install.
Step 2:
Rebuild the system databases from command prompt. Go to the following path and run setup as follows
C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\SQLServer2008R2
Step 3:
Once the above command runs successfully, check the summary.txt file, if the final result is passed and check the requested action as Rebuilddatabase.
Step 4:
Restart the SQL server services.
Step 5:
Connect to the instance. But you cannot see any user defined databases. The rebuilding process has created fresh\brand new master database so there are no other databases and all previous configurations are lost.
Step 6:
Now we have to restore the master database to get all the previous configurations. Go to command prompt and run the instance in single user mode
net stop instancename
net start instancename /m
Step 7:
Connect to the instance and take new query to restore master database. Once we restore master database, then we can get all the previous configuration values including user defined databases.
Step 8:
Click on Connect button and connect to the instance.
Step 9:
Restore master database as follows
restore database master from disk='path.bak' with replace
Step 10:
Restart the SQL server instance, it will start in multi user mode, here we can see all the user defined databases.
thank u
ReplyDelete