Restoring a .bak SQL backup database and creating a sample SQL Server database In SQL Server 2019
In this blog post I will be showing you how to not only restore a back up of a database using it's .bak backup file but also how to use this method to set up a sample or test database using SQL Server Management Studio
Download The Sample AdventureWorks Database .bak File
Go to https://github.com/Microsoft/sql-server-samples/releases/tag/adventureworks scroll down to Adventureworks2017.bak and click the link to download it
Restoring the SQL Database .bak file
Run SQL Server Management Studio as administrator
Right click Databases and choose Restore Database
Click the Device radio button then click ... to add a back up device
Click Add
Select the database .bak file you downloaded earlier in Step 1 and click OK
Click OK
Click Options then check the box for Overwrite the existing database then click OK and wait for the restoration to complete
Click OK
Access The Newly Restored Database
Expand Databases to access the restored database
Join me in the next blog post where I will show you how to take a back up of a database and more via SQL Server Management Studio!