mirror of
https://github.com/Microsoft/sql-server-samples.git
synced 2025-12-08 14:58:54 +00:00
AdventureWorks Readme
These instructions install AdventureWorks from the source scripts in this Git repo. The repo contains source files for the AdventureWorks databases for SQL Server 2008R2, 2012, and 2014.
For the complete set of downloads and install options, see these releases:
2014 install instructions
These versions of AdventureWorks install on SQL Server 2014 or later.
Determine path variables
Determine the path to your SQL Server installation folder. The instructions refer to this as {SQL Server Path}. These are the default paths:
- SQL Server 2014 64-bit: C:\Program Files\Microsoft SQL Server\120\
- SQL Server 2014 32-bit: C:\Program Files (x86)\Microsoft SQL Server\120\
Determine the path to the DATA folder for your SQL Server instance. The instructions refer to this as {DATA path}. These are the default paths:
- SQL Server 2014 64-bit: C:\Program Files\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\DATA
- SQL Server 2014 32-bit: C:\Program Files (x86)\Microsoft SQL Server\MSSQL12.MSSQLSERVER\MSSQL\DATA
Install AdventureWorks2014
This is the OLTP version.
- Create the folder {SQL Server Path}\Tools\Samples\AdventureWorks2014.
- Copy the files from the 2014-oltp git folder to {SQL Server Path}\Tools\Samples\AdventureWorks2014.
- Open SQL Server Management Studio (SSMS).
- In SSMS, open the file {SQL Server Path}\Tools\Samples\AdventureWorksDW2014\instawdb.sql.
- In the script, change the :setvar SqlSamplesDatabasePath variable to your {DATA path}.
- In the script, change the :setvar SqlSamplesSourceDataPath variable to {SQL Server Path}\Tools\Samples\AdventureWorksDW2014.
- On the Query menu, click SQLCMD Mode.
- On the Standard toolbar, click the Execute button to run the script.
Install AdventureWorksDW2014
This is the data warehouse version.
- Create the folder {SQL Server Path}\Tools\Samples\AdventureWorksDW2014.
- Copy the files from the 2014-dw git folder to {SQL Server Path}\Tools\Samples\AdventureWorksDW2014.
- Open SQL Server Management Studio (SSMS).
- In SSMS, open the file {SQL Server Path}\Tools\Samples\AdventureWorksDW2014\instawdbdw.sql.
- In the script, change the :setvar SqlSamplesDatabasePath variable to your {DATA path}.
- In the script, change the :setvar SqlSamplesSourceDataPath variable to {SQL Server Path}\Tools\Samples\AdventureWorksDW2014.
- On the Query menu, click SQLCMD Mode.
- On the Standard toolbar, click the Execute button to run the script.