How to recover and restore SQL master database

How to recover and restore SQL master database

Published by Jacob Martin on November 6, 2013

Failure or corruption of master 1259346283-1-7131381database is very difficult situation for every user because this database has specific system information which is common to all databases and if the master database will get corrupt then it will makes you enable to login or start your SQL server. Sometime you can easily restore server by applying tested recovery plan.

Master database is very important part of any SQL database server and when this database becomes damaged due to any internal or external error then you can’t access your SQL server. You can rebuild the master server but this process will clear all data and information so make sure backup of your database is created.

Recover manually through rebuildm tool

You can recover this database by using the rebuildm tool; this is an inbuilt tool which is located at. .toolsbinn directory (C: . . .toolsbinn> rebuildm.exe. This tool can help us to recover the corrupted master database.

Run this tool and follow the steps to recover corrupted database

Step1– Provide location to the source and target location, change sort order if necessary.

Step 2– Click on ‘Yes’, to start the file copying process.

Step 3– All files being copied

Step 4– After the step 3 an exit dialog box will appear click on ‘Ok’ button.

Restore manually

After the recovery process you have to apply the restoring process through running some commands. In this process the backup of the database will be restored in the database server.

To restore the master database, you will need to execute the following steps:

  1. Add the backup device:
  2. sp_addumpdevice ‘disk’, ‘master_backup’,
  3. ‘c:tmpsql_backupmaster_backup.dmp’go
  4. Stop the SQL Server.
  5. To bring up SQL server into single-user mode do this, open DOS prompt, and execute the following command:
  6. C:Program FilesMicrosoft SQL ServerMSSQLBinn> sqlservr.exe -c -m
  7. Log into SQL Server as a user or as a trusted administrator.
  8. Now restore the master database just like you would any other database. Restore the database master from master_backup
  9. Here’s the output from that command:
  10. “The master database has been successfully restored. Shutting down SQL Server”
  11. Now restart the SQL server. If master database has been restored then the SQL server will automatically shut down.
  12. Restore other user databases if necessary. And if your other user database files are okay, then it is not necessary to restore them.
  13. Resynchronize SQL Server logins and users as needed.

If you are not able to recover and restore master database by applying the above given steps or you are the not know anything about computer and the DOS then you can recover the corrupted database by using any database repair tool.

This type of database repair tool is very helpful to recover any corrupted database easily without applying lengthy commands. By using any database repair tool you can recover any corrupt database very fast and efficiently. By applying this tool any one can recover and restore the corrupted master database because it not necessary to know DOS commands and other manual process while using any third party database recovery tool.

downloadnow-5667530

Steps to recover and restore SQL master database

Step 1: Stop the running MS SQL server. Perform the repair task on the copy of the corrupt database, click on the ‘OK’ button to continue.

1-3494174

Step 2: Click on the ‘Select database’ button and select the path of corrupt MDF file. You can also search your corrupt database file by using ‘Look in’ and ‘File Type’ button. click on the ‘Scan file‘ button to start the repairing process.

2-9257146

Step 3: The recoverable objects of database are listed in a tree view on the left side of the window. You can see the preview by clicking on the object.

3-5128791

Step 4: You can also search for a particular object by using ‘Find item’ option. Write the object name or a part of the object name in the given text box, check on ‘Match case‘ or ‘Match whole word‘ and then click find next button.

4-5116888

Step 5: Click on the ‘Start Repair’ icon. A dialog box will appear fill the SQL server instance name. To save the repaired file in the desired location click on the brows button and give the path, else the repaired file will be saved in the ‘Default SQL Location’. Click on the ‘OK’ button.

5-5885525

511 Total Views 1 Views Today