开发者

Error in attaching a database in SQL Server 2008

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

W开发者_如何学JAVAhen 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


Thoughts:

  • Can SQL Server see the F: drive?
  • It has permissions there?
  • This is a local drive? SQL Server does not support network drives for databases normally

Note: the SQL Server engine runs under a service account that requires permissions on the relevant folders


another way check you open management studio by user has permission

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜