Skip to content

Commit

Permalink
Invoke-DbaDbLogShipping / New-DbaLogShippingPrimaryDatabase - Fix iss…
Browse files Browse the repository at this point in the history
…ues with backup compression (#8156)
  • Loading branch information
andreasjordan committed Feb 9, 2022
1 parent aeaea51 commit c470fce
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/functions/New-DbaLogShippingPrimaryDatabase.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ function New-DbaLogShippingPrimaryDatabase {
Write-Message -Message "Setting backup compression to 0." -Level Verbose
$BackupCompression = 0
} elseif (-not $CompressBackup) {
$defaultCompression = (Get-DbaSpConfigure -SqlInstance $SqlInstance -ConfigName DefaultBackupCompression).ConfiguredValue
$defaultCompression = (Get-DbaSpConfigure -SqlInstance $server -ConfigName DefaultBackupCompression).ConfiguredValue
Write-Message -Message "Setting backup compression to default value $defaultCompression." -Level Verbose
$BackupCompression = $defaultCompression

Expand Down Expand Up @@ -212,7 +212,7 @@ function New-DbaLogShippingPrimaryDatabase {
,@backup_job_id = @LS_BackupJobId OUTPUT
,@primary_id = @LS_PrimaryId OUTPUT "

if ($SqlInstance.Version.Major -gt 9) {
if ($server.Version.Major -gt 9) {
$Query += ",@backup_compression = $BackupCompression"
}

Expand Down

0 comments on commit c470fce

Please sign in to comment.