{"id":1791,"date":"2024-08-17T18:00:00","date_gmt":"2024-08-17T16:00:00","guid":{"rendered":"https:\/\/b2analyze.nl\/?p=1791"},"modified":"2024-08-17T18:16:03","modified_gmt":"2024-08-17T16:16:03","slug":"restore-adventureworks-database","status":"publish","type":"post","link":"https:\/\/backup.b2analyze.nl\/nl\/restore-adventureworks-database\/","title":{"rendered":"How to Restore the AdventureWorks Database to SQL Server using SSMS"},"content":{"rendered":"<p>This tutorial explains how to restore a free sample database to SQL Server using SQL Server Management Studio (SSMS). We will be using the AdventureWorks database, which represents a fictitious global manufacturing company that produces cycling equipment and accessories. This database is originally published by Microsoft and ideal for beginner data analysts who want to practice their SQL skills for data analysis.<\/p>\n\n\n\n<p>Let&#8217;s get started!<\/p>\n\n\n\n<div class=\"wp-block-rank-math-toc-block\" id=\"rank-math-toc\"><h2>Table of Contents<\/h2><nav><ul><li><a href=\"#prerequisites\">Prerequisites<\/a><\/li><li><a href=\"#step-1-download-adventure-works-database\">Step 1. Download AdventureWorks Database<\/a><\/li><li><a href=\"#step-2-restore-adventure-works-database-to-sql-server\">Step 2. Restore AdventureWorks Database to SQL Server<\/a><\/li><\/ul><\/nav><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"prerequisites\">Prerequisites<\/h2>\n\n\n\n<p>A prerequisite for this tutorial is to have Microsoft SQL Server and SQL Server Management Studio (SSMS) installed on your machine. Check out <a href=\"https:\/\/backup.b2analyze.nl\/nl\/install-sql-server-and-ssms\/\" data-type=\"post\" data-id=\"1742\" target=\"_blank\" rel=\"noreferrer noopener\">my previous post<\/a> to quickly learn how to set up a free edition.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"step-1-download-adventure-works-database\"><strong>Step 1. Download AdventureWorks Database<\/strong><\/h2>\n\n\n\n<p>The first step is to download the AdventureWorks database from the official Microsoft website. Navigate to the <a href=\"https:\/\/learn.microsoft.com\/en-us\/sql\/samples\/adventureworks-install-configure?view=sql-server-ver16&amp;tabs=ssms\" target=\"_blank\" rel=\"noreferrer noopener\">AdventureWorks sample databases<\/a> page and scroll down to the &#8220;Download backup files&#8221; section. There are multiple versions available. For this tutorial, download the latest online transaction processing (OLTP) version, which in our case is &#8220;AdventureWorks2022.bak&#8221;.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img fetchpriority=\"high\" decoding=\"async\" width=\"890\" height=\"452\" src=\"https:\/\/backup.b2analyze.nl\/wp-content\/uploads\/2024\/08\/adventureworks-download.png\" alt=\"\" class=\"wp-image-2254\" srcset=\"https:\/\/backup.b2analyze.nl\/wp-content\/uploads\/2024\/08\/adventureworks-download.png 890w, https:\/\/backup.b2analyze.nl\/wp-content\/uploads\/2024\/08\/adventureworks-download-300x152.png 300w, https:\/\/backup.b2analyze.nl\/wp-content\/uploads\/2024\/08\/adventureworks-download-768x390.png 768w, https:\/\/backup.b2analyze.nl\/wp-content\/uploads\/2024\/08\/adventureworks-download-18x9.png 18w\" sizes=\"(max-width: 890px) 100vw, 890px\" \/><\/figure>\n\n\n\n<p>Move the downloaded .bak file to your SQL Server backup location. This location varies depending on your installation path, instance name, and version of SQL Server. The default location for a default instance of SQL Server 2022 (16.x) is:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"796\" height=\"132\" src=\"https:\/\/backup.b2analyze.nl\/wp-content\/uploads\/2024\/08\/adventureworks-backup-location.png\" alt=\"\" class=\"wp-image-2255\" srcset=\"https:\/\/backup.b2analyze.nl\/wp-content\/uploads\/2024\/08\/adventureworks-backup-location.png 796w, https:\/\/backup.b2analyze.nl\/wp-content\/uploads\/2024\/08\/adventureworks-backup-location-300x50.png 300w, https:\/\/backup.b2analyze.nl\/wp-content\/uploads\/2024\/08\/adventureworks-backup-location-768x127.png 768w, https:\/\/backup.b2analyze.nl\/wp-content\/uploads\/2024\/08\/adventureworks-backup-location-18x3.png 18w\" sizes=\"(max-width: 796px) 100vw, 796px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"step-2-restore-adventure-works-database-to-sql-server\"><strong>Step 2. Restore AdventureWorks Database to SQL Server<\/strong><\/h2>\n\n\n\n<p>Now that you have downloaded the AdventureWorks database and moved it to your SQL Server backup location, it&#8217;s time to open SQL Server Management Studio (SSMS). Launch the app from the Start Menu and connect to your SQL Server instance. If you are unsure what to do, be sure to check out <a href=\"https:\/\/backup.b2analyze.nl\/nl\/install-sql-server-and-ssms\/\" target=\"_blank\" rel=\"noreferrer noopener\">my previous post<\/a>.<\/p>\n\n\n\n<p>Within SQL Server Management Studio, navigate to the Object Explorer on the left-hand side. Right-click on &#8220;Databases&#8221; and select &#8220;Restore Database&#8221;. This will open the Restore Database wizard.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"543\" src=\"https:\/\/backup.b2analyze.nl\/wp-content\/uploads\/2024\/08\/ssms-restore-database-1024x543.png\" alt=\"\" class=\"wp-image-2256\" srcset=\"https:\/\/backup.b2analyze.nl\/wp-content\/uploads\/2024\/08\/ssms-restore-database-1024x543.png 1024w, https:\/\/backup.b2analyze.nl\/wp-content\/uploads\/2024\/08\/ssms-restore-database-300x159.png 300w, https:\/\/backup.b2analyze.nl\/wp-content\/uploads\/2024\/08\/ssms-restore-database-768x408.png 768w, https:\/\/backup.b2analyze.nl\/wp-content\/uploads\/2024\/08\/ssms-restore-database-1536x815.png 1536w, https:\/\/backup.b2analyze.nl\/wp-content\/uploads\/2024\/08\/ssms-restore-database-18x10.png 18w, https:\/\/backup.b2analyze.nl\/wp-content\/uploads\/2024\/08\/ssms-restore-database.png 1918w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Within the Restore Database wizard, select &#8220;Device&#8221; and click on the three dots (&#8230;) next to it. Then click on &#8220;Add&#8221; and select the downloaded AdventureWorks file.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"835\" height=\"563\" src=\"https:\/\/backup.b2analyze.nl\/wp-content\/uploads\/2024\/08\/ssms-locate-backup-file.png\" alt=\"\" class=\"wp-image-2266\" srcset=\"https:\/\/backup.b2analyze.nl\/wp-content\/uploads\/2024\/08\/ssms-locate-backup-file.png 835w, https:\/\/backup.b2analyze.nl\/wp-content\/uploads\/2024\/08\/ssms-locate-backup-file-300x202.png 300w, https:\/\/backup.b2analyze.nl\/wp-content\/uploads\/2024\/08\/ssms-locate-backup-file-768x518.png 768w, https:\/\/backup.b2analyze.nl\/wp-content\/uploads\/2024\/08\/ssms-locate-backup-file-18x12.png 18w\" sizes=\"(max-width: 835px) 100vw, 835px\" \/><\/figure>\n\n\n\n<p>From the above screenshot, click &#8220;OK&#8221; and click &#8220;OK&#8221; again to confirm the backup file location. This brings you back to the main Restore Database prompt. Click &#8220;OK&#8221; one more time to restore the database to your SQL Server instance. Once complete, the AdventureWorks database will be available in the Object Explorer.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"543\" src=\"https:\/\/backup.b2analyze.nl\/wp-content\/uploads\/2024\/08\/ssms-adventureworks-restored-1024x543.png\" alt=\"\" class=\"wp-image-2267\" srcset=\"https:\/\/backup.b2analyze.nl\/wp-content\/uploads\/2024\/08\/ssms-adventureworks-restored-1024x543.png 1024w, https:\/\/backup.b2analyze.nl\/wp-content\/uploads\/2024\/08\/ssms-adventureworks-restored-300x159.png 300w, https:\/\/backup.b2analyze.nl\/wp-content\/uploads\/2024\/08\/ssms-adventureworks-restored-768x407.png 768w, https:\/\/backup.b2analyze.nl\/wp-content\/uploads\/2024\/08\/ssms-adventureworks-restored-1536x814.png 1536w, https:\/\/backup.b2analyze.nl\/wp-content\/uploads\/2024\/08\/ssms-adventureworks-restored-18x10.png 18w, https:\/\/backup.b2analyze.nl\/wp-content\/uploads\/2024\/08\/ssms-adventureworks-restored.png 1918w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>That&#8217;s it! You have successfully restored the Adventureworks database to your SQL Server instance. In the next tutorial, you will learn how to explore it by writing SQL queries.<\/p>\n\n\n\n<p><\/p>","protected":false},"excerpt":{"rendered":"<p>This tutorial explains how to restore a free sample database to SQL Server using SQL Server Management Studio (SSMS). We will be using the AdventureWorks database, which represents a fictitious global manufacturing company that produces cycling equipment and accessories. This database is originally published by Microsoft and ideal for beginner data analysts who want to [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":1684,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[],"class_list":["post-1791","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-sql"],"blocksy_meta":[],"_links":{"self":[{"href":"https:\/\/backup.b2analyze.nl\/nl\/wp-json\/wp\/v2\/posts\/1791","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/backup.b2analyze.nl\/nl\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/backup.b2analyze.nl\/nl\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/backup.b2analyze.nl\/nl\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/backup.b2analyze.nl\/nl\/wp-json\/wp\/v2\/comments?post=1791"}],"version-history":[{"count":24,"href":"https:\/\/backup.b2analyze.nl\/nl\/wp-json\/wp\/v2\/posts\/1791\/revisions"}],"predecessor-version":[{"id":2300,"href":"https:\/\/backup.b2analyze.nl\/nl\/wp-json\/wp\/v2\/posts\/1791\/revisions\/2300"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/backup.b2analyze.nl\/nl\/wp-json\/wp\/v2\/media\/1684"}],"wp:attachment":[{"href":"https:\/\/backup.b2analyze.nl\/nl\/wp-json\/wp\/v2\/media?parent=1791"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/backup.b2analyze.nl\/nl\/wp-json\/wp\/v2\/categories?post=1791"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/backup.b2analyze.nl\/nl\/wp-json\/wp\/v2\/tags?post=1791"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}