Closed Tyrell66 closed 3 weeks ago
Have you looked at the parameters @LogSizeSinceLastLogBackup
and @TimeSinceLastLogBackup
(to be used together)?
Here's how it can be used to perform a transaction log backup if 1 GB of log has been generated since the last log backup, or if it has not been backed up for 300 seconds. This enables you to do more frequent log backups of databases with high activity, and in periods of high activity.
EXECUTE dbo.DatabaseBackup
@Databases = 'USER_DATABASES',
@Directory = 'C:\Backup',
@BackupType = 'LOG',
@LogSizeSinceLastLogBackup = 1024,
@TimeSinceLastLogBackup = 300
When a log backup is scheduled, only to run it if the log file is above a certain percentage (75% as an example).