In this blog post, I will be showing you how to install the AdventureWorks database on SQL Server. AdventureWorks is a sample database that is common amongst new and experienced database developers. It’s a fictitious company that covers scenarios around sales, purchasing, human resources and production. You can use this database to practice writing SQL queries.

Prerequisite
  1. Microsoft SQL Server and SQL Server Management Studio (SSMS) installed. You can check my post on how to install SQL Server on your machine.

You can download the database .bak file here. There have been different versions over the years from 2008R2 to 2019.

Here are some steps to guide you.
  1. After downloading the file, navigate to your “downloads” folder and search for the downloaded file.
  2. Navigate to the C: drive and create a folder called bak. You can name the folder whatever you please.
  3. You can also use the default backup location. Depending on the SQL Server version installed, the default backup location will be something similar to this: “C:\Program Files\Microsoft SQL Server\MSSQL15.MSSQLSERVER\MSSQL\Backup”
  4. Copy the downloaded bak file into this new folder.
  5. Launch SQL Server Management Studio and Right click on the “Databases” folder.
  6. Select Restore database. Your screen should look like this after launching

6. Select the “Device” radio button and click on the ellipses button (far right). A window “similar to the one below” will be displayed

7. Click “Add”.

8. On the next screen, as shown below, navigate to the C: drive, then the bak folder.  The default folder will be similar to this “C:\Program Files\Microsoft SQL Server\MSSQL15.MSSQLSERVER\MSSQL\Backup” depending on what version of windows you’re using or the version of SQL Server you have installed.

9. Select the .bak file you copied in step 3, then click “OK”

10. In the next window, select the file and click OK

11. Click OK (at the bottom of the screen)

12. Check the “Restore” box and click the restore button (bottom right corner)

13. Once the restore is complete, you will get the message “Database ‘AdventureWorks2017’ restored successfully” as displayed below

14. Your database is now ready for use