Friday, August 07, 2015

restore Master from Backup


To restore the master database

  1. Start the server instance in single-user mode.


To configure startup options

  1. In SQL Server Configuration Manager, click SQL Server Services.
  2. In the right pane, right-click SQL Server (<instance_name>), and then click Properties.
  3. On the Startup Parameters tab, in the Specify a startup parameter box, type the parameter, and then click Add.
    For example, to start in single-user mode, type -m in the Specify a startup parameter box and then click Add. (When you restart SQL Server in single-user mode, stop the SQL Server Agent. Otherwise, SQL Server Agent might connect first and prevent you from connecting as a second user.)
  4. Click OK.
  5. Restart the Database Engine.

To restore a full database backup of master

use the following RESTORE DATABASE Transact-SQL statement:
RESTORE DATABASE master FROM <backup_device> WITH REPLACE

C:\Users\boconnell>SQLCMD -E -S touch -Q "RESTORE DATABASE Master FROM DISK='\\BlahBlah\sqlbackups\PRD\VM\Blah05P$PRD5\master\FULL\Blah05P$PRD5_master_FULL_20150806_140500.bak" WITH REPLACE

Nota Bena:
make sure that all databases are present that were present beffore the restore. If any are not accessable then attach them.



0 Comments:

Post a Comment

<< Home