dsccommunity / dsccommunity/SqlServerDsc

SqlAGListener: 15 character name limit

Open
#513 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement help wanted
Dominant language
PowerShell
Stars
385
Forks
224
PR merge metrics
No merged PRs in 30d

Description

Details of the scenario you try and problem that is occurring:

I don't think the resource should decide what naming convention you can use. The 15 character limit should be removed from the resource. As good practice, when you create a SQL Server you also create a DNS hostname (EG BusinessApplication-DB-Prod.contoso.corp) so that when you migrate the database to another server, all you need to do is modify the hostname and not all the applications. Usually these hostnames are longer than 15 characters because you're adding other descriptors such as 'db' and 'prod' in the name. As per Microsoft (https://docs.microsoft.com/en-us/sql/database-engine/availability-groups/windows/create-or-configure-an-availability-group-listener-sql-server - see image below) the maximum length for a DNS name is 63 characters. Only SQL Management Studio limits you to 15 because of the warning mentioned in the screenshot. By manually removing the limit in Set/Get/Test I can create 20 character listener names and they work perfectly providing the first 15 characters are unique. @johlju what are your thoughts?

dns

Edit: typo should -> shouldn't

The DSC configuration that is using the resource (as detailed as possible):

Version of the Operating System, SQL Server and PowerShell the DSC Target Node is running:

Server: Windows 2012 R2 (Update)
SQL Server: 2016 SP1 CU2
Powershell: 5.1

Version of the DSC module you're using, or 'dev' if you're using current dev branch:

dev as of today

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the SqlAGListener Set, Get, and Test resource operations and inspect where the 15-character validation is applied. Confirm the behavior against the reported SQL Server 2016 scenario; done means listener names longer than 15 characters are accepted while the documented uniqueness behavior remains valid.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell
Domain
databases
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.