When running MS SQL with an Always-On group / listener, is it expected that the always-on listener DNS entry be kept active in the domain's DNS? When the listener was created, a DNS entry was added to AD DNS server with multiple IPs as part of the HA configuration.

The always-on listener DNS entry disappeared after some time, and logs indicate there was a scavenge that ran and cleaned up the record, considering it stale.

Is this expected, or is there some sort of mechanism in SQL Always-On that should keep the listener DNS alive? Or is there any other recommendation to keep the entry persisted in DNS? Or unexpected behaviour?

If the SQL server is restarted (OS) + always-on failovers, the DNS entry was automatically added back.

  • Was the IP address assigned to the listener via DHCP? If so, I'd recommend against for this reason (as well another pretty big one which is "how long are you willing to wait for clients to reconnect when (not if) the listener gets a new IP?").
    – Ben Thul
    Jun 1, 2022 at 18:55
  • No, not DHCP. Static IPs were selected explicitly and used in the AG Listener setup. When the listener was set up, something in AG handled registering the hostname to DNS. The A record has 2 IPs, and the clients connecting to the listener have a parameter that handles active/passive of the listener, but it's always 2 static IPs.
    – Brett
    Jun 1, 2022 at 19:13
  • 1
    Got it. That "something" is Windows Clustering and it should maintain the virtual network name and the IPs that go along with that. I asked about DHCP because scavenging seems like it is intended to be used as a means to reclaim old DHCP-assigned addresses.
    – Ben Thul
    Jun 1, 2022 at 20:00


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.