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
Please confirm that you are running the most recent version of dbatools
2.0.4
Other details or mentions
It seems to me that the error is around line 1113 in Copy-DbaDatabase.ps1. I think $DestinationdbName should be $dbName when looking up the database on the $sourceServer.
} elseif ($null -ne $destServer.Databases[$DestinationdbName] -and $force) {
if ($sourceServer.Name -eq $destServer.Name -and $sourceServer.Databases[$DestinationdbName].Name -eq $destServer.Databases[$DestinationdbName].Name) {
Write-Message -Level Verbose -Message "Source and destination database are the same. Aborting routine for this database."
$copyDatabaseStatus.Status = "Failed"
$copyDatabaseStatus.Notes = "Source and destination database are the same."
$copyDatabaseStatus | Select-DefaultView -Property DateTime, SourceServer, DestinationServer, Name, Type, Status, Notes -TypeName MigrationObject
continue
}
What PowerShell host was used when producing this error
Microsoft SQL Server 2019 (RTM) - 15.0.2000.5 (X64) Sep 24 2019 13:48:23 Copyright (C) 2019 Microsoft Corporation Developer Edition (64-bit) on Windows Server 2016 Standard 10.0 (Build 14393: ) (Hypervisor)
.NET Framework Version
.NET Framework 4.7.4050.0
The text was updated successfully, but these errors were encountered:
Verified issue does not already exist?
I have searched and found no existing issue
What error did you receive?
Type Name Status Notes
Database NQTestDaily_0003_TestDailyBower Failed Source and destination database are the same.
Steps to Reproduce
Please confirm that you are running the most recent version of dbatools
2.0.4
Other details or mentions
It seems to me that the error is around line 1113 in Copy-DbaDatabase.ps1. I think $DestinationdbName should be $dbName when looking up the database on the $sourceServer.
What PowerShell host was used when producing this error
Windows PowerShell (powershell.exe)
PowerShell Host Version
Name Value
PSVersion 5.1.14393.5582
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.14393.5582
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
SQL Server Edition and Build number
Microsoft SQL Server 2019 (RTM) - 15.0.2000.5 (X64) Sep 24 2019 13:48:23 Copyright (C) 2019 Microsoft Corporation Developer Edition (64-bit) on Windows Server 2016 Standard 10.0 (Build 14393: ) (Hypervisor)
.NET Framework Version
.NET Framework 4.7.4050.0
The text was updated successfully, but these errors were encountered: