[New-Command] Test-DbaReplicaName to test replica names to @@SERVERNAME #710

Open
wsmelton opened this Issue Feb 12, 2017 · 0 comments

Projects

None yet

1 participant

@wsmelton
Member
wsmelton commented Feb 12, 2017 edited

Is this a feature OR bug:

Feature/New Command

Results of using Test-DbaServerName validate that@@SERVERANAME` matches the NetBIOS or computer name of the server hosting the instance. In special cases on case-sensitive collation, and where an AG was created by scripting that if the replica name does not match it's associated @@SERVERNAME, certain things like backup preference can malfunction.

In the sense that @@SERVERNAME returns SERVER1 but the replica when creating the AG was specified as Server1. If the server collation is configured as case-sensitive use of things like sys.fn_hadr_backup_is_preferred_replica will always return 0 when in fact it should return 1. Reference connect item that touches on this fact.

It will help prevent headaches for folks that are not aware of this.

An alternative to a new command would also be to simply add a parameter switch to the current Test-DbaServereName possibly. Up for discussion.

@wsmelton wsmelton added the bug label Feb 12, 2017
@wsmelton wsmelton self-assigned this Feb 12, 2017
@wsmelton wsmelton closed this Feb 12, 2017
@wsmelton wsmelton changed the title from Test-DbaServerName does not compare proper case of server name to [New-Command] Test-DbaReplicaName to test replica names to @@SERVERNAME Feb 12, 2017
@wsmelton wsmelton reopened this Feb 12, 2017
@wsmelton wsmelton added enhancement New Command and removed bug labels Feb 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment