Database Mirroring error

  • Hello,

    We are trying to enable mirroring on a database hosted on Windows XP professional.We are able to set the Mirror and witness server but when we click on "Start Mirroring" it gives the following error

    "The server network address <Address of the mirror:5022> can not be reached or does not exist.Check the network address and ports for the local and remote endpoints are operational (Microsoft SQL Server Error:1418)"

    When I run the netstat on Principal as well as Mirror it do not show the port 5022. I am not aware how to configure the port so that the server will listen to it.

    Please suggest how the problem can be resolved

    Thanks in advance.

    Rohit Chitre

  • Rohit Chitre-274613 (8/17/2010)


    I am not aware how to configure the port so that the server will listen to it.

    You need to create TCP endpoints. TCP endpoints will have port numbers. See the following quoted from BOL:

    B. Creating a database mirroring endpoint

    The following example creates a database mirroring endpoint. The endpoint uses port number 7022, although any available port number would work. The endpoint is configured to use Windows Authentication using only Kerberos. The ENCRYPTION option is configured to the nondefault value of SUPPORTED to support encrypted or unencrypted data. The endpoint is being configured to support both the partner and witness roles.

    CREATE ENDPOINT endpoint_mirroring

    STATE = STARTED

    AS TCP ( LISTENER_PORT = 7022 )

    FOR DATABASE_MIRRORING (

    AUTHENTICATION = WINDOWS KERBEROS,

    ENCRYPTION = SUPPORTED,

    ROLE=ALL);

    GO

  • Thanks for the reply.The endpoint is already in place.

  • The status is shown as "This database has not been configured for mirroring"

  • Is the end-point state started?

    if you check SYS.database_mirroring_endpoints check state_desc; if not started. use "Alter Endpoint" statement to start it.

    [font="Arial"]---

    Mohit K. Gupta, MCITP: Database Administrator (2005), My Blog, Twitter: @SQLCAN[/url].
    Microsoft FTE - SQL Server PFE

    * Some time its the search that counts, not the finding...
    * I didn't think so, but if I was wrong, I was wrong. I'd rather do something, and make a mistake than be frightened and be doing nothing. :smooooth:[/font]

    How to ask for help .. Read Best Practices here[/url].

  • 1. Are you using a common AD account ?

    2. Have you checked your firewall policy ? try and telnet port 5022

  • How did you setup the database mirroring endpoints? can you postthe SQL code you used?

  • I used the user interface to configure Principle, Mirror and witness for the mirroring purpose. I configured the end point in the same way.End point state shows "Started".

  • telnet 5022 says Connect Failed. Windows firewall is inactive on all the machines.

  • I am trying to configure mirroring using script.Everything went fine until I tried to configure the partner on the Principle using following command

    Alter database AdventureWorks set partner = 'TCP://ws1512:5023'(ws1512 is the mirror)

    I get following meesage.

    Msg 1418, Level 16, State 1, Line 1

    The server network address "TCP://ws1512:5023" 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 can configure Principle as partner from the mirror without any errors

    Alter database AdventureWorks set partner = 'TCP://ws1510:5022' (ws1510 is the Principle)

  • We checked the combination of another machines as Principal and Mirror. Every time the problem is faced when setting Mirror as partner from Principal.

  • Rohit Chitre-274613 (8/18/2010)


    I am trying to configure mirroring using script.Everything went fine until I tried to configure the partner on the Principle using following command

    Alter database AdventureWorks set partner = 'TCP://ws1512:5023'(ws1512 is the mirror)

    I get following meesage.

    Msg 1418, Level 16, State 1, Line 1

    The server network address "TCP://ws1512:5023" 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 can configure Principle as partner from the mirror without any errors

    Alter database AdventureWorks set partner = 'TCP://ws1510:5022' (ws1510 is the Principle)

    When you are setting TCP connection you have to use FQDN, if that is not possible then IP address. But you usually get a different error, and you not being able to telnet to the host is also weird. Did you check end points on both partners?

    [font="Arial"]---

    Mohit K. Gupta, MCITP: Database Administrator (2005), My Blog, Twitter: @SQLCAN[/url].
    Microsoft FTE - SQL Server PFE

    * Some time its the search that counts, not the finding...
    * I didn't think so, but if I was wrong, I was wrong. I'd rather do something, and make a mistake than be frightened and be doing nothing. :smooooth:[/font]

    How to ask for help .. Read Best Practices here[/url].

  • Mohit K. Gupta (8/18/2010)


    Rohit Chitre-274613 (8/18/2010)


    I am trying to configure mirroring using script.Everything went fine until I tried to configure the partner on the Principle using following command

    Alter database AdventureWorks set partner = 'TCP://ws1512:5023'(ws1512 is the mirror)

    I get following meesage.

    Msg 1418, Level 16, State 1, Line 1

    The server network address "TCP://ws1512:5023" 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 can configure Principle as partner from the mirror without any errors

    Alter database AdventureWorks set partner = 'TCP://ws1510:5022' (ws1510 is the Principle)

    When you are setting TCP connection you have to use FQDN, if that is not possible then IP address. But you usually get a different error, and you not being able to telnet to the host is also weird. Did you check end points on both partners?

    If the servers are in the same domain, you don't nee to use the FQDN. I didn't on the servers at my previous employer.

    Is the database mirror endpoint on ws1512 assigned to 5023 or 5022?

  • Hello,

    The problem is resolved. I used the same domain user with local administrative rights on both the machines as startup user account for SQL Server.(on both the machines)

    Then I executed the following command on mirror & Principal both

    Grant connect on endpoint::<Endpoint_name> to public

    Thanks everyone for your support.

Viewing 14 posts - 1 through 13 (of 13 total)

You must be logged in to reply to this topic. Login to reply