Rebuild Master:
Step 1: Insert your setup media CD or folder where you have dumped SQL Server InstallationStep 2: Open command prompt
Step 3: Go to location (wherever you have setup, Step 1)
Step 4: setup /ACTION=REBUILDDATABASE /QUIET /INSTANCENAME=MSSQLServer /SQLSYSADMINACCOUNTS=MyAdmin /SAPWD=somePwd
Step 5: this will pop up new command window and then disappears
Step 6: you will have to refer logs so as to see whether it was successful completed or exit with error
This is it, you system database has been rebuild successfully!!
Restoring Master Database - An alternative method:
Step 1: Take backup of master database, in your case, I assume, you already have your master database backed up.
Step 2: Stop SQL Server Services * you will need Administrator permission for this operation
Step 3: Start SQL Server using -C and -M parameter; this will start SQL Server in single user mode which is required to restore Master database
Step 4: Restore database using SQLCMD
This is it, you have successfully restore your master database!!!
Is it this simple? No, wait, there are few things we need to be careful with....
The above example have save you because below conditions are true:- You have back up of your master database, or
- This server is fresh installation or
- there are no user databases or
- this server is not production box
- Restore / Rebuild system databases
- Recreate all the Login that you have on your crashed server - backing up master db helps you here
- you will have to recreate all the jobs and SSIS/DTS Packages that you have - backing up MSDB database will save you
- similarly distribution database backup will help you if you have replication configured
Disclaimer : The example used here is for illustration purpose only.
No comments:
Post a Comment