How to Change Listener Name in SQL Server 2022.

After successfully configuring alwayson availability groups with a listener name in SQL server 2022, we got a situation where we should change the listener name. Let’s check our setup before changing the listener name.

Our Setup:

  • Windows 2019
  • SQL 2022
  • 2 –node cluster

Our existing listener name is ‘DBLIS’ and we should change this to ‘SECDBLIS’. There is no way we can directly edit the DNS name and it should affect. We should delete the existing listener and re-create a new listener with the same IP.

Before starting the process:

  • Make sure to have ‘sysadmin’ access on the SQL Server instance
  • Make sure to have cluster object creation/modification access on the service account you are using to run SQL Server Services
  • In case of no modification access, we would need AD (Active Directory) admin support

Delete the existing Listener in SQL Server 2022:

  • Launch SSMS, connect to the SQL instance, and expand ‘Always on High Availability
  • Expand Availability Group Listeners
change_listener_name_01
  • Right-click on the listener name and hit ‘Delete
change_listener_name_02
  • The old listener has been deleted from the SQL Server instance. Check with the AD support team to delete the DNS record from AD with the listener IP assigned due to an earlier configuration.
  • Upon confirmation of DNS records deletion (we can check by pinging the listener name and it should resolve to any IP), try recreating the new listener name with the same

Creating a new listener with the same IP:

  • Right-click on the Availability Group Listeners and hit ‘Add Listener
change_listener_name_03
  • Give a required new listener name, port default 1433 by selecting Network Mode ‘Static IP’. Give the same IP as before used for ‘DBLIS’ then hit ‘OK
change_listener_name_04
  • The new listener in the SQL Server 2022 has been created with the same IP.
change_listener_name_05

Leave a Reply