Skip to content

Commit

Permalink
InvokeDbaDBLogShipping: Modified restore alert threshold default to 4…
Browse files Browse the repository at this point in the history
…5 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.
  • Loading branch information
tkronawitter authored Jan 6, 2022
1 parent 31af472 commit 656330b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions functions/Invoke-DbaDbLogShipping.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 656330b

Please sign in to comment.