Difference between revisions of "RecoverMSSQL"

From Tranzman Documentation
Jump to: navigation, search
Line 1: Line 1:
 
The following method has been tested with the versions of Microsoft SQL 2008,2012 & 2014 for recovering the Database Files and getting the server back up and running.
 
The following method has been tested with the versions of Microsoft SQL 2008,2012 & 2014 for recovering the Database Files and getting the server back up and running.
  
'''Step 1'''
+
==='''Step 1'''===
  
 
Extract all database files to a temporary location on the client SQL Server and rename them to a ".BAK" type.
 
Extract all database files to a temporary location on the client SQL Server and rename them to a ".BAK" type.
 
: '''''i.e. "C:\Temp\New_DB.BAK"'''''
 
: '''''i.e. "C:\Temp\New_DB.BAK"'''''
  
'''Step 2'''
+
==='''Step 2'''===
  
 
Open MS SQL Management Studio, log in to the instance and create a new Blank Database.
 
Open MS SQL Management Studio, log in to the instance and create a new Blank Database.
Line 12: Line 12:
 
[[File:MSSQL_New_DB.jpg]]
 
[[File:MSSQL_New_DB.jpg]]
  
'''Step 3'''
+
==='''Step 3'''===
  
 
Right click on the new database, select actions and Restore Database.
 
Right click on the new database, select actions and Restore Database.
Line 18: Line 18:
 
[[File:MSSQL_Restore_DB_01.jpg]]
 
[[File:MSSQL_Restore_DB_01.jpg]]
  
'''Step 4'''
+
==='''Step 4'''===
  
 
For the source select From Device, and point it to the BAK file of the New_DB.
 
For the source select From Device, and point it to the BAK file of the New_DB.
Line 24: Line 24:
 
[[File:MSSQL_Restore_DB_02.jpg]]
 
[[File:MSSQL_Restore_DB_02.jpg]]
  
'''Step 5'''
+
==='''Step 5'''===
  
 
On the left had pane, go to Options, and tell it where the New_DB is located on the SQL Server.  
 
On the left had pane, go to Options, and tell it where the New_DB is located on the SQL Server.  
Line 33: Line 33:
 
: '''''%system drive%\Program Files\Microsoft SQL\Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\New_DB_log.ldf'''''
 
: '''''%system drive%\Program Files\Microsoft SQL\Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\New_DB_log.ldf'''''
  
'''Step 6'''
+
==='''Step 6'''===
  
 
This would have now restored the backup files from Northwind Database into New_DB.
 
This would have now restored the backup files from Northwind Database into New_DB.

Revision as of 11:16, 30 August 2018

The following method has been tested with the versions of Microsoft SQL 2008,2012 & 2014 for recovering the Database Files and getting the server back up and running.

Step 1

Extract all database files to a temporary location on the client SQL Server and rename them to a ".BAK" type.

i.e. "C:\Temp\New_DB.BAK"

Step 2

Open MS SQL Management Studio, log in to the instance and create a new Blank Database.

MSSQL New DB.jpg

Step 3

Right click on the new database, select actions and Restore Database.

MSSQL Restore DB 01.jpg

Step 4

For the source select From Device, and point it to the BAK file of the New_DB.

MSSQL Restore DB 02.jpg

Step 5

On the left had pane, go to Options, and tell it where the New_DB is located on the SQL Server. Sample paths can be as follows;

%system drive%\Program Files\Microsoft SQL\Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\New_DB.mdf
%system drive%\Program Files\Microsoft SQL\Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\New_DB_log.ldf

Step 6

This would have now restored the backup files from Northwind Database into New_DB.