Skip to content

Commit

Permalink
Set-DbaDbQueryStoreOption, use correct postfix for STALE_CAPTURE_POLI…
Browse files Browse the repository at this point in the history
…CY_THRESHOLD
  • Loading branch information
niphlod committed Feb 27, 2025
1 parent be44563 commit 9686c32
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion public/Set-DbaDbQueryStoreOption.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ function Set-DbaDbQueryStoreOption {
if ($db.QueryStoreOptions.QueryCaptureMode -eq "CUSTOM") {
if ($CustomCapturePolicyStaleThresholdHours) {
if ($Pscmdlet.ShouldProcess("$db on $instance", "Changing CustomCapturePolicyStaleThresholdHours to $($CustomCapturePolicyStaleThresholdHours)")) {
$query += "ALTER DATABASE $db SET QUERY_STORE = ON ( QUERY_CAPTURE_POLICY = ( STALE_CAPTURE_POLICY_THRESHOLD = $($CustomCapturePolicyStaleThresholdHours))); "
$query += "ALTER DATABASE $db SET QUERY_STORE = ON ( QUERY_CAPTURE_POLICY = ( STALE_CAPTURE_POLICY_THRESHOLD = $($CustomCapturePolicyStaleThresholdHours) HOURS)); "
}
}

Expand Down

0 comments on commit 9686c32

Please sign in to comment.