SQL SERVER – 2005 NorthWind Database or AdventureWorks Database – Samples Databases – Part 2

I have mentioned the history of NorthWind, Pubs and AdventureWorks in my previous post SQL SERVER – 2005 NorthWind Database or AdventureWorks Database – Samples Databases. I have been receiving very frequent request for NorthWind Database for SQL Server 2005 and installation method.

Follow the steps carefully and it will install Northwind and Pubs database in SQL Server without any issue. I have tested all the three methods on my home computer and attached the screen shots as well.

Common Step for all the 3 methods

First, go to Microsoft Download Center and download SQL2000SampleDb.msi.
Run SQL2000SampleDb.msi it will create “C:\SQL Server 2000 Sample Databases” folder.
Now follow any of the following three methods to install this database. I have listed methods in order of my preference.

Method 1: Running SQLCMD
Navigate to this folder using command prompt. Start >> Run >> C:\SQL Server 2000 Sample Databases.
If you have installed SQL Server as named instance run following command.

c:\>sqlcmd -S .\InstanceName -i instpubs.sql
c:\>sqlcmd -S .\InstanceName -i instnwnd.sql

SQL SERVER - 2005 NorthWind Database or AdventureWorks Database - Samples Databases - Part 2 sqlservernw1

If you have installed SQL Server as default instance run following command.

c:\>sqlcmd -i instpubs.sql
c:\>sqlcmd -i instnwnd.sql

SQL SERVER - 2005 NorthWind Database or AdventureWorks Database - Samples Databases - Part 2 sqlservernw2

Verify that NorthWind and Pubs database are installed correctly.
Method 2: Running SQL Script
Open SQL Server Management Studio. Go to File >> Open >> Navigate to “C:\SQL Server 2000 Sample Databases\instpubs.sql” and “C:\SQL Server 2000 Sample Databases\instnwnd.sql” and run those SQL files in order. This will install the database.

SQL SERVER - 2005 NorthWind Database or AdventureWorks Database - Samples Databases - Part 2 sqlservernw3

Method3: Attaching the Database
Move Northwind and Pubs database files (MDF and LDF files) to your default database file location (usually – C:\Program Files\Microsoft SQL Server\MSSQL\Data).
Open SQL Server Management Studio. Expand the database node >> Right click on Databases >> Click on Attach >> Select NorthWind Database. It will automatically find MDF and LDF file. Click OK.

SQL SERVER - 2005 NorthWind Database or AdventureWorks Database - Samples Databases - Part 2 sqlservernw4

Repeat the process for Pubs and verify that databases are installed correctly.

Reference: Pinal Dave (https://blog.sqlauthority.com), Read-Me file in the installation folder, BOL

SQL Download, SQL Sample Database, SQL Scripts, SQL Server
Previous Post
SQL SERVER – Easy Sequence of SELECT FROM JOIN WHERE GROUP BY HAVING ORDER BY
Next Post
SQL SERVER – sp_HelpText for sp_HelpText – Puzzle

Related Posts

191 Comments. Leave new

  • thanks for what u do

    Reply
  • hello,

    will this work in SQL server 2005 express edition?
    thanks!

    Reply
  • is this applicable in the express edition? i wanted to use the northwind in my sql2005expressed.. thanks

    Reply
  • Thank you. Your example also works for SQL 2k8. Many thanks for your wonderful post.

    Reply
  • harinath clavib
    November 6, 2008 12:46 pm

    Hi Dave,
    can you explain how to configure Adveture works databasae in sql 2005.

    and i need some help to extract full text from a column using prefix i tried but when i give 2 or 3 char for a word it shows blank why?

    do explain

    Thank you

    Reply
  • Hi David, after hours looking and trying diferent things I finally found this site, I it took me 2 minutes to install pubs and nwnd, THANKS.
    Santi

    Reply
  • thanks,

    Reply
  • Hello,
    I m doing attach mdf file of sqlserver2000 to sqlserver2005 database but while attaching file, it is showing some error like..
    mdf file is read only. you cant do this.
    I also make file non read only but still it is showing the same.
    Can you tell me the solution ??

    Reply
  • Hi,

    thankq very much for the instructions..easily installed northwind and pubs

    Reply
  • hi deep,

    Even i got the same problem…then i followed the method 2… with in 2 mins i installed the databases….

    Reply
  • Thank you very much for the helpful tip on installation of the sample databases.

    Reply
  • hi
    after connecting the sql srever2005 management studio express with windows authentication, i am try to attach northwind database i got this errors

    TITLE: Microsoft SQL Server Management Studio Express
    ——————————

    An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.Express.ConnectionInfo)

    ——————————
    ADDITIONAL INFORMATION:

    Could not load the DLL xpstar90.dll, or one of the DLLs it references. Reason: 126(The specified module could not be found.).
    Could not load the DLL xpstar90.dll, or one of the DLLs it references. Reason: 126(The specified module could not be found.).
    Could not load the DLL xpstar90.dll, or one of the DLLs it references. Reason: 126(The specified module could not be found.).
    Could not load the DLL xpstar90.dll, or one of the DLLs it references. Reason: 126(The specified module could not be found.).
    Could not load the DLL xpstar90.dll, or one of the DLLs it references. Reason: 126(The specified module could not be found.).
    Could not load the DLL xpstar90.dll, or one of the DLLs it references. Reason: 126(The specified module could not be found.).
    Could not load the DLL xpstar90.dll, or one of the DLLs it references. Reason: 126(The specified module could not be found.).
    Could not load the DLL xpstar90.dll, or one of the DLLs it references. Reason: 126(The specified module could not be found.).
    Could not load the DLL xpstar90.dll, or one of the DLLs it references. Reason: 126(The specified module could not be found.). (Microsoft SQL Server, Error: 17750)

    For help, click:

    ——————————
    BUTTONS:

    OK
    ——————————

    pls help me

    Reply
  • Thanks Pinal

    Reply
  • Thanks for help.

    Reply
  • Wow,easy way to install both Northwind and Pubs Databases for SQL Server 2005…Thanks a lot

    Reply
  • For a fresher like me…this is a very very helpfull information
    Thank’s a lot

    Reply
  • It is very useful for a newbie. Thank you.

    Reply
  • Thanks a lot! Very usefull to me.

    Reply
  • Thanks a lot . it was really helpful

    Reply
  • I wish I had comea across this page a lot earlier. Its clear and concise. Thank you

    Reply

Leave a Reply