Restore SQL Server Databases

Method 1 – T-SQL:

Syntax

Restore database <Your database name> from disk = '<Backup file location + file name>'


Method 2 – SSMS (SQL Server Management Studio)

Step 1 − Connect to database instance named 'TESTINSTANCE' and right-click on databases folder. Click Restore database as shown in the following snapshot.

management_studio_testinstance.jpg

Step 2 − Select device radio button and click on ellipse to select the backup file as shown in the following snapshot.

select_backup_device.jpg

Step 3 − Click OK and the following screen pops up.

restore_database.jpg

Step 4 − Select Files option which is on the top left corner as shown in the following snapshot.

Step 5 − Select Options which is on the top left corner and click OK to restore 'TestDB' database as shown in the following snapshot.


restore_database_testdb1.jpg

By tutorialspoint, SIMPLYEASYLEARNING


Jon Bossman