Tracy Boggiano has started a new series on smart transaction log backups. Part one involves taking smarter transaction log backups in SQL Server 2017:
SQL Server 2017 introduced two fields to help with taking smart backups. One was for taking smarter log backups, for this have DMV sys.dm_db_log_stats that have two fields log_backup_time and log_since_last_backup_mb. With the combination of these two fields, we can put some logic in the jobs that I use for Ola’s scripts that use my config tables from my Github repository. To support this change we will be added three new fields to the DatabaseBackupConfig table:
-
SmartBackup
-
LogBackupTimeThresholdMin
-
LogBackupSizeThresholdMB
Click through for scripts.