我正在尝试使用 TFS Power Tools 创建备份计划,但我一直遇到此错误消息:
我已检查该帐户是否对共享具有完全控制权,我可以在那里编辑、创建和删除文件。从日志中:
[Info @07:15:00.403] Starting creating backup test validation
[Error @07:15:00.700] Microsoft.SqlServer.Management.Smo.FailedOperationException: Backup failed for Server 'WMSI003714N\SqlExpress'. ---> Microsoft.SqlServer.Management.Common.ExecutionFailureException: An exception occurred while executing a Transact-SQL statement or batch. ---> System.Data.SqlClient.SqlException: Cannot open backup device '\\wmsi003714n\sql dump\Tfs_Configuration_20100910091500.bak'. Operating system error 5(failed to retrieve text for this error. Reason: 1815).
BACKUP 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.Backup.SqlBackup(Server srv)
--- End of inner exception stack trace ---
at Microsoft.SqlServer.Management.Smo.Backup.SqlBackup(Server srv)
at Microsoft.TeamFoundation.PowerTools.Admin.Helpers.BackupFactory.TestBackupCreation(String path)
[Error @07:15:00.731] !Verify Error!: Account GROUPINFRA\SA-NO-TeamService failed to create backups using path \\wmsi003714n\sql dump
[Info @07:15:00.731] "Verify: Grant Backup Plan Permissions\Root\VerifyDummyBackupCreation(VerifyTestBackupCreatedSuccessfully): Exiting Verification with state Completed and result Error"
有任何想法吗?
答案1
我遇到了同样的问题,发现您的共享名称“sql dump”中有一个空格,就像我的一样。我删除了空格字符,一切正常!
答案2
您用于运行备份的帐户是否也对共享的文件系统文件夹具有完全控制权(或至少具有写入权限)(即共享和文件夹权限都允许写入)?
请记住,创建作业的帐户不一定是运行该作业的帐户(这可能不适用,因为IIRC,Power Toys 备份不使用 SQL Agent)。
尝试使用以下方式监控目的地进程监控查看是否是 SQL Server 中的故障(即在任何文件创建/写入之前失败)或写入中的故障。
答案3
对我来说,共享权限不像 FS 权限那样明确。我在目录中设置了所有帐户,但一旦修复了共享,一切就都设置好了,测试也通过了。
答案4
与此特定特殊字符问题无关,但我在尝试最低权限方法时遇到了完全相同的错误。我不得不将用于备份的帐户添加到 Backup Operator 本地 Windows 组。希望它能帮助其他阅读此帖子的人。