尝试访问数据库时出错,SQL 2008 [英] Error when trying to attch datat base , SQL 2008

查看:119
本文介绍了尝试访问数据库时出错,SQL 2008的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,
我尝试附加数据库,然后执行所需的步骤,然后选择.mdf文件以及.ldf文件
但是sql抛出此异常

标题:Microsoft SQL Server Management Studio
------------------------------

服务器"Y3MN-PC"的附加数据库失败. (Microsoft.SqlServer.Smo)

要获取帮助,请单击:http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.50.1447.4+(((KJ_RTM).100213-0103+)&EvtSrc=Microsoft.SqlServer.Management .Smo.ExceptionTemplates.FailedOperationExceptionText& EvtID =附加+数据库+服务器&LinkId = 20476

------------------------------
其他信息:

执行Transact-SQL语句或批处理时发生异常. (Microsoft.SqlServer.ConnectionInfo)

------------------------------

无法打开物理文件"G:\ XX \ XX.mdf".操作系统错误5:"5(拒绝访问.)". (Microsoft SQL Server,错误:5120)

要获取帮助,请单击:http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.00.1600&EvtSrc=MSSQLServer&EvtID=5120&LinkId=20476

------------------------------
按钮:

OK
------------------------------


我该如何解决该错误...?

hello all ,
i am try to attach my data base i do the required steps and choose my .mdf file and also .ldf file
but sql throw this exception

TITLE: Microsoft SQL Server Management Studio
------------------------------

Attach database failed for Server ''Y3MN-PC''. (Microsoft.SqlServer.Smo)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.50.1447.4+((KJ_RTM).100213-0103+)&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Attach+database+Server&LinkId=20476

------------------------------
ADDITIONAL INFORMATION:

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

------------------------------

Unable to open the physical file "G:\XX\XX.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.00.1600&EvtSrc=MSSQLServer&EvtID=5120&LinkId=20476

------------------------------
BUTTONS:

OK
------------------------------


how can i solve that error ...?

推荐答案

我已经解决了这个错误,我只是关闭了Windows 7的用户帐户控制权限
i have solved this error i just Make my user account control of my windows 7 turned off


这篇关于尝试访问数据库时出错,SQL 2008的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆