title: Mirroring - server network address cannot be reached or does not exist
body: <p>I have read a number of articles on how to configure mirroring on SQL Server 2012. I went through the steps and everything worked until hitting the final step, which didn't work.</p>
  
  <p>When I run this on the Principal:</p>
  
  <blockquote>
    <p>ALTER DATABASE MyDBName SET PARTNER = 'TCP://1.2.3.4:5022';</p>
  </blockquote>
  
  <p>I get this error:</p>
  
  <blockquote>
    <p>The server network address "TCP://1.2.3.4:5022" can not be
    reached or does not exist.</p>
  </blockquote>
  
  <p>When I run the counterpart ALTER statement shown above, but on the Mirror, it works fine.</p>
  
  <p>I have tried all the steps in this <a href="http://blog.sqlauthority.com/2010/01/11/the-server-network-address-tcpsqlserver5023-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-microso/" rel="noreferrer">troubleshooting article</a>.</p>
  
  <p>Important points:</p>
  
  <ol>
  <li>The Primary and Mirror servers are in different datacenters, not on the same network at all. Not connected by VPN. Completely untrusted by each other.</li>
  <li>I can connect to the Mirror via SSMS on the Primary and run queries. And vice versa.</li>
  <li>I configured certificates on each server to establish the trust relationship. Everything worked during the setup and config, no errors.</li>
  <li>I configured the endpoints on both servers and verified they're active/enabled.</li>
  <li>I opened port 5022 on both servers by configuring incoming and outgoing windows firewall rules. I can telnet to the Mirror from the Principal and vice versa - ports appear open, no problems.</li>
  <li>In the troubleshooting guide mentioned above, I tried steps 1-6. I didn't try 7, deleting the endpoints and re-creating, because they look perfectly valid and active to me.</li>
  </ol>
  
  <p>Looking for some ideas on this one.</p>