SQL Server还原错误-拒绝访问 [英] SQL Server Restore Error - Access is Denied

查看:350
本文介绍了SQL Server还原错误-拒绝访问的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在本地计算机上创建了一个数据库,然后执行了表DataLabTables的名为tables.bak的备份.

I created a database on my local machine and then did a backup called tables.bak of table DataLabTables.

我将该备份移到了没有该表的远程计算机上,并试图进行还原,但是出现以下错误:

I moved that backup to a remote machine without that table and tried to do a restore but get the following error:

System.Data.SqlClient.SqlError:操作系统返回了 尝试时出现错误"5(访问被拒绝.)" 'c:\ Program上的'RestoreContainer :: ValidateTargetForCreation' Files \ Microsoft SQL Server \ MSSQL.1 \ MSSQL \ DataLabTables.mdf'.

System.Data.SqlClient.SqlError: The operating system returned the error '5(Access is denied.)' while attempting 'RestoreContainer::ValidateTargetForCreation' on 'c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DataLabTables.mdf'.

如果这是问题所在,我该如何解决我的权利?

How do I fix my rights, if that is the problem?

推荐答案

我刚在SQL Server 2012中遇到此问题.

I have just had this issue with SQL Server 2012.

事实证明,我要做的就是勾选文件"部分中标记为将所有文件重定位到文件夹"的框:

It turns out all I had to do was tick the box marked 'Relocate all files to folder' on the 'Files' section:

(单击以查看完整尺寸的图像)

(Click to see image full size)

这当然是假定您安装了正确版本的SQL Server.

This of course assumes you have the correct version of SQL Server installed.

这篇关于SQL Server还原错误-拒绝访问的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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