Question : Installing sample databases on Sql Server 2008

Greetings all

I am busy workign my way through the MCTS EXam 70-433 self-paced study guide.

I followed the instructions for attaching the sample databases, but ran into issues. Solved the AdventureWorks and AdventureWorksDW with the attached code. I tried a similiar approach with NorthWInd (see Code below) and got this:

 "Msg 5120, Level 16, State 101, Line 1
Unable to open the physical file "C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\NorthWind.mdf". Operating system error 2: "2(failed to retrieve text for this error. Reason: 15105)".


Any suggestions?


In advance, thanks!!!

    ALLANMARK
Code Snippet:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
CODE FOR AdventureWorks (Note: this had a filestream document)
USE [master]
GO
CREATE DATABASE [AdventureWorks2008] ON
( FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\AdventureWorks2008_Data.mdf' ),
( FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\AdventureWorks2008_Log.ldf' ),
 FILEGROUP Documents CONTAINS FILESTREAM (NAME = Documents, FILENAME=N'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\Documents')
 FOR ATTACH
GO 
 
CODE FOR ADVENTUREWORKSDW:
 
USE [master]
GO
CREATE DATABASE [AdventureWorks2008dw] ON
( FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\AdventureWorksDW2008_Data.mdf' ),
( FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\AdventureWorksDW2008_Log.ldf' )
 FOR ATTACH
GO 
 
CODE FOR NORTHWIND:
 
USE [master]
GO
CREATE DATABASE [NorthWind] ON
( FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\NorthWind.mdf' ),
( FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL10.MSSQLSERVER\MSSQL\DATA\NorthWind.ldf' )
 FOR ATTACH
GO

Answer : Installing sample databases on Sql Server 2008

Seems the .mdf file is not valid. Kindly download the sample databases for northwind again from the following link:

http://www.microsoft.com/downloads/details.aspx?familyid=06616212-0356-46a0-8da2-eebc53a68034&displaylang=en

Once you download it try attaching them. If it doesnt work try other methods from the below link:

http://blog.sqlauthority.com/2007/06/15/sql-server-2005-northwind-database-or-adventureworks-database-samples-databases-part-2/

Pls revert in case of any clarifications.
Random Solutions  
 
programming4us programming4us