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
if ($PSCmdlet.ShouldProcess($cloneDatabase,"Verifying database existence")) {
if ($server.Databases.Name-contains$cloneDatabase) {
Stop-PSFFunction-Message "Database $cloneDatabase is already present on $SqlInstance"-Target $SqlInstance
Which spits out:
VERBOSE: Performing the operation "Verifying database existence" on target "database-a".
Unable to create database [database-a]: The following exception occurred while trying to enumerate the collection: "Database 'database-b' is in transition. Try the statement later.".
I believe switching in the more robust Get-DbaDatabase command may be a quick solve here.
The text was updated successfully, but these errors were encountered:
Before submitting the bug
powershell -NoProfile
)Describe the bug
When enumerating databases in SMO with other clones being created simultaneously, sometimes the verifying block encounters an error.
dbaclone/functions/clone/New-DcnClone.ps1
Lines 361 to 363 in 1bf7759
Which spits out:
I believe switching in the more robust
Get-DbaDatabase
command may be a quick solve here.The text was updated successfully, but these errors were encountered: