简体   繁体   English

备份数据库时出错

[英]Error in backing up database

I want to backup a database from our main server. 我想从我们的主服务器上备份数据库。 But this error happens 但是这个错误发生了

System.Data.SqlClient.SqlException (0x80131904): Cannot open backup device 'C:\\Temp\\sample.bak'. System.Data.SqlClient.SqlException(0x80131904):无法打开备份设备'C:\\ Temp \\ sample.bak'。 Operating system error 3 (The system cannot find the path specified.). 操作系统错误3(系统找不到指定的路径。)。
BACKUP DATABASE is terminating abnormally. BACKUP DATABASE异常终止。
at Microsoft.SqlServer.Management.Common.ConnectionManager.ExecuteTSql(ExecuteTSqlAction action, Object execObject, DataSet fillDataSet, Boolean catchException) 在Microsoft.SqlServer.Management.Common.ConnectionManager.ExecuteTSql(ExecuteTSqlAction操作,对象execObject,数据集fillDataSet,布尔值catchException)
at Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteNonQuery(String sqlCommand, ExecutionTypes executionType) 在Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteNonQuery(String sqlCommand,ExecutionTypes执行类型)
ClientConnectionId:d9c1c173-e60e-4e07-91d6-2ba43b905ff6 ClientConnectionId:d9c1c173-e60e-4e07-91d6-2ba43b905ff6

Thank you for your help! 谢谢您的帮助!

The query I tried is 我试过的查询是

BACKUP DATABASE H2RPDB_v2 
TO DISK = 'C:\Temp\test2.bak'

in SQL Server. 在SQL Server中。 H2RPDB_v2 is from my remote server. H2RPDB_v2来自我的远程服务器。

The error indicates that the path doesn't exist. 该错误表明该路径不存在。 Does C:\\Temp exist? C:\\ Temp是否存在? If so, does the service account have access to the folder? 如果是这样,服务帐户是否有权访问该文件夹?

Other things might be storage is full, etc. 其他可能是存储空间已满,等等。

See related question: SQL server 2008 backup error - Operating system error 5(failed to retrieve text for this error. Reason: 15105) 请参阅相关问题: SQL Server 2008备份错误-操作系统错误5(未能为此错误检索文本。原因:15105)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM