Trouble configuring SQL Server Always On

Sree Harshita Maddala 0 Reputation points
2025-12-08T13:21:50.4033333+00:00

I have created an AD setup. Joined two sql vms(primary and secondary) into that AD.
I have then installed failover clustering on both the sql nodes, and created a cluster.
Then I have enabled SQL Server Always On Availability Groups.

Next, while configuring SQL Server Always On, I have created Hadr endpoints and created a db in primary node, took backup and restored it in secondary.

Then created a availability group in primary. While restoring db to AG in secondary, facing error that availability group and its local availability replica does not exist.

SQL Server Database Engine
{count} votes

1 answer

Sort by: Most helpful
  1. Shruti Dhruv 405 Reputation points Microsoft External Staff Moderator
    2025-12-12T11:29:38.4233333+00:00

    Hi Sree Harshita Maddala,

    It seems like the AG metadata for that group isn’t present on the secondary or the secondary SQL instance hasn’t Joined the AG yet.
    Try to JOIN non executed on secondary AG (instance level). Looks like you created the AG on the primary, but on the secondary instance you must run. Without JOIN, the secondary has no local replica metadata and will throw this error when you try to join databases.

    Let me know if that worked for you.
    Thank You.

    0 comments No comments

Your answer

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