【问题标题】:SQL Server differential backup failureSQL Server 差异备份失败
【发布时间】:2017-07-13 04:23:09
【问题描述】:

我注意到我们的维护计划中的差异备份失败。这似乎是尝试进行企业保管库副本的结果,但目前无法确认这一点。之前的完整备份是在下午 5:00 完成的,失败发生在晚上 11:30。

enter image description here

日志文件在这里:

Microsoft(R) Server Maintenance Utility (Unicode) Version 10.50.6220
Report was generated on "server_name".
Maintenance Plan: db_name backup Differential
Duration: 00:00:00
Status: Warning: One or more tasks failed.
Details:
Back Up Database Task (server_name)
Backup Database on Local server connection
Databases: DB_NAME
Type: Differential
Append existing
Task start: 2017-07-12T23:30:01.
Task end: 2017-07-12T23:30:02.
Failed:(-1073548784) Executing the query "BACKUP DATABASE [DB_NAME] TO  DISK = N'C:..." failed with the following error: "Cannot perform a differential backup for database "DB_NAME", because a current database backup does not exist. Perform a full database backup by reissuing BACKUP DATABASE, omitting the WITH DIFFERENTIAL option.
BACKUP DATABASE is terminating abnormally.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.

Command:EXECUTE master.dbo.xp_create_subdir N''C:\Full Backups\Differentials\DB_NAME''

GO
BACKUP DATABASE [DB_NAME] TO  DISK = N''C:\Full Backups\Differentials\DB_NAME\DB_NAME_backup_2017_07_12_233001_9226889.bak'' WITH  DIFFERENTIAL , NOFORMAT, NOINIT,  NAME = N''DB_NAME_backup_2017_07_12_233001_9070642'', SKIP, REWIND, NOUNLOAD, COMPRESSION,  STATS = 10
GO
declare @backupSetId as int
select @backupSetId = position from msdb..backupset where database_name=N''DB_NAME'' and backup_set_id=(select max(backup_set_id) from msdb..backupset where database_name=N''DB_NAME'' )
if @backupSetId is null begin raiserror(N''Verify failed. Backup information for database ''''DB_NAME'''' not found.'', 16, 1) end
RESTORE VERIFYONLY FROM  DISK = N''C:\Full Backups\Differentials\DB_NAME\DB_NAME_backup_2017_07_12_233001_9226889.bak'' WITH  FILE = @backupSetId,  NOUNLOAD,  NOREWIND

GO

问题是我似乎找不到这个新创建的完整备份,它以上午 12:30 的差异备份为基础?有没有办法找到差异指向的基本文件?

【问题讨论】:

  • 这确实与 programming 没有任何关系(this site all about),但是与数据库管理 - 所以这里是题外话,属于dba.stackexchange.com - 投票移动。
  • 道歉@marc_s 。看来我不能这样做,因为我的名声很高兴如果你能帮忙的话,很高兴能把它搬走

标签: sql-server-2008-r2 database-backups


【解决方案1】:

一种方法是通过 PowerShell 脚本(可在各种论坛上轻松获得)自动执行此作业,您可以在其中为增量备份、完整备份和差异备份设置单独的参数。 我更喜欢的另一种方法是使用专用的备份软件设置来完成这项任务。 早些时候,我有 MS DPM 来管理 SQL 备份,它确实非常有效。 我也尝试过 Cloudberry 备份 SQL 服务器,它也是一个轻量且可靠的基于云的备份工具。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2020-02-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多