Click here to Skip to main content
15,889,527 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Unable to open the physical file "filename.mdf". Operating system error 5: "5(Access is denied.)".
An attempt to attach an auto-named database for file C:\lantrial\App_Data\hitcount.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share

What is this error why i am getting tis error and how to resolve this please somebody tell me its very urgent .
Posted
Comments
saguptamca 17-Jun-13 4:41am    
close the file, if already open(chk shared locations also).
chk if its locked by any way.

1 solution

Put your filename.mdf into follow location and try again:

C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA

If you get any othere issue..let me know.?
I haved faced same issue. I will give you another way.


Thanks
Prince Sharma
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900