Open In App

How to Download and Install AdventureWorks Database in SQL?

Improve
Improve
Like Article
Like
Save
Share
Report

AdventureWorks is a database provided by Microsoft for free on online platforms. It is a product sample database originally published by Microsoft to demonstrate the supposed design of a SQL server database using SQL server 2008. Here are some key points to know about AdventureWorks:

  • AdventureWorks database supports a manufacturing MNC named Adventure Works Cycles.
  • It is a sample Online Transaction Processing (or OLTP) database, which is a type of data processing where multiple transactions occur concurrently. These are shipped by Microsoft with all of their SQL server products.
  • This sample database has also been used in the code snippets of the documentation of the SQL server.
  • There have not been many changes in AdventureWorks since the version of 2012, except for some database compatibility levels.

Downloading and Installation of AdventureWorks Database in SQL

AdventureWorks can be downloaded and installed in the SQL server by the following steps:

Step 1: Go to the link: https://github.com/Microsoft/sql-server-samples/releases/tag/adventureworks. In the Additional OLTP backups and samples section, download the file: AdventureWorks2019.bak.

Downloading-adventure-works-

 

Step 2: From the Downloads folder, copy the downloaded .bak file of AdventureWorks2019 to the path: C:\Program Files\Microsoft SQL Server\MSSQL15.MSSQLSERVER\MSSQL\Backup.

Copying-file-from-downloads-folders

 

Step 3: Open Microsoft Server SQL Management Studio, in the object explorer, –> Databases, right click on the Databases folder and choose the option Restore Database.

Restoring-database

 

Step 4: Inside the Source section, switch to the Device option from Database.

Switching-to-device-section

 

Step 5: Browse the AdventureWorks.bak file path and add it.

Browsing-AdventureWorks.bak-file

 

AdventureWorks2019.back-chosen

 

Backing-up-media

 

Step 6: Click OK and proceed.

Restoring-database

 

Restoring-process-completed

 

Step 7: Now AdventureWorks has been restored, we can check this by running a query through one of the tables in the tables folder of AdventureWorks.

Running-query

 

The query run above displays the data, indicating the successful installation of AdventureWorks in the SQL server. 


Last Updated : 30 Aug, 2022
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads