Restore databases in MS SQL 2016

In this post I will show you how to restore a database in SQL Server 2016. As a test database I chose the AdventureWorks2016CTP3 database, you can download it HERE.

We have two ways how to restore database:

1) Using T-SQL

2) Using Management Studio

For me it is better and faster to use T-SQL, because I have already saved template for Restore DB and that I use all the time. In our example with sample DB AdventureWorks2016CTP3 query looks like this:

If the query was executed successfully, It should look like below:

Restore Database - Result

The second option is using Management Studio:

1) First right click on Databases - Choose Restore Database...

Restore Database...

2) In the window, checkbox Device(2.) - then click Browse(3.)

Restore DB

3) Then click Add(3.)

Select backup devices

4) Now you have to select your backup file(.BAK)(4.) and then double click OK(5.)

BackUp File

5) Now you can specify where .mdf, .ldf, etc. files will be placed(6.)

Location for Data file

6) We arwe almost done. If you want in Options tab, there are a lot of options like "With recovery","With replace" or "Keep_Replication"you can work with that. There is going to be another article about restoration.

Recovery DB

As you can see database AdventureWorks2016CTP3 has been restored successfully!

See you next time! Pigeon is flying away!

RECENT POST