THE SQL Server Blog Spot on the Web

Welcome to SQLblog.com - The SQL Server blog spot on the web Sign in | |
in Search

John Paul Cook

AdventureWorks2014 installation script

The AdventureWorks2014 sample database is downloadable from here. If you choose to run the script and are unfamiliar with sqlcmd, this post shows you what to do. Be sure to extract the zip file’s contents to a new folder because the instawdb.sql comes with 72 csv files that contain the actual data. If you specify a folder other than the default, you’ll have to change a path in the instawdb.sql script to point to your directory.

image

Figure 1. instawdb.sql script file in SSMS. Notice the 3 lines that begin with a colon.

It’s always prudent to read comments and examine script files before executing them. Notice that you are instructed to change the paths if your actual locations are different from what is in the script. Also notice that FULL TEXT SEARCH should be enabled. The most important instruction in the comments is that the script must be run in SQLCMD Mode, which is available in SSMS but not enabled by default.

image

Figure 2. Enable SQLCMD Mode from the Query menu.

Once SQLCMD is enabled, the SQLCMD statements are highlighted.

image

Figure 3. SQLCMD enabled and SQLCMD statements highlighted.

It took about a minute and a half for the script to execute on my machine, so be patient. You might want to turn off SQLCMD after you’re done installing AdventureWorks2014 to restore SSMS to the state you’re more familiar with.

Published Sunday, August 10, 2014 10:42 PM by John Paul Cook

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

No Comments

Leave a Comment

(required) 
(required) 
Submit

About John Paul Cook

John Paul Cook is a Technology Solutions Professional for Microsoft's data platform and works out of Microsoft's Houston office. Prior to joining Microsoft, he was a Microsoft SQL Server MVP. He is experienced in Microsoft SQL Server and Oracle database application design, development, and implementation. He has spoken at many conferences including Microsoft TechEd and the SQL PASS Summit. He has worked in oil and gas, financial, manufacturing, and healthcare industries. John is also a Registered Nurse who graduated from Vanderbilt University with a Master of Science in Nursing Informatics and is an active member of the Sigma Theta Tau nursing honor society. He volunteers as a nurse at safety net clinics. Contributing author to SQL Server MVP Deep Dives and SQL Server MVP Deep Dives Volume 2.

This Blog

Syndication

Powered by Community Server (Commercial Edition), by Telligent Systems
  Privacy Statement