服务器'USER-PC\SQLEXPRESS'恢复失败 [英] Restore failed for Server 'USER-PC\SQLEXPRESS'

查看:89
本文介绍了服务器'USER-PC\SQLEXPRESS'恢复失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,



我的备份文件在 C:\DatabaseBackup\ABC.bak ,I我正在从这个备份文件恢复数据库。它只在 windows 7 中显示错误。



我有一个数据库的Windows服务恢复,但它没有成功运行,它显示错误。



如何解决这个问题?

请急需帮我。



Hello,

My backup file in C:\DatabaseBackup\ABC.bak, I am restoring database from this backup file.It''s showing the error only in windows 7.

I have a windows service for database restore but it''s not running successfully, it''s showing the error.

How will be solved this problem?
Please help me urgently.

Start Service
Error: Microsoft.SqlServer.Management.Smo.FailedOperationException: Restore failed for Server 'USER-PC\SQLEXPRESS'.  ---> Microsoft.SqlServer.Management.Common.ExecutionFailureException: An exception occurred while executing a Transact-SQL statement or batch. ---> System.Data.SqlClient.SqlException: User does not have permission to RESTORE database 'ABC'.
RESTORE DATABASE is terminating abnormally.
   at Microsoft.SqlServer.Management.Common.ConnectionManager.ExecuteTSql(ExecuteTSqlAction action, Object execObject, DataSet fillDataSet, Boolean catchException)
   at Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteNonQuery(String sqlCommand, ExecutionTypes executionType)
   --- End of inner exception stack trace ---
   at Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteNonQuery(String sqlCommand, ExecutionTypes executionType)
   at Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteNonQuery(StringCollection sqlCommands, ExecutionTypes executionType)
   at Microsoft.SqlServer.Management.Smo.ExecutionManager.ExecuteNonQuery(StringCollection queries)
   at Microsoft.SqlServer.Management.Smo.BackupRestoreBase.ExecuteSql(Server server, StringCollection queries)
   at Microsoft.SqlServer.Management.Smo.Restore.SqlRestore(Server srv)
   --- End of inner exception stack trace ---
   at Microsoft.SqlServer.Management.Smo.Restore.SqlRestore(Server srv)
   at DownloadDatabaseService.DBRestore.RestoreDatabase(String backupFile)
   at DownloadDatabaseService.DBRestore.OnElapsedTime(Object source, ElapsedEventArgs e)





请紧急帮我。



谢谢。

Ankit Agarwal

软件工程师



Please help me urgently.

Thank You.
Ankit Agarwal
Software Engineer

推荐答案

从您提供的错误消息中可以看出运行该服务的用户凭据没有恢复权限的权限。

因此请确保此用户具有足够的权限来恢复您要连接的SQLServer实例上的数据库。
From the error message you have given it shows the user credentials under which the service is running does not have the permission to restore the permission.
So please ensure that this user has the sufficient privileges to restore a database on the SQLServer instance that you are connecting to.


这篇关于服务器'USER-PC\SQLEXPRESS'恢复失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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