Published on

December 24, 2009

Common Error in SQL Mirroring and How to Fix It

SQL Mirroring is a popular feature in SQL Server that allows for high availability and disaster recovery. However, it is not uncommon to encounter errors during the setup and configuration process. One of the most common errors that users face is the following:

The server network address “TCP://SQLServer:5023” cannot 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)

If you have encountered this error, don’t worry! There are several solutions that you can try to resolve the issue:

  1. Make sure that on the Mirror Server the database is restored with NO RECOVERY option: This is the most common problem that causes the error. Ensure that the database on the Mirror Server is restored with the NO RECOVERY option.
  2. Restore the latest LOG backup to the Mirror Server: Even if you have recently restored the full backup, try restoring the latest LOG backup from the Principal Server to the Mirror Server.
  3. Check if you can telnet to the ports: Use the command TELNET ServerName Ports (e.g., telnet SQLServerName 5023) to check if you can establish a connection to the specified ports. If not, there may be a network issue that needs to be resolved.
  4. Disable the firewall: Temporarily turn off the firewall on both the Principal and Mirror Servers to ensure that it is not blocking the communication between them.
  5. Verify that the endpoints are started: Check the state or state_desc column of the sys.database_mirroring_endpoints catalog view to see if the endpoints are started on both the Principal and Mirror Servers. If not, you can start the endpoints by executing an ALTER ENDPOINT statement.
  6. Grant connect permission on the endpoint: Execute the following command as a last resort: GRANT CONNECT ON ENDPOINT::Mirroring TO ALL. However, please note that this can be a security threat, so use it responsibly and consult with a security expert in your company.
  7. Delete and recreate the endpoints: If none of the above solutions work, you can try deleting the endpoints and recreating them.

If none of the above solutions fix your problem, you can leave a comment on this article, and I will update it with additional suggestions based on your feedback. However, please keep in mind that some of the suggested solutions may have security implications, so it’s important to review your system with a security expert.

SQL Mirroring can be a complex process, but with the right troubleshooting steps, you can overcome common errors and ensure the availability and reliability of your SQL Server.

Click to rate this post!
[Total: 0 Average: 0]

Let's work together

Send us a message or book free introductory meeting with us using button below.