http://blog.sina.com.cn/s/blog_6e8c9a130100q84k.html
附加数据库时报错
错误信息如下
An exception occurred while executing a Transact-SQL statement or batch.
详细信息
TITLE: Microsoft SQL Server Management Studio
------------------------------
Attach database failed for Server 'LZHANG136'. (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 "E:\study\silverlight\All SLFS10 Session\SLFS10 Session 3 (WCF RIA Services) - Code\WCFRIAServices_Firestarter\RIAServicesWithRepositor
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.50.1600&EvtSrc=MSSQLServer&EvtID=5120&LinkId=20476
------------------------------
BUTTONS:
OK
TITLE: Microsoft SQL Server Management Studio
------------------------------
Attach database failed for Server 'LZHANG136'. (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:\aspnetdb.mdf". Operating system error 5: "5(failed to retrieve text for this error. Reason: 15105)". (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
------------------------------
BUTTONS:
OK
解决方法:用Windows用户登录,不要用SQL用户登录
本文记录了在SQL Server中附加数据库时遇到的具体错误信息,并提供了相应的解决办法。主要错误为无法打开物理文件,操作系统错误5,以及执行Transact-SQL语句或批处理时发生异常。

260

被折叠的 条评论
为什么被折叠?



