This project is read-only.

Error while attaching database


I am getting following error while attaching the database in management studio.


TITLE: Microsoft SQL Server Management Studio Express

Failed to retrieve data for this request. (Microsoft.SqlServer.Express.SmoEnum)
For help, click:


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


CREATE FILE encountered operating system error 5(Access is denied.) while attempting to open or create the physical file 'C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Data\AdventureWorks_Data.mdf'. (Microsoft SQL Server, Error: 5123)


There is no connection for me. I am logged in as administrator and have all rights.
Does anyone have some idea about it?


antonsea wrote Mar 13, 2009 at 4:16 AM

It happened exactly the same with me.
Only that I'm using Microsoft SQL Server Management Studio (not the Express version).

wrote Feb 22, 2013 at 3:06 AM