We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ed12f76 commit c92affbCopy full SHA for c92affb
1 file changed
public/Backup-DbaDatabase.ps1
@@ -534,6 +534,11 @@ function Backup-DbaDatabase {
534
Stop-Function -Message "Backing up tempdb not supported" -Continue
535
}
536
537
+ if (-not $db.IsAccessible) {
538
+ Write-Progress -Id $topProgressId -Activity 'Backup' -Completed
539
+ Stop-Function -Message "Database $dbName is not accessible. Cannot perform backup." -Continue -Target $db
540
+ }
541
+
542
if ('Normal' -notin ($db.Status -split ',')) {
543
Write-Progress -Id $topProgressId -Activity 'Backup' -Completed
544
Stop-Function -Message "Database status not Normal. $dbName skipped." -Continue
0 commit comments