尝试附加数据库时,在 Windows 7 上安装的 SQL Server 2005 开发版中接收权限错误
我正在尝试将 SQL Server 2005 数据库附加到 Windows 7 Professional 上安装的 SQL Server 2005 Developer Edition(带 SP3)实例。我收到权限错误。
<代码> 消息 5120,16 级,状态 101,第 1 行 无法打开物理文件“D:\FolderName\DatabaseName.mdf”。操作系统错误 5:“5(访问被拒绝。)”。
我还尝试将此数据库附加到同一台计算机上的 SQL Server 2008 Developer Edition 实例,并获得相同的结果。
有人对如何解决这个问题有任何想法吗?
I am trying to attach a SQL Server 2005 database to an instance of SQL Server 2005 Developer Edition (w/ SP3) installed on Windows 7 Professional. I am getting a permissions error.
Msg 5120, Level 16, State 101, Line 1
Unable to open the physical file "D:\FolderName\DatabaseName.mdf". Operating system error 5: "5(Access is denied.)".
I have also tried attaching this database to a SQL Server 2008 Developer Edition instance on the same machine with the same results.
Does anyone have any ideas on how to fix this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要授予对该文件的读取权限,我确定该数据库位于另一个Windows中,因此您需要授予它读取和写入的权限。我尝试取消选中 ReadOnly 属性,这对我有用。
you need to give read access to the file, i sure that database was in another Windows, so you need to give it permissions to read and write. I have attempted un-checking the ReadOnly attribute and that works for me.