Every parameter has a field and a help text, the combination is validated while you click, and the result is a finished command or a complete SQL Agent job.
@URL vs. @Directory, @Databases vs. @AvailabilityGroups@Execute = 'N': Ola itself confirms the call
1Categories: nine groups, the badge counts the parameters set
2Fields: drop-downs, pickers for databases, AGs and folders, token menu for file names
3Help: type, default and explanation of the focused field
4Output: regenerated on every change, VS-style syntax highlighting
| Category | Parameters (examples) |
|---|---|
| Basics | @Databases, @AvailabilityGroups, @BackupType, @Verify, @Checksum, @CopyOnly, @ChangeBackupType |
| Target & retention | @Directory, @CleanupTime, @MirrorDirectory, @URL, @Credential, @BackupOptions |
| Compression & performance | @Compress, @CompressionAlgorithm (ZSTD), @BufferCount, @MaxTransferSize, @NumberOfFiles |
| Encryption | @Encrypt, @EncryptionAlgorithm, @ServerCertificate, @ServerAsymmetricKey |
| Conditions | @Updateability, @MinModificationLevel, @MinLogSizeSinceLastLogBackup, @OverrideBackupPreference |
| File names & directories | @DirectoryStructure, @FileName, AG variants, case, @TokenTimezone, extensions |
| Options / third-party / execution | @Init, @NoRecovery, @Stats, @BackupSoftware, Data Domain Boost, @DatabasesInParallel, @LogToTable |
| Preset | Contents | Schedule |
|---|---|---|
| User DBs - FULL | USER_DATABASES, Verify, Checksum, Compress, CleanupTime 168, LogToTable | daily |
| User DBs - DIFF | as FULL, DIFF with ChangeBackupType | |
| User DBs - LOG | LOG with ChangeBackupType | every 15 min |
| System DBs - FULL | SYSTEM_DATABASES | daily |
| Ad-hoc COPY_ONLY | FULL COPY_ONLY, no cleanup, pick the database | |
| Large DB - striping | 4 files, BufferCount 50, MaxTransferSize 4 MB | |
| Dry run | Execute = N, only prints the commands |
@CleanupTime together with @URL@Init = 'Y' or @Format = 'Y' on a LOG backup@NumberOfFiles = 3 with two directories@MaxTransferSize not a multiple of 64 KB@Threads / @Throttle without third-party software{FileNumber} for several files@CleanupTime: old files are never deleted@LogToTable = 'N': no history in dbo.CommandLog@NoRecovery = 'Y': databases end up RESTORING@EncryptionKey stands in plain text in the jobEXECUTE [master].[dbo].[DatabaseBackup]
@Databases = 'USER_DATABASES, -Test%',
@Directory = '\\backupsrv\sql',
@BackupType = 'FULL',
@Verify = 'Y',
@CleanupTime = 168,
@Checksum = 'Y',
@NumberOfFiles = 2,
@LogToTable = 'Y';
| Format | Result |
|---|---|
| T-SQL | Aligned EXECUTE, parameters in the order of the procedure |
| sqlcmd | One line like Ola's CmdExec job steps, $(ESCAPE_SQUOTE(SRVR)) token |
| PowerShell | Invoke-DbaQuery ... -QueryTimeout 0 -EnableException |
| Agent job | Category, owner, T-SQL step, output file in SQLLOGDIR, daily / weekly / interval schedule |
DECLARE @JobName sysname = N'DatabaseBackup - USER_DATABASES - LOG';
IF EXISTS (SELECT 1 FROM msdb.dbo.sysjobs WHERE name = @JobName)
BEGIN RAISERROR(N'Job "%s" existiert bereits - nichts angelegt.', 16, 1, @JobName); RETURN; END
BEGIN TRANSACTION;
EXECUTE msdb.dbo.sp_add_job @job_name = @JobName, @category_name = N'Database Maintenance', ...
EXECUTE msdb.dbo.sp_add_jobstep ... @subsystem = N'TSQL', @command = @Command,
@output_file_name = N'$(ESCAPE_SQUOTE(SQLLOGDIR))\DatabaseBackup_$(ESCAPE_SQUOTE(JOBID))_...txt';
EXECUTE msdb.dbo.sp_add_jobschedule ... @freq_subday_type = 4, @freq_subday_interval = 15;
EXECUTE msdb.dbo.sp_add_jobserver @job_name = @JobName, @server_name = N'(local)';
COMMIT TRANSACTION;
@Execute = 'N'Keywords (USER_DATABASES, ALL_DATABASES, ...), include list, exclude list (-Name), wildcard patterns.
Certificates, asymmetric keys and credentials of the instance as drop-downs, still freely editable.
An Ola installation older than 2026-06-29 is flagged: newer parameters are unknown there.
$p = @{ Databases = 'USER_DATABASES'; BackupType = 'LOG'; ChangeBackupType = 'Y'
CleanupTime = 168; LogToTable = 'Y' }
Test-sqmOlaBackupParameter -Parameter $p # offline rule check
New-sqmOlaBackupCommand -Parameter $p -Format AgentJob `
-ScheduleType Interval -IntervalMinutes 15 -JobOutputFile
# new Ola release? compare parameter list and order first
.\Tests\Test-sqmOlaBackupBuilder.ps1 -MaintenanceSolution .\MaintenanceSolution.sql -SqlInstance SQL01
| Function | Purpose |
|---|---|
| Show-sqmOlaBackupGui | The GUI, optionally connected right away |
| New-sqmOlaBackupCommand | T-SQL, sqlcmd, PowerShell or Agent job from a hashtable |
| Test-sqmOlaBackupParameter | Errors and hints per parameter, offline |