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
- Right-click on the listener name and hit ‘Delete’
- 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’
- 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’
- The new listener in the SQL Server 2022 has been created with the same IP.