Skip to content

Commit

Permalink
Use scripting options (Copy-DbaResourceGovernor)
Browse files Browse the repository at this point in the history
  • Loading branch information
andreasjordan committed Oct 9, 2024
1 parent f31bdd2 commit a9114b3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion public/Copy-DbaResourceGovernor.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,9 @@ function Copy-DbaResourceGovernor {
}

Write-Message -Level Verbose -Message "Creating function."
$destServer.Query($sourceClassifierFunction.Script())
$scriptingOptionsObject = New-DbaScriptingOption
$scriptingOptionsObject.IncludeHeaders = $false
$destServer.Query($sourceClassifierFunction.Script($scriptingOptionsObject))

$sql = "ALTER RESOURCE GOVERNOR WITH (CLASSIFIER_FUNCTION = $fullyQualifiedFunctionName);"
Write-Message -Level Debug -Message $sql
Expand Down

0 comments on commit a9114b3

Please sign in to comment.