Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed names of jobs and schedules. Fixes #4972 #4973

Merged
merged 2 commits into from
Jan 20, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 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,17 +1355,17 @@ 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_$($SourceServerName)_$($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)"
$DatabaseCopySchedule = "LSCopySchedule_$($SourceServerName)_$($db.Name)"
Write-Message -Message "Copy job schedule name set to $DatabaseCopySchedule" -Level Verbose
}

Expand All @@ -1390,17 +1390,17 @@ 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_$($SourceServerName)_$($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)"
$DatabaseRestoreSchedule = "LSRestoreSchedule_$($SourceServerName)_$($db.Name)"
}
Write-Message -Message "Restore job schedule name set to $DatabaseRestoreSchedule" -Level Verbose

Expand Down