无法恢复从另一台PC获取的.bak文件 [英] Not able to restore a .bak file taken from another pc

查看:87
本文介绍了无法恢复从另一台PC获取的.bak文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将一个数据库的备份.bak文件放在一台pc

中,使用sql命令备份数据库mydb使用C#来消息'mydb.bak'

备份成功,但当我在另一台机器上恢复时,它不会恢复崩溃,如果我尝试通过sql管理工作室无法恢复



如果它是在我的电脑上备份并在我的电脑上恢复它恢复



我尝试过:



i将一个数据库的备份.bak文件放在一个pc中

用sql命令 BACKUP DATABASE mydb TO DISK'mydb.bak'使用C#

备份成功,但当我在另一台机器上恢复时,它不会恢复它崩溃,如果我尝试通过sql管理工作室无法恢复

i took backup .bak file of a database in one pc
with sql command BACKUP DATABASE mydb TO DISK 'mydb.bak' using C#
backup is successfully taken but when i restore it in another machine it is not restoring it crashes and also if i try via the sql management studio not able to restore

if it is Taken backup on my pc and restore it on my pc it is restoring

What I have tried:

i took backup .bak file of a database in one pc
with sql command BACKUP DATABASE mydb TO DISK 'mydb.bak' using C#
backup is successfully taken but when i restore it in another machine it is not restoring it crashes and also if i try via the sql management studio not able to restore

推荐答案

引用:

无法恢复访问被拒绝



错误消息很漂亮显式:系统拒绝访问文件或文件夹。



这可能意味着两件事之一:备份文件无法访问或目的地。 br />


最有可能是备份文件本身。

SQL不作为您的登录用户运行:它拥有自己的用户身份作为一部分SqlAgent。因此,如果.BAK文件位于对所有用户都没有足够权限的文件夹中,则SQL无法访问备份文件,并且您会收到访问冲突错误。检查文件夹权限,然后检查文件权限。有可能修复它们可以解决问题。


The error message is pretty explicit: Access is denied by the system to the file or folder.

That could mean one of two things: either the backup file is inaccessible, or the destination.

The most likely is the backup file itself.
SQL does not run as your login user: it has it's own user identity as part of the SqlAgent. So if the .BAK file is located in a folder that does not have sufficient permissions for all users, SQL can't access the backup file and you get an access violation error. Check the folder permissions, and then check the file permissions. Chances are that fixing them will cure the problem.


这篇关于无法恢复从另一台PC获取的.bak文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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