locked
4 instances on server - all db's mirroring to another server - port question RRS feed

  • Question

  • Hi Folks,

    SQL Server 2008 EE R2 RTM

    I have 4 instances on a 2 node cluster - all running on the same physical node. I'm a little unclear as to the mirroring endpoint port assignment/uniqueness. Does the mirroring endpoint port need to be unique per database, per instance, or per physical node? I need to tell the network guy which ports to open on the firewall.

    All 4 instances (cluster) will be mirrored to a standalone 4 instance server. inst01 -> inst01, etc.

     I have successfuly set up mirroring on inst01 (5022(P)-5022(M)), and will complete the others over the weekend.  Where I'm not clear is whetehr or not I need to change the port assignment on inst02 to something other than 5022 (or soemthing different than inst01).

    I reviewed cc917680.aspx, and it reads (to me) like I need a unique port for each database - but I'm wondering if I am interpreting this wrong - I hope so. My hunch is that all mirrored databases per instance share port 5022. And in the case of a cluster, the other instance endpoint ports can also use port 5022 - Am i correct?  Perhaps the line shoud read "Each mirroring enpoint..", and not "Each database endpoint..."?

    So, assuming that it is OK to use port 5022 for each clustered instance, and I'm going to 1 physical standalone with 4 instances, I will need to set the mirror as 5022/5023/5024/5025 for example. Am I correct? Port uniqueness is at the IP - yes?

    Cluster inst01 5022(P) -> standalone inst01 5022(M)

    Cluster inst02 5022(P) -> standalone inst02 5023(M)

    Cluster inst03 5022(P) -> standalone inst02 5024(M)

    Cluster inst04 5022(P) -> standalone inst02 5025(M)

    From the article:

    Each database endpoint must specify a unique port on the server. When working with SQL Server instances on separate machines, these port numbers can all be the same and the Configure Database Mirroring Security Wizard will automatically suggest port 5022 as the port. If any of the SQL Server instances are on the same machine, each instance must have a distinct port and the port numbers must be unique

    Thanks in advance.


    Scott H
    Saturday, December 3, 2011 1:08 AM

Answers

  • Hi Scott!

    To answer it simply: Each SQL Instance has one (and only one) mirroring endpoint. This endpoint needs to be able to bind to the specified port. As per TCP rules each port can only be bound once on each IP address, so either you have a dedicated IP for each endpoint or a dedicated port. (Or both of course).

     

    Lucifer

    Monday, December 5, 2011 7:44 AM

All replies

  • Slight correction in my earlier post.

     

    Cluster inst03 5022(P) -> standalone inst03 5024(M)

    Cluster inst04 5022(P) -> standalone inst04 5025(M


    Scott H
    Saturday, December 3, 2011 1:15 AM
  • Hi Scott,,

    In the context of Database mirroring ,endpoint is the method by which the Prinicpal communicates with the Mirror.The mirror listens on a port defined in the endpoint(default is 5022).Each database mirror pair listens on its own unique port.


    Best Regards,
    Peja

    Please remember to click "Mark as Answer" on the post that helps you, and to click "Unmark as Answer" if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
    Monday, December 5, 2011 7:18 AM
  • Hi Scott!

    To answer it simply: Each SQL Instance has one (and only one) mirroring endpoint. This endpoint needs to be able to bind to the specified port. As per TCP rules each port can only be bound once on each IP address, so either you have a dedicated IP for each endpoint or a dedicated port. (Or both of course).

     

    Lucifer

    Monday, December 5, 2011 7:44 AM
  • Each instance on both principal and mirror servers we will have one and only endpoint allowed but witness allows multiple instance on a single port.

     


    http://uk.linkedin.com/in/ramjaddu
    Tuesday, December 6, 2011 4:32 PM
  • Thank-you.

    1:1 relationship; 1 instance = 1 mirroring enpoint. As I was configuring mirroring it was made obvious by the fact that when I got to the second database, and making the connection to the mirror, there was no option at that point to change the port via the wizard.

    Thanks again!!


    Scott H
    Tuesday, December 6, 2011 4:59 PM