0

So recently on new servers we are building, after creating the aoag and add servers, they don't go in sync, and I need to manually run this:

CREATE ENDPOINT Hadr_endpoint STATE=STARTED
AS TCP(LISTENER_PORT=5022)
FOR DATABASE_MIRRORING (ROLE=ALL);
GO

GRANT CONNECT ON ENDPOINT::[Hadr_endpoint] TO [Domain\user]

is there anything I'm missing because I've never had to do this in the past and by that, I don't know what's going on.

when I create the listener, I can see the endpoint info in the wizard screen, but when running sys.endpoints, they're not there. then running that cmd manually , everything works and I can "join replica to aoag" and , it works.

1 Answer 1

1

when I create the listener, I can see the endpoint info in the wizard screen, but when running sys.endpoints, they're not there.

We'd really need a repro of this. The wizard looks at database mirroring endpoints specifically, so if it's saying it is there, then it's there.

The wizard should create the endpoints on the initial creation if they don't exist and set the permissions, which is why you haven't had to do it in the past.

If you're not using the wizard, you're responsible for creating the endpoints, logins, and configuring everything except the AG itself.

2
  • hey hello Sean! I could verify that when I use "New availability group" option, after adding the servers and scripting the process, I can see that the endpoint is not created in the script. When I use the "new availability group WIZARD" I could verify after scripting that the endpopint creation part is there. I'm trying to check some MS pages to "why" this happens.
    – Racer SQL
    Commented Nov 3, 2023 at 12:59
  • The wizard creates the endpoints, new ag doesn't. That's why one is a wizard and walks through everything and one isn't. This is by design. Commented Nov 3, 2023 at 13:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.