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
If you have installed SQL Server as default instance run following command.
c:\>sqlcmd -i instpubs.sql
c:\>sqlcmd -i instnwnd.sql
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.
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.
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
191 Comments. Leave new
thanks for what u do
hello,
will this work in SQL server 2005 express edition?
thanks!
is this applicable in the express edition? i wanted to use the northwind in my sql2005expressed.. thanks
Thank you. Your example also works for SQL 2k8. Many thanks for your wonderful post.
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
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
thanks,
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 ??
Hi,
thankq very much for the instructions..easily installed northwind and pubs
hi deep,
Even i got the same problem…then i followed the method 2… with in 2 mins i installed the databases….
Thank you very much for the helpful tip on installation of the sample databases.
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
do you had solving this err?.. I have a same problem.
Thanks Pinal
Thanks for help.
Wow,easy way to install both Northwind and Pubs Databases for SQL Server 2005…Thanks a lot
For a fresher like me…this is a very very helpfull information
Thank’s a lot
It is very useful for a newbie. Thank you.
Thanks a lot! Very usefull to me.
Thanks a lot . it was really helpful
I wish I had comea across this page a lot earlier. Its clear and concise. Thank you