Skip to content

Commit

Permalink
Changed names of jobs and schedules. Fixes #4972
Browse files Browse the repository at this point in the history
  • Loading branch information
sstad committed Jan 18, 2019
1 parent 22c6e7b commit 736c24a
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions functions/Invoke-DbaDbLogShipping.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -1165,15 +1165,15 @@ function Invoke-DbaDbLogShipping {

# Check if the backup job name is set
if ($BackupJob) {
$DatabaseBackupJob = "$BackupJob_$($db.Name)"
$DatabaseBackupJob = "$($BackupJob)$($db.Name)"
} else {
$DatabaseBackupJob = "LSBackup_$($db.Name)"
}
Write-Message -Message "Backup job name set to $DatabaseBackupJob" -Level Verbose

# Check if the backup job schedule name is set
if ($BackupSchedule) {
$DatabaseBackupSchedule = "$BackupSchedule_$($db.Name)"
$DatabaseBackupSchedule = "$($BackupSchedule)$($db.Name)"
} else {
$DatabaseBackupSchedule = "LSBackupSchedule_$($db.Name)"
}
Expand Down Expand Up @@ -1355,15 +1355,15 @@ function Invoke-DbaDbLogShipping {

# Check if the copy job name is set
if ($CopyJob) {
$DatabaseCopyJob = "$CopyJob_$SourceServerName_$($db.Name)"
$DatabaseCopyJob = "$($CopyJob)$($db.Name))"
} else {
$DatabaseCopyJob = "LSCopy_$SourceServerName_$($db.Name)"
$DatabaseCopyJob = "LSCopy_$($db.Name)"
}
Write-Message -Message "Copy job name set to $DatabaseCopyJob" -Level Verbose

# Check if the copy job schedule name is set
if ($CopySchedule) {
$DatabaseCopySchedule = "$CopySchedule_$($db.Name)"
$DatabaseCopySchedule = "$($CopySchedule)$($db.Name)"
} else {
$DatabaseCopySchedule = "LSCopySchedule_$($db.Name)"
Write-Message -Message "Copy job schedule name set to $DatabaseCopySchedule" -Level Verbose
Expand All @@ -1390,15 +1390,15 @@ function Invoke-DbaDbLogShipping {

# Check if the restore job name is set
if ($RestoreJob) {
$DatabaseRestoreJob = "$RestoreJob_$SourceServerName_$($db.Name)"
$DatabaseRestoreJob = "$($RestoreJob)$($db.Name)"
} else {
$DatabaseRestoreJob = "LSRestore_$DestinationServerName_$($db.Name)"
$DatabaseRestoreJob = "LSRestore_$($db.Name)"
}
Write-Message -Message "Restore job name set to $DatabaseRestoreJob" -Level Verbose

# Check if the restore job schedule name is set
if ($RestoreSchedule) {
$DatabaseRestoreSchedule = "$RestoreSchedule_$($db.Name)"
$DatabaseRestoreSchedule = "$($RestoreSchedule)$($db.Name)"
} else {
$DatabaseRestoreSchedule = "LSRestoreSchedule_$($db.Name)"
}
Expand Down

0 comments on commit 736c24a

Please sign in to comment.