我使用SQL Server维护向导(以及一本书)来生成Full和Differentail备份。完整备份在星期一早上运行,差异在星期二到星期六运行。完整备份运行正常并生成以下电子邮件报告...
Microsoft(R) Server Maintenance Utility (Unicode) Version 10.0.2531 Report was generated on "WIN-F9U4VJXGWF5".
Maintenance Plan: FIREDataFB
Duration: 00:31:31
Status: Succeeded.
Details:
Clean Up History (WIN-F9U4VJXGWF5)
Cleanup history on Local server connection History type: Backup,Job,Maintenance Plan
Age: Older than 1 Weeks
Task start: 2010-10-11T03:30:03.
Task end: 2010-10-11T03:30:03.
Success
Command:declare @dt datetime select @dt = cast(N''2010-10-04T03:30:02'' as datetime) exec msdb.dbo.sp_delete_backuphistory @dt GO EXEC msdb.dbo.sp_purge_jobhistory @oldest_date=''2010-10-04T03:30:02''
GO
EXECUTE msdb..sp_maintplan_delete_log null,null,''2010-10-04T03:30:02''
GO
Back Up Database (Full) (WIN-F9U4VJXGWF5) Backup Database on Local server connection
Databases: FIREData
Type: Full
Append existing
Task start: 2010-10-11T03:30:03.
Task end: 2010-10-11T04:01:33.
Success
Command:EXECUTE master.dbo.xp_create_subdir N''F:\SQL Backups\FIREData''
GO
BACKUP DATABASE [FIREData] TO DISK = N''F:\SQL Backups\FIREData\FIREData_backup_2010_10_11_033003_7444370.bak'' WITH NOFORMAT, NOINIT, NAME = N''FIREData_backup_2010_10_11_033003_7424370'', SKIP, REWIND, NOUNLOAD, STATS = 10 GO declare @backupSetId as int select @backupSetId = position from msdb..backupset where database_name=N''FIREData'' and backup_set_id=(select max(backup_set_id) from msdb..backupset where database_name=N''FIREData'' ) if @backupSetId is null begin raiserror(N''Verify failed. Backup information for database ''''FIREData'''' not found.'', 16, 1) end RESTORE VERIFYONLY FROM DISK = N''F:\SQL Backups\FIREData\FIREData_backup_2010_10_11_033003_7444370.bak'' WITH FILE = @backupSetId, NOUNLOAD, NOREWIND
GO
差异备份不会运行。它们失败并显示错误,指示差异作业无法找到完整备份结果。差异作业失败时会发送以下电子邮件报告...
Microsoft(R) Server Maintenance Utility (Unicode) Version 10.0.2531 Report was generated on "WIN-F9U4VJXGWF5".
Maintenance Plan: FIREDataDB
Duration: 00:00:01
Status: Warning: One or more tasks failed.
Details:
Back Up Database (Differential) (WIN-F9U4VJXGWF5) Backup Database on Local server connection
Databases: FIREData
Type: Differential
Append existing
Task start: 2010-10-12T03:30:03.
Task end: 2010-10-12T03:30:03.
Failed:(-1073548784) Executing the query "BACKUP DATABASE [FIREData] TO DISK = N'F:\\SQL Bac..." failed with the following error: "Cannot perform a differential backup for database "FIREData", 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''F:\SQL Backups\FIREData''
GO
BACKUP DATABASE [FIREData] TO DISK = N''F:\SQL Backups\FIREData\FIREData_backup_2010_10_12_033003_4624370.bak'' WITH DIFFERENTIAL , NOFORMAT, NOINIT, NAME = N''FIREData_backup_2010_10_12_033003_4604370'', SKIP, REWIND, NOUNLOAD, STATS = 10 GO declare @backupSetId as int select @backupSetId = position from msdb..backupset where database_name=N''FIREData'' and backup_set_id=(select max(backup_set_id) from msdb..backupset where database_name=N''FIREData'' ) if @backupSetId is null begin raiserror(N''Verify failed. Backup information for database ''''FIREData'''' not found.'', 16, 1) end RESTORE VERIFYONLY FROM DISK = N''F:\SQL Backups\FIREData\FIREData_backup_2010_10_12_033003_4624370.bak'' WITH FILE = @backupSetId, NOUNLOAD, NOREWIND
GO
我必须遗漏一些明显的东西,因为我不希望向导产生无法使用的脚本,但我找不到问题。我现在已经重复了两次创作过程,手里拿着书,准备好了向导,但没有快乐。任何帮助,将不胜感激。我在Windows 7上使用SQL Server 2008 Management Studio版本10.0.2531.0。
答案 0 :(得分:1)
我注意到您的完全备份完成后24小时正在执行您的DIFFERENTIAL备份。您是否完全确定在执行DIFFERENTIAL备份作业时是否存在FULL备份文件?例如,您是否有任何可以删除备份文件的清理作业或进程?
我建议您尝试通过使用T-SQL手动完成相应的步骤来验证您是否确实可以在您的环境中执行FULL备份,然后执行DIFFERENTIAL备份。如果成功,您可以确保该问题仅以某种方式存在于您的维护计划实施中。
为了进一步帮助您完成自己的故障排除工作,您还可以从MSDN论坛中找到以下主题,以便进行有趣的阅读。