locked
Database Mirroring - Cannot connect to partner RRS feed

  • Question

  • I am working on setting up a database mirror.  I have created the endpoints on both servers, and I have created the mirror database.  On the mirror database, I am able to use the ALTER DATABASE command to set the replication partner.  When I try to use the following ALTER DATABASE command on the primary, it returns an error.

    ALTER DATABASE [EDDS1014984] SET PARTNER = N'TCP://<server>:5022'

    The server network address "TCP://<server>:5022" can not be reached or does not exist. Check the network address name and that the ports for the local and remote endpoints are operational.

    I have done a netstat -a and verified that the port 5022 is open on both servers.  I have done a telnet <server> 5022 to make sure that I can connect.  I have disabled Windows Firewall on both servers.  I can ping the server both by name and IP.  I have tried substituting server name with the IP address and the problem remains.

    I made sure that when I created the endpoints, I used the AUTHORIZATION option and specified the SQL Server service account.

    I have been researching and troubleshooting this all day.  I am out of ideas about what to adjust next to try to get this to work.  Please help.

     

    Monday, December 20, 2010 10:30 PM

Answers

  • A few other checks:

    • use FQDN instead of just server name
    • instances service accounts are domain accounts, not local system, nt_authority, etc...
    • mirror DB was restored with norecovery option (same with tlog if applicable)
    • sys.database_mirroring_endpoints shows your endpoint state as started

     


    No great genius has ever existed without some touch of madness. - Aristotle
    Tuesday, December 21, 2010 1:33 AM

All replies

  • A few other checks:

    • use FQDN instead of just server name
    • instances service accounts are domain accounts, not local system, nt_authority, etc...
    • mirror DB was restored with norecovery option (same with tlog if applicable)
    • sys.database_mirroring_endpoints shows your endpoint state as started

     


    No great genius has ever existed without some touch of madness. - Aristotle
    Tuesday, December 21, 2010 1:33 AM
  • One common error: Maybe your service account has no connect privileges on the endpoint. Try running a GRANT CONNECT ON ENDPOINT::<endpoint name> TO <service account>

    If Telnet works for those ports the permission is my issue in 95% of the cases.

    Tuesday, December 21, 2010 6:15 AM