From 656330b0b3073ff3e7ebffad5d8ed4ddc702b3a2 Mon Sep 17 00:00:00 2001 From: Thomas Kronawitter <51967979+tkronawitter@users.noreply.github.com> Date: Thu, 6 Jan 2022 11:32:25 +0100 Subject: [PATCH] InvokeDbaDBLogShipping: Modified restore alert threshold default to 45 minutes (#8056) A RestoreThreshold of 0 minutes will always put the secondary replica in an alert state. Therefore, it is not optimal as a default setting. The transaction log shipping scripts generated by SSMS are using 45 minutes as default value. --- functions/Invoke-DbaDbLogShipping.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/functions/Invoke-DbaDbLogShipping.ps1 b/functions/Invoke-DbaDbLogShipping.ps1 index 24ce97b387..0c84368de5 100644 --- a/functions/Invoke-DbaDbLogShipping.ps1 +++ b/functions/Invoke-DbaDbLogShipping.ps1 @@ -298,7 +298,7 @@ function Invoke-DbaDbLogShipping { .PARAMETER RestoreThreshold The number of minutes allowed to elapse between restore operations before an alert is generated. - The default value = 0 + The default value = 45 .PARAMETER SecondaryDatabasePrefix The secondary database can be renamed to include a prefix. @@ -623,7 +623,7 @@ function Invoke-DbaDbLogShipping { Write-Message -Message "Restore retention set to $RestoreRetention" -Level Verbose } if (-not $RestoreThreshold) { - $RestoreThreshold = 0 + $RestoreThreshold = 45 Write-Message -Message "Restore Threshold set to $RestoreThreshold" -Level Verbose } if (-not $PrimaryMonitorServerSecurityMode) {