How to Restore Database in SQL Server using BAK file?. For this demonstration, we are going to use the Management Studio to restore the database from the .bak file.
As you can see, the server does not have the AdventureWorks2017 database
See that the Mdf and ldf files corresponding to the AdventureWorks2017 are not there in C Drive.
We have a Backup file in our D Drive, and we use this file to restore
Restore Database in SQL Server using BAK File
Right-click on the Databases folder and select the Restore Databases… option.
Selecting the Restore Databases.. option, it will open the following window.
In this example, we want to restore a database from the file system. So, let me select the Device option. Next, click on the … button will open the following window.
Click on the Add button and select the backup file by navigating to the file location.
Click OK to restore the Adventureworks database
Please wait until the restore finished.
Click OK to Restore Database using bak file.
Now you can see the Adventure Works 2017 database in the Management Studio.
The above process has automatically added the Mdf and ldf files to the C Drive.