Database mirroring endpoints - difference between 5022 and 7022

David C 191 Reputation points
2023-03-02T18:56:50.54+00:00

I'm prepping to install SQL Server 2019 Always On availability group cluster. Part of the install is to specify database mirroring endpoints for each SQL instance. In the past, I used ports 5022, 5023, 5024, etc, for the endpoints for multiple instances. I saw a recent MS article with an example that uses 7022 for the endpoint. When I look up the TCP port descriptions, I see:

5022 = "MSSQL Server Replication and Database mirroring endpoints"

7022 = "Database mirroring endpoints".

What's the difference? Does it matter which port(s) I use?

Thanks.

SQL Server Other
0 comments No comments
{count} votes

Accepted answer
  1. Erland Sommarskog 121.4K Reputation points MVP Volunteer Moderator
    2023-03-02T21:04:07.2733333+00:00

    No, you can use any port, as long as that port is not use by any other program in the machine. The only purpose these "official" port designation serves is exactly to avoid such collisions.

    0 comments No comments

0 additional answers

Sort by: Most helpful

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.