Reputation: 6244
I detach a database file from a SQL Server 2000 and try to attach it in SQL Server 2008 By the following code:
USE [master]
GO
CREATE DATABASE [KARGAR] ON
( FILENAME = N'F:\1111\KARGAR_Data.MDF' ),
( FILENAME = N'F:\1111\KARGAR_Log.LDF' )
FOR ATTACH
GO
When I try to run above code, I see the following error:
Msg 5120, Level 16, State 101, Line 1 Unable to open the physical file "F:\1111\KARGAR_Data.MDF". Operating system error 5: "5(failed to retrieve text for this error. Reason: 15105)".
How can I fix this problem
Upvotes: 0
Views: 15000
Reputation: 76
another way check you open management studio by user has permission
Upvotes: 2
Reputation: 432261
Thoughts:
Note: the SQL Server engine runs under a service account that requires permissions on the relevant folders
Upvotes: 7