附加数据库时权限错误:“无法访问指定路径"

我正在运行 SQL Server 2012 企业版.我已经下载了 AdventureWorks 2012 OLTP 数据文件(.mdf.ldf).我将它们保存到我在 My Documents 中创建的 AW 文件夹中,我在其中解压缩了文件.我转到 SQL Server Management Studio (SSMS) 右键单击​​数据库,然后单击上下文菜单中的附加.在对话框中,我单击查找.

I am running SQL Server 2012 Enterprise Edition. I have downloaded the AdventureWorks 2012 OLTP data files (both .mdf and .ldf). I saved them to the AW folder that I created in My Documents where I unzipped the file. I go to SQL Server Management Studio (SSMS) right-click on database, and click attach in the context menu. In the dialog I click find.

用户界面不允许我导航到文件夹.我尝试输入文件的完整路径,然后出现以下错误:

The UI does not allow me to navigate to folder. I try typing the full path to the file, and then I get the following error:

无法访问服务器上的指定路径或文件.验证您是否具有必要的安全权限以及路径或文件是否存在.

我关闭了 SSMS 并重新启动了它,这次以管理员身份运行.同样糟糕的结果.

I closed SSMS and restarted it, this time running as the administrator. Same bad result.

这应该不难.将 AdventureWorks2012 数据库成功附加到 SSMS 的确切步骤是什么?

This should not be this hard. What are the exact steps to successfully attach the AdventureWorks2012 database to SSMS?

谢谢!

推荐答案

将文件置于数据库引擎数据文件的默认位置.如果你没有重新配置任何东西,它应该是

Put your files to default location for Database Engine data files. If you didn't reconfigure anything it should be

Program FilesMicrosoft SQL ServerMSSQL11.<InstanceID>MSSQLData

然后使用 SSMS 附加数据库.

And then Attach db using SSMS.

相关文章