How to detach a sql server 2008 database that is not in database list?
Posted
by
Amir
on Server Fault
See other posts from Server Fault
or by Amir
Published on 2012-06-29T13:42:30Z
Indexed on
2012/06/29
15:17 UTC
Read the original article
Hit count: 405
windows-7
|sql-server-2008
I installed SQL Server 2008 on Windows 7. Then I created a database. After 2 days I reinstalled Windows and SQL Server.
Now I am trying to attach my database file, but I have encountered the error below.
I think that the files are like an attached file and I can't attach them. What is difference between an attached file and a non-attached file? How can I attach this file? Please Help Me.
Error Text: TITLE: Microsoft SQL Server Management Studio
Attach database failed for Server 'AMIR-PC'. (Microsoft.SqlServer.Smo)
------------------------------ ADDITIONAL INFORMATION:
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
Unable to open the physical file "F:\Company.mdf". Operating system error 5: "5(Access is denied.)". (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
© Server Fault or respective owner