AdventureWorks2008R2 not getting installed


Dear All

I am trying to attach AdventureWorks2008R2_Data on my MS SQL 2008R2 Server, but it gaves me an error :

_____TITLE: Microsoft SQL Server Management Studio

Attach database failed for Server 'SERVERNAME'. (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


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

Unable to open the physical file "E:\username\MS SQL SERVER 2008 R2\AdventureWorks2008R2_Data.mdf". Operating system error 5: "5(Access is denied.)". (Microsoft SQL Server, Error: 5120)

Anyone can please email me a text file containing SQL Script for this particular AdventureWorks DB?
razasyedcse@hotmail.com, waiting... (as many others, same issue with many people here)

file attachments


razasyedcse wrote Sep 18, 2013 at 8:27 AM


Right Click on the DB file
Check for rights of the user from which u r logged in
Give full rights
Click ok
Try Attaching DB again

this solve my problem.

wrote Nov 3, 2013 at 9:27 AM

wrote Apr 18, 2014 at 5:48 AM

Esther106 wrote Apr 26, 2014 at 1:17 AM

Attach the .mdf file again but remove the log file with status NOT FOUND if there