Install NorthWind Pubs Database On Sql Server 2008

To Install Northwind Or Pubs Sample Database On Sql Server 2008 follow steps mentioned below

1. Download and install SQL2000SampleDb.msi from Microsoft Download center

It will be installed in "C:\SQL Server 2000 Sample Databases" folder.

Move Northwind and Pubs database files (MDF and LDF files) to your default database file location (C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data) from "C:\SQL Server 2000 Sample Databases" folder.

Open sql server management studio and log in,

Right click on database > Select Attach > and locate the northwind.mdf file you just copied.

Install Northwind Or Pubs Sample Database On Sql Server 2008






Click on OK.

Install using scripts 

Open SQL Server Management Studio. Go to File >> Open >> Navigate to “C:\SQL Server 2000 Sample Databases\instpubs.sql”.





Select execute and this will install pubs database.

If you like this post than join us or share

5 comments:

Anonymous said...

i am using sql express 2005 database, but i cant connect with c#.net(visual studio.net 2005) application. i use windows authentication to connect db. plzz tell me how to get connection string...thnks


Unknown said...

@Above:

Your connection string with windows authentication must be like one mentioned below

Data Source=YourSQLServerAddress;Initial Catalog=YourDataBaseName;Integrated Security=True


You can find SQL Server address from SQL Server Management studio login screen
In my case my connection string was

Data Source=AMITJAIN\SQL;Initial Catalog=Northwind;Integrated Security=True

Alternatively you can try putting and configuring SQLDataSource in ur asp.net page

Read ModalPopUp Extender in Asp.Net Gridview to know how to configure SqlDataSource


Anonymous said...

Hello,

thank you very much for your detailed tutorial. I followed up to the letter but I got an error when clicking the OK after having attached the northwind.mdf and ldf, it said that "it cannot update the database northwind because it is read only"


Unknown said...

@Above:Did you login to management studio with admin rights


Unknown said...

thank u for ur cooperation


Find More Articles