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
Is this bug with Copy-DbaDatabase? You can replicate it using Backup-DbaDatabase ... | Restore-DbaDatabase ...
Environmental data
### PowerShell version:
Name Value
---- -----
PSVersion 5.1.17134.590
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.17134.590
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
### dbatools Module version:
Name : dbatools
Path : C:\Program Files\WindowsPowerShell\Modules\dbatools\0.9.815\dbatools.psd1
Version : 0.9.815
SQL Server:
/* Microsoft SQL Server 2014 (SP2-CU9) (KB4055557) - 12.0.5563.0 (X64) Dec 7 2017 01:00:06 Copyright (c) Microsoft Corporation Developer Edition (64-bit) on Windows NT 6.3 <X64> (Build 9600: ) (Hypervisor) */
The assertion $ag.PrimaryReplicaServerName -eq $server.Name fails when the $SQLInstance parameter contains a port number, as the $server.Name property does not contain the port number. The end result is that $ag.PrimaryReplicaServerName and $server.Name never match.
A potential fix would be to change this to ($ag.LocalReplicaRole -eq "Primary")
GeorgePalacios
changed the title
[Bug] Get-DBAAvailabilityGroup IsPrimary returns false
[Bug] Get-DBAAvailabilityGroup IsPrimary returns false when a port number is passed in under $SQLInstance
Apr 30, 2019
Copy-DbaDatabase
? You can replicate it usingBackup-DbaDatabase ... | Restore-DbaDatabase ...
Environmental data
SQL Server:
/* Microsoft SQL Server 2014 (SP2-CU9) (KB4055557) - 12.0.5563.0 (X64) Dec 7 2017 01:00:06 Copyright (c) Microsoft Corporation Developer Edition (64-bit) on Windows NT 6.3 <X64> (Build 9600: ) (Hypervisor) */
Errors Received
Steps to Reproduce
Expected Behavior
Actual Behavior
The text was updated successfully, but these errors were encountered: