You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ensure you are able to reproduce it on the latest released version (we release often)
Verified this bug is not already reported in an issue
Verified errors are not related to permissions
Can reproduce in a clean PowerShell session (clean = powershell -NoProfile)
If issue is with Copy-DbaDatabase, using Backup-DbaDatabase | Restore-DbaDatabase still does not work
Note that we do not have the resources to make Copy-DbaDatabase work in every environment. Instead, we try to ensure Backup & Restore work in your enviornment.
Steps to Reproduce
/* Any T-SQL commands involved or used to produce test objects/data.*/
<#A database has an open transaction#>Copy-DbaDatabase-Source $source-Destination $dest-SharedPath $share-BackupRestore -AllDatabases -WithReplace -SetSourceReadOnly -SetSourceOffline -Force
Expected Behavior
Since the -Force switch was specified, that the source database would be set read-only forcefully (via Set-DbaDbState -Readonly -Force / ALTER DATABASE xxx SET READ_ONLY WITH ROLLBACK IMMEDIATE
Actual Behavior
Database is skipped.
Environmental data
PowerShell:
SQL Server:
The text was updated successfully, but these errors were encountered:
maddhatter
changed the title
Copy-DbaDatabase -SetSourceReadOnly-Force Doesn't force the read-only
Copy-DbaDatabase -SetSourceReadOnly -Force Doesn't force the read-only
Feb 6, 2019
Before submitting a bug report:
powershell -NoProfile
)Copy-DbaDatabase
, usingBackup-DbaDatabase | Restore-DbaDatabase
still does not workNote that we do not have the resources to make
Copy-DbaDatabase
work in every environment. Instead, we try to ensure Backup & Restore work in your enviornment.Steps to Reproduce
Expected Behavior
Since the
-Force
switch was specified, that the source database would be set read-only forcefully (viaSet-DbaDbState -Readonly -Force
/ALTER DATABASE xxx SET READ_ONLY WITH ROLLBACK IMMEDIATE
Actual Behavior
Database is skipped.
Environmental data
The text was updated successfully, but these errors were encountered: