Backup failed after I truncated the transaction log
This morning I truncated my transaction before it's hourly backup. Since I truncated the transaction log, the backup failed. The error code I got was 0xC002F210. Any ideas why th开发者_Go百科is happened?
The problem is caused by not having done a full backup before switching the data into SIMPLE recovery mode, shrinking the log file and then switching back to FULL recovery mode.
Why did you truncate the log instead of just backing it up? If you were running out of space you could have backed up the log and then shrunk the file, instead of truncating. Truncating messes with the backup chain and forces you to start over (by taking a new, full backup).
This is one of the reasons BACKUP LOG WITH TRUNCATE_ONLY has been deprecated, and actually won't run in SQL Server 2008. For some background reading:
http://sqlserverpedia.com/blog/sql-server-backup-and-restore/backup-log-with-truncate_only-like-a-bear-trap/
https://sqlblog.org/2009/07/27/oh-the-horror-please-stop-telling-people-they-should-shrink-their-log-files
精彩评论