Server Database to LocalDB迁移错误

时间:2017-11-13 08:06:15

标签: c# sql-server

我决定将数据库文件复制到我的项目目录,并根据instruction用作LocalDB。

我已停止服务器并复制了mdf和ldf文件。

现在我试图在MS SQL Management Studio中附加数据库文件。得到错误:

An error occurred when attaching the database(s).  Click the hyperlink in the Message column for details.

超链接信息:

Unable to open the physical file "D:\C#nonsens\learncsharp\Data access\LearnCSharp.mdf". Operating system error 5: "5(Access is denied.)". (Microsoft SQL Server, Error: 5120)

enter image description here

如何查找错误并修复它? DB附加可能有什么问题?

0 个答案:

没有答案