[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

SQL Server 2008  R2 Adventureworks DB How to Install Manually

Posted on 2012-08-23
7
Medium Priority
?
911 Views
Last Modified: 2012-08-23
Heyas,

How do you attach the adventure database manually for sql server 2008 R2, I tried using the online tutorials on google but I can't find any tutorials that don't tell me to use the .msi installer which I can't find a download link to on the http://msftdbprodsamples.codeplex.com/releases  site

Any help would be much appreciated.

Thank you.
0
Comment
Question by:Zack
  • 4
  • 3
7 Comments
 
LVL 9

Expert Comment

by:Vijaya Reddy Pinnapa Reddy
ID: 38325010
1) Download the adventureworks database and copy the files to C:\Program Files( x86)\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA.
2)Open SQL Server Management Studio
3)Right click on Databases-->Select Attach
4)In the 'Attach Databases'  click on Add
5) Goto the C:\Program Files( x86)\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA.
and select the Adventureworks mdf file.
6)Right click on the databases -- click on refresh. Then the database will be there in the list
0
 

Author Comment

by:Zack
ID: 38325209
Hi elchuru,

Tried to attach got the following error message see below can you advise.

Thank you.
Capture.PNG
0
 
LVL 9

Expert Comment

by:Vijaya Reddy Pinnapa Reddy
ID: 38325309
Check this
http://www.idevelopment.info/data/SQLServer/DBA_tips/Installation/INSTALL_10.shtml
or
Please make sure that the SQL Server Service account has modify permissions over the physical file on the hard drive that you are trying to attach to a SQL Server instance, and modify permissions also over the folder that contains the file.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:Zack
ID: 38325508
Got a different error message now it's :

TITLE: Microsoft SQL Server Management Studio
------------------------------

Attach database failed for Server 'ISAAC'.  (Microsoft.SqlServer.Smo)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.50.1600.1+((KJ_RTM).100402-1539+)&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Attach+database+Server&LinkId=20476

------------------------------
ADDITIONAL INFORMATION:

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

------------------------------

Unable to open the physical file "C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\AdventureWorks2008R2_Log.ldf". Operating system error 2: "2(failed to retrieve text for this error. Reason: 15105)". (Microsoft SQL Server, Error: 5120)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.50.1600&EvtSrc=MSSQLServer&EvtID=5120&LinkId=20476

------------------------------
BUTTONS:

OK
------------------------------
 
Did check the folder has all permissions required. How do I check what the SQL Server Service account is I think I set it to NTAUTHORITY/SYSTEM when I did the install.

Thank you.
0
 
LVL 9

Accepted Solution

by:
Vijaya Reddy Pinnapa Reddy earned 2000 total points
ID: 38325527
Give me few minutes, I will post installation with screenshots
0
 

Author Comment

by:Zack
ID: 38327778
Heyas,

Worked out the issue myself, the solution was the logfile .ldf needed to be removed from initial database attachment and the recreated again.

Thank you.
0
 

Author Closing Comment

by:Zack
ID: 38327781
Thank you for your help.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Via a live example, show how to setup several different housekeeping processes for a SQL Server.
Suggested Courses

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question