Download and Install Sample Database (AdventureWorks2019)
The AdventureWorks2019 database is a sample database used for learning and testing in SQL Server. It contains a sample of data that simulates a fictitious bicycle company’s sales, manufacturing, and product data. Here are the steps to download and install the AdventureWorks2019 database:
- Download the AdventureWorks2019 backup file: Go to the Microsoft Learn Website at AdventureWorks sample databases – SQL Server | Microsoft Learn and download the file “AdventureWorks2019.bak” to your local computer.
- Restore the database backup file: Open SQL Server Management Studio and connect to your SQL Server instance. Right-click on the “Databases” folder and select “Restore Database…”. In the “General” section, select “Device” as the source and click on the “…” button to choose the “AdventureWorks2019.bak” backup file. Click “OK” to return to the main restore screen.
- Set restore options: In the “Options” section, select “Overwrite the existing database” and “Close existing connections to destination database”. Make sure that the “Restore As” option is set to “AdventureWorks2019,” and click “OK” to start the restore process.
- Verify the database is installed: Once the restore process completes, expand the “Databases” folder in the Object Explorer and look for the “AdventureWorks2019” database. Right-click on the database and select “Properties” to verify that it is installed and view its properties.
That’s it! You have now downloaded and installed the AdventureWorks2019 database in SQL Server. You can now use this database to practice and learn SQL Server or test your applications.
