Not sure that I see the point with changing the instance name. Rather you need to remove the replica that already exists, so you can put it back again. You may want to check what's in the current replica before you go ahead.
SQL Always On failed Join secondary Availability Replica
Hi Expert,
I had the issue when join secondary Availability Replica, either added by T-SQL or Wizard, the error message say:
".Cannot create availability replica for availability group [AGName] .An availability replica of specified Availability Group already exist on this instance of SQL Server...."
I tried to change the instance name of Availability replica e.g. SERVER01\AOG01 with SERVER01\AOG02... but it's same result!
great appreciation for your answer in advanced
warm regard,
Urbel
2 answers
Sort by: Most helpful
-
-
LucyChen-MSFT 5,060 Reputation points Microsoft Vendor
2024-06-04T01:54:36.32+00:00 Hi @UrBel ,
Thank you for reaching out and welcome to Microsoft Q&A.
From the error message you provided:
An availability replica of specified Availability Group already exist on this instance of SQL Server
You changed the instance name of Availability replica and still added failed, I think the problem may appear in the AG where you want to add a replica, the name of this AG is incorrect or unique.
You can try to find the AG. It may exist because you didn't create it correctly before.
Try this:
select * From sys.dm_hadr_name_id_map
Then delete the AG which you didn't create it successfully:
DROP AVAILABILITY GROUP AG_Name
You can follow the steps in this article to recreate and add replicas, hope it can help you well.
In addition, please:
- Ensure that the always-on endpoint (Hadr_endpoint) is not blocked by the firewall (default port 5022).
- Make sure that the primary server's startup account is added to all secondary servers, and that all secondary servers' startup accounts are added to the primary server.
There is another thing to note is making sure your SQL Server account is the domain administrator account, this is my service account and AG nodes:
Please feel free to share your issue here if you have any confused.
Best regards,
Lucy Chen
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.
https://docs.microsoft.com/en-us/answers/support/email-notifications