How do I create Northwind and Pubs sample databases in my Microsoft SQL Server 2005 or 2008

Microsoft provides some sample database like Northwind, Pubs etc.., along with Microsoft SQL Server 2008. These databases are very useful for learning purpose. It gives grate knowledge to beginners. It helps in learning standards while creating tables, function, strode produces etc..,. It happen while installing Microsoft SQL Server 2008 we forget or miss to add these sample databases. So today I'll demonstrate How do I create Northwind and Pubs sample databases in my Microsoft SQL Server.

You can download Northwind and Pubs database by clicking this link..!

Let's begin, before that let me tell you that are many way to add or install Northwind or Pubs database to your Microsoft SQL Server 2008. Let me start with the easiest one first,

First Method:

Step 1: Login to your Microsoft SQL Server.
Step 2: Open the instnwnd.sql or instnwnd file in Microsoft SQL Server by double clicking it. You can find instnwnd file in unzip folder you just downloaded.
Step 3: Press F5 or Execute button in Menu.
Step 4: Refresh your Database folder in side the Object Explore window to your left.

That's it. Pretty easy ha!!! Let's try the other method.

Second Method:

Step 1: Unzip the downloaded file and Copy NORTHWND.MDF and NORTHWND.LOG file to C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\
Step 2: Login to your Microsoft SQL Server 2008.
Step 3: Right click on Database folder present in Object Explore Window and select Attach
Step 4: Attach Databases window pops-up and then click Add button to select the NORTHWND.MDF file.
Step 5: You can find the NORTHWND.MDF in side the C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\ folder. After selecting click OK twice.
Step 6: Refresh your Database folder in side the Object Explore window to your left and you

0 comments:

Post a Comment

 

About Me

It's Me!Hi, I'm Moinuddin. I'm a Software Engineer at WIPRO working on Microsoft .NET Technology. I'm interested in a wide range of technology topics, mainly Microsoft including Windows Azure, WCF, WPF, Silverlight and any other cool technology that catches the eye.

Site Info

ProjectCSharp.com is mainly about demonstrating real time examples in different technologies like ASP.NET, WCF, WPF, Silverlight, Azure etc..,

Followers

Help Links

Project CSharp (C#) Copyright © 2011. All Rights Reserved.