Renaming a existing Always on Availability listener

Manjunath Bhat 1 Reputation point
2022-09-08T20:18:38.687+00:00

Hi All,

We are currently upgrading the 2012 SQL Server to 2019. We are using log shipping method to accomplish this task.

Current setup is
2012DNS -- 2012 AG Listener

2019DNS -- 2019 AG Listener

Log Shipping is up and running and none of the databases are added to new 2019DNS Listener availability group.

Since everywhere in all of our applications the Listener DNS is mentioned, on day of cutover we want to point the old listener DNS which is 2012DNS to 2019 servers.

Since both DNS 2012DNS and 2019DNS are in use, how can I flip it or switch or rename the 2019DNS to 2012DNS?

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
14,144 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Seeya Xi-MSFT 16,476 Reputation points
    2022-09-09T07:17:59.957+00:00

    Hi @Manjunath Bhat ,

    Welcome to Microsoft Q&A!
    Only removing the existing listener can modify the DNS entry. Maybe you want to use the T-SQL way, I put the relevant link here:
    https://learn.microsoft.com/en-us/sql/t-sql/statements/alter-availability-group-transact-sql?redirectedfrom=MSDN&view=sql-server-ver16

    Best regards,
    Seeya


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  2. Manjunath Bhat 1 Reputation point
    2022-09-09T16:58:27.183+00:00

    Hello Seeya,

    thank you for response. I read a post where someone was trying TSQL Way but didnt work, hence I did not gave a try but sure let me try this option if it works I will update here


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.