SQL Server 2008 R2 Mirroring issues

by RCaballero   Last Updated July 24, 2015 13:02 PM

I have this very frustrating problem that I've been trying to figure out for almost a week now. I have two SQL Server 2008 R2 STD w/SP3 box running on Windows 2012 R2 with two instances each, Server1 is the PRIMARY and Server2 is the MIRROR. Server2 was purchased for the purpose of mirroring so no live DBs yet. But Server1 is already in production. So here's the complete detailed setup for both.

Created a domain\user account and used it for both Servers' SQLService

Principal Server Configuration

  • Name: SERVER1.domain.com
  • NIC1 : 172.xx.xx.80
  • NIC2 : 172.xx.xx.81 (use for mirroring)
  • Named Instances: INSTANCE1 and INSTANCE2

Mirror Server Configuration

  • Name: SERVER2.domain.com
  • NIC1 : 172.xx.xx.82
  • NIC2 : 172.xx.xx.83 (use for mirroring)
  • Named Instances: INSTANCE1 and INSTANCE2

NO WITNESS YET

Static A records in DNS server

172.xx.xx.81 dbm-pri.domain.com and 172.xx.xx.83 dbm-mir.domain.com

Here's what's done on both servers:

  1. checked SQL Server Config Manager and made sure TCP is enabled, then added the ports to be used in IPAll field

  2. restarted the SQL Service (at one point of despair I restarted the servers itself, yes even the one running on production)

  3. run netstat and confirmed that the endpoint ports are LISTENING, (sqlserver.exe), also run ping and tracert all tests are good

  4. from both PRINCIPAL and MIRROR, ran telnet FQDN port, confirmed that I can connect from/to both

  5. created the endpoints on both servers

PRINCIPAL

    CREATE ENDPOINT INSTANCE1_EndPoint
       STATE=STARTED
       AS TCP (LISTENER_PORT=6025,LISTENER_IP=(172.xx.xx.81))
       FOR DATABASE_MIRRORING (ROLE=PARTNER)

MIRROR

    CREATE ENDPOINT INSTANCE1_EndPoint
       STATE=STARTED
       AS TCP (LISTENER_PORT=6025,LISTENER_IP=(172.xx.xx.83))
       FOR DATABASE_MIRRORING (ROLE=PARTNER)
  1. granted CONNECT permission to the domain\user account

    CREATE LOGIN [domain\user] 
    FROM WINDOWS 
    WITH DEFAULT_DATABASE=[master], DEFAULT_LANGUAGE=[us_english]
    GO
    
    GRANT CONNECT on ENDPOINT::INSTANCE1_EndPoint TO [domain\user]
    GO
    
  2. backed up and restored the DB and logs with NO RECOVERY

  3. ran alter db set partner on the mirror server

    ALTER DATABASE DBName SET PARTNER = 'TCP://dbm-pri.domain.com:6025'
    
  4. ran alter db set partner on principal server

    ALTER DATABASE DBName SET PARTNER = 'TCP://dbm-mir.domain.com:6025'
    

    Error:

    Msg 1418, Level 16, State 1, Line 1
    The server network address "TCP://dbm-mir.domain.com:6025" can not be reached or does not exist...

  5. tested netstat, ping, tracert and telnet on both Servers, all are successful

I've tried re doing this so many times now and I'm lost for ideas



Related Questions


DB Mirroring setup?

Updated May 17, 2016 08:02 AM




Mirroring and Replication

Updated November 14, 2017 08:06 AM