Welcome to MSDN Blogs Sign in | Join | Help

Installing Northwind on SqlExpress

When performing a default install of Visual Studio 2005 an instance of Sql Server Express edition is installed. Unfortunately there are no sample databases included with Sql Express. (http://lab.msdn.microsoft.com/express/sql/)

I've had more than a few people ask how to get the Northwind sample database loaded into Sql Express so here are some step-by-step directions for getting Northwind up and running so you can start trying out all the great new data features in VS.

1) Navigate to the following URL and lick the Download button - http://www.microsoft.com/downloads/details.aspx?familyid=06616212-0356-46a0-8da2-eebc53a68034&displaylang=en

2) Complete the download and install process. This places the necessary files for Northwind (and Pubs) into the "c:\Sql Server 2000 Sample Databases" folder.

3) Open a command window. (Go to Start, Run, type Command and click OK)

4) Change the directory to the sample databases (type:  cd c:\SQL Server Sample Databases)

5) Type or paste the following into the command window replacing computerName with the actual name of your computer:

   osql -E -S computerName/SqlExpress -i instnwnd.sql

6) now go to VS and create a data connection using the computerName\sqlexpress as the Server name in the Add Connection dialog. The Northwind database should now be available.

 

-Steve Stein

 

 

 

 

Published Wednesday, November 02, 2005 5:23 PM by SmartClientData

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

# re: Installing Northwind on SqlExpress

Wednesday, November 02, 2005 1:14 PM by euanga
You should really be using SQLCMD not osql.

# re: Installing Northwind on SqlExpress

Wednesday, November 02, 2005 6:09 PM by Bill Burrows [MVP]
Hi Steve,

Thanks for the information. May I suggest that this information be placed somewhere fairly obvious on the SQL Express home site. My guess is many people downloading SQL Express will want a database to play with.

bill

# re: Installing Northwind on SqlExpress

Thursday, November 03, 2005 7:21 PM by Rob Windsor

You use the wrong slash in step 5:

computerName/SqlExpress should be computerName\SqlExpress

# re: Installing Northwind on SqlExpress

Tuesday, November 22, 2005 8:31 PM by Ka
osql -E -S computerName/SqlExpress -i instnwnd.sql

should be

osql -E -S computerName\SqlExpress -i instnwnd.sql

# re: Installing Northwind on SqlExpress

Wednesday, January 11, 2006 7:08 AM by enoreth
thanks i installed successfully the northwind
but the problem is it was installed under the databasename "master". Any suggestions?

# re: Installing Northwind on SqlExpress -> Thank you!

Tuesday, January 17, 2006 1:15 AM by Trevor Carnahan
I appreciate you putting this up. It was the first hit in my "how install northwind sqlexpress" google search, and it was exactly what I was looking for. Thanks again.

# re: Installing Northwind on SqlExpress

Sunday, January 22, 2006 11:40 AM by Thang
Using SQL Server Management Studio, you can use the Attach... function.

In the SQL Mgt Studio:
- Right click on Databases node, select Attach ... - a Attach DBs dialog popups.
- Click on the Add button on the dialog
- Navigate to the location where you extract the database (northwind or pubs) and select the *.MDF file ( you can add more than one DB)
- Click OK to complete it.

You should see the new DB in the list under Databases node.

# re: Installing Northwind on SqlExpress

Friday, January 27, 2006 1:20 AM by Edgardo
Excellent!

Thanks

# re: Installing Northwind on SqlExpress

Wednesday, March 01, 2006 9:04 AM by dave
step 1 says to lick the download button:) but everything else works, thanks

# re: Installing Northwind on SqlExpress

Tuesday, March 21, 2006 6:22 AM by DeveloperDan
Everything else works?  Nothing works for me after I lick the download button.  I hate computers!

# re: Installing Northwind on SqlExpress

Friday, May 19, 2006 6:56 PM by LFN
Simply thank you.

# re: Installing Northwind on SqlExpress

Wednesday, May 24, 2006 3:52 AM by Mick
Thanks for the post very useful, now get my express up and running

# re: Installing Northwind on SqlExpress

Wednesday, August 09, 2006 10:54 PM by Yogesh Ramakrishnan - Proapp Systems
Thanks a lot, this saved a lot of my time. I had a an important demo with one of my clients. Thanks again.

# re: Installing Northwind on SqlExpress

Thursday, August 17, 2006 5:21 AM by DB
osql didn't work here, but
sqlcmd -E -S computerName\SqlExpress -i instnwnd.sql
did the job.

# re: Installing Northwind on SqlExpress

Tuesday, August 29, 2006 8:25 AM by William M. Rawls
Maybe this is just too obvious, but why not just provide the SQL Express version of the Northwind file directly intead ?

# Installing Northwind on SqlExpress2005

Tuesday, September 12, 2006 12:53 PM by Katsan Love .Net Blog!

# Northwidn Sample Data for SQLExpress

Tuesday, December 12, 2006 4:35 AM by TangibleThoughts

Heres a post by Steve Stein that gives you a 5 step instruction guide to install Northwind db on SQLExpress....

# re: Installing Northwind on SqlExpress

Thursday, July 05, 2007 10:54 AM by NewSQLProgrammer

Excellent Steve!!!!!!!

Thanks

# re: Installing Northwind on SqlExpress

Friday, August 03, 2007 4:36 PM by bill

need it for the sql server 2005

# sshlog » Blog Archive » [SQL] SQLExpress 2005 ?????? ???????????????

# Funky » the new dooz

Tuesday, February 24, 2009 1:12 PM by Funky » the new dooz

# Smart Client Data Installing Northwind on SqlExpress | Toe Nail Fungus

# Smart Client Data Installing Northwind on SqlExpress | bar stools

Leave a Comment

(required) 
required 
(required) 
 
Page view tracker