Skip to content

Commit 8018b44

Browse files
authored
Set-DbaDbQueryStoreOption, use correct postfix for STALE_CAPTURE_POLI… (#9605)
1 parent 3a6f569 commit 8018b44

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

public/Set-DbaDbQueryStoreOption.ps1

+1-1
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ function Set-DbaDbQueryStoreOption {
251251
if ($db.QueryStoreOptions.QueryCaptureMode -eq "CUSTOM") {
252252
if ($CustomCapturePolicyStaleThresholdHours) {
253253
if ($Pscmdlet.ShouldProcess("$db on $instance", "Changing CustomCapturePolicyStaleThresholdHours to $($CustomCapturePolicyStaleThresholdHours)")) {
254-
$query += "ALTER DATABASE $db SET QUERY_STORE = ON ( QUERY_CAPTURE_POLICY = ( STALE_CAPTURE_POLICY_THRESHOLD = $($CustomCapturePolicyStaleThresholdHours))); "
254+
$query += "ALTER DATABASE $db SET QUERY_STORE = ON ( QUERY_CAPTURE_POLICY = ( STALE_CAPTURE_POLICY_THRESHOLD = $($CustomCapturePolicyStaleThresholdHours) HOURS)); "
255255
}
256256
}
257257

0 commit comments

Comments
 (0)