Skip to content
SQLDoubleG
Menu
  • Home
  • Articles
  • SQL-G Hacks
  • Language: English
    • English English
    • Español Español
Menu

Day 0 @ AdventureWorks, setting up AdventureWorks sample database

Posted on Sunday September 13th, 2015

Guide to explain how get AdventureWorks sample database and install it in your environment I wasn’t planning writing this post, because there are tons of resources available on the internet, but since I want to create a comprehensive series of exercises, starting from the very basic, I understand most people interested on doing them, might have limited SQL Server knowledge.

AdventureWorks is one of the Microsoft sample databases ready for downloading here which can be installed on any SQL Server whose version is equal or superior to the version of the database, I mean if you download AdventureWorks2014 (current version) that can be installed in SQL Server 2014 onwards, not possible then in SQL 2012, 2008R2 and so on.

A free version of SQL Server is available for downloading here. It’s called Express Edition and as I said is free to anyone. Although I recommend, if you can, get a Developer Edition which contains all the features SQL Server has.

Once SQL Server is installed, (if you are not sure, just leave all defaults and click ‘Next’ till is done) you have to restore the AdventureWorks2014 database.

I recommend downloading the ‘Adventure Works 2014 Full Database Backup.zip‘ and place it in your server backup folder. You can check where this is in SQL Server Management Studio by right clicking your server name and then ‘Properties’. Go to ‘Database Settings’ to find all default paths.

Day_0_Server_Properties

Take notes of the three paths you have under ‘Database default locations’ because we’re going to need them later.

First extract the zip file in the backup folder and open a new query where you have to write the following RESTORE database statement.


RESTORE DATABASE [AdventureWorks2014]
	-- This path should be YOUR Backup default path
	FROM DISK = 'C:\Program Files\Microsoft SQL Server\MSSQL12.MSSQL2014\MSSQL\Backup\AdventureWorks2014.bak'
	-- This path should be YOUR Data default path
	WITH MOVE 'AdventureWorks2014_Data' TO 'C:\Program Files\Microsoft SQL Server\MSSQL12.MSSQL2014\MSSQL\DATA\AdventureWorks2014_Data.mdf'
	-- This path should be YOUR Log default path
		, MOVE 'AdventureWorks2014_Log' TO 'C:\Program Files\Microsoft SQL Server\MSSQL12.MSSQL2014\MSSQL\DATA\AdventureWorks2014_Log.ldf'

Once you execute this successfully, the database AdvntureWorks2014 should be available for you to start using it.

2 thoughts on “Day 0 @ AdventureWorks, setting up AdventureWorks sample database”

  1. Pingback: Welcome to your new office! | SQLDoubleG
  2. Pingback: Index fun, disabling the Clustered Index | SQLDoubleG

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

  • About this blog
  • Articles
  • Development
  • Free Training
  • Security
  • SQL Server 2016
  • SQL-G Hacks
  • T-SQL Tuesday

Latest Posts

  • T-SQL Tuesday #158, Implementing Worst Practices
  • T-SQL Tuesday #155 –The Dynamic Code Invitation
  • FillFactor, the Untold Story
  • How I Compared 1000’s of database’s schemas at once
  • How to Update SQL Server Stats The Right Way
©2025 SQLDoubleG | Design: Newspaperly WordPress Theme