locked
I am facing problem in database mirroring RRS feed

  • Question

  • .Hi Friends,

    Good evening,I am doing Ms SQL Database Mirroring on different network segment (i.e, DC and DR),Both location is different and IP also different.

    I have taken remote and also accessing same database.

    DC Server is 'A' and DR Server is 'B'

    I have taken backup from A server and restore on B server with no recovery.After that I start mirroring on 'A' server as a principal with port 5022  and 'B' Server as a Mirroring  with port 5023.Both successfully configured.

    We I start both server synchronizing ,I am getting error "The Server network address"TCP://XXXXXX.XXX.loca: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. (Microsoft SQL Server,Error:1418)"

    Kindly suggest and give me solution.

    Thanks

    Laxmi Narayan Padhy

    Ms SQL Admin..

     

    Tuesday, October 16, 2018 4:03 PM

All replies

  • check  FQDN

    Ramesh Babu Vavilla MCTS,MSBI

    Tuesday, October 16, 2018 5:07 PM
  • do you have connectivity between 2 servers

    did u start bith servers with same user and password


    Ramesh Babu Vavilla MCTS,MSBI

    Tuesday, October 16, 2018 5:57 PM
  • Make sure you have performed the following and if not, see if executing them fixes the issue. 

    1. Get the endpoint names and listener ports for principal and mirror servers by querying below.

    --run on both principal and mirror server
    select name, type_desc, port, ip_address from sys.tcp_endpoints

    2. Once you get the endpoints name and ports, run the following to grant the login (the login that's used by mirroring) permissions over the endpoints on both mirroring partners. If you don't use a specific login, then grant it to NT AUTHORITY\SYSTEM

    --Run on the principal
    GRANT CONNECT ON ENDPOINT::<YourEndPointNameOnPrincipal> TO 
    [NT AUTHORITY\SYSTEM]
    
    --Run on Mirror
    GRANT CONNECT ON ENDPOINT::<YourEndPointNameonMirror> TO 
    [NT AUTHORITY\SYSTEM]

    3. Make sure the mirroring partners can talk to each other by running the following.

    --Run under the Mirror database
    ALTER DATABASE <YourDB> SET PARTNER = ' TCP://<Principalservername>:<Principalport>'
    go
    
    --Run from principal DB
    ALTER DATABASE <YourDB> SET PARTNER = ' TCP://<Mirrorservername>:<Mirrorport>'
    go
    
    Retry the synchronization and see if it changes.


    Please remember to click "Mark as Answer" if my response answered your question or click "Vote as helpful" if it helped you in any way.

    Tuesday, October 16, 2018 6:00 PM
  • Hi,

    I will try to create same user account in both SQL Server.But here is one things SQL Instance is different.Shall i create one user account for MSSQL Server service and Agent Service?

    Thanks

    Laxmi Narayan

    Wednesday, October 17, 2018 4:43 AM
  • Hi,

    I will try to create same user account in both SQL Server.But here is one things SQL Instance is different.Shall i create one user account for MSSQL Server service and Agent Service?

    Ideally, Microsoft recommends using different accounts for SQL Service and the SQL agent service but you can use one account to run both if you wish. 

    Also, what service account have you specified during the creation of Mirroring using wizard? That account should have "connect" permission to the end poitns. (The wizard should've automatically granted it, but double check anyway).


    Please remember to click "Mark as Answer" if my response answered your question or click "Vote as helpful" if it helped you in any way.

    Wednesday, October 17, 2018 5:00 AM
  • Hello Laxmi Narayan Padhy,

    -> Backup host file in location C:\Windows\System32\drivers\etc on your DC and DR server.

    -> On DC server open host file present in location C:\Windows\System32\drivers\etc and add your DR server IPaddress and FQDN in below format,

    IPaddress DRSERVER.domain.local

    -> On DR server open host file present in location C:\Windows\System32\drivers\etc and add your DC server IPaddress and FQDN in below format,

    IPaddress DCSERVER.domain.local

    -> Try mirroring config again.

    If it doesn't work. Remove the entries you made without fail.

    Regards;
    Vivek Janakiraman


    -

    -> On DC server open host file present in location C:\Windows\System32\drivers\etc and add your DR server IPaddress and FQDN in below format,

    IPaddress DRSERVER.domain.local

    > On DC server open host file present in location C:\Windows\System32\drivers\etc and add your DR server IPaddress and FQDN in below format,

    IPaddress DRSERVER.domain.local

    -> On DC server open host file present in location C:\Windows\System32\drivers\etc and add your DR server IPaddress and FQDN in below format,

    IPaddress DRSERVER.domain.local

    Wednesday, October 17, 2018 5:02 AM
  • Hi,

    I have tried this procedures,but still getting same error "The Server network address "TCP://servername.domain.local: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.

    ( Microsoft SQL Server,Error:1418)

    Thanks

    Laxmi Narayan

    SQL Admin

    Tuesday, October 30, 2018 11:26 AM
  • Hi Vivek,

    I have tried this procedures,but still getting same error "The Server network address "TCP://servername.domain.local: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.

    ( Microsoft SQL Server,Error:1418)

    Thanks

    Laxmi Narayan 

    SQL Admin

    Tuesday, October 30, 2018 11:27 AM