Hallengren Script options

The Hallengren Maintenance scripts are an excellent collection of maintenance scripts, here are some options I often set for the IndexOptimize and Full Backup jobs

Backup

EXECUTE [DatabaseBackup]
@Databases = ‘USER_DATABASES’,
@Directory = N’D:\Backups’,
@BackupType = ‘FULL’,
@Verify = ‘Y’,
@CleanupTime = 28, –Hours beyond which it will remove the old backup file
@CleanupMode = ‘BEFORE_BACKUP’, — Delete the Backup file before or after the new backup
@Checksum = ‘Y’,
@LogToTable = ‘Y’,
@MinBackupSizeForMultipleFiles = 5120, –Size before it splits the backup into stripes
@NumberOfFiles = 4, –Number of stripes
@BufferCount = 12,
@MaxTransferSize = 4194304

IndexOptimize

EXECUTE [IndexOptimize]
@Databases = ‘USER_DATABASES’,
@TimeLimit = 14400, — 4 hours total run time
@LockTimeout = 300, — 5 minutes (amount of time it waits for a lock on any table)
@LockMessageSeverity = 10, –(The message severity raised if lock not obtained)
@LogToTable = ‘Y’