• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 930
  • Last Modified:

SQL Server 2008 R2 Adventureworks DB How to Install Manually

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
Zack
Asked:
Zack
  • 4
  • 3
1 Solution
 
Vijaya Reddy Pinnapa ReddyCommented:
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
 
ZackGeneral IT Goto GuyAuthor Commented:
Hi elchuru,

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

Thank you.
Capture.PNG
0
 
Vijaya Reddy Pinnapa ReddyCommented:
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
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

 
ZackGeneral IT Goto GuyAuthor Commented:
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
 
Vijaya Reddy Pinnapa ReddyCommented:
Give me few minutes, I will post installation with screenshots
0
 
ZackGeneral IT Goto GuyAuthor Commented:
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
 
ZackGeneral IT Goto GuyAuthor Commented:
Thank you for your help.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now