Wednesday, April 21, 2010

SQL Server Database Mirroring

Today, I helped to troubleshoot a failing database mirroring which has its status showing as disconnected. The principle server is complaining that it is not able to "communicate" with the mirror server. I removed the mirror and tried to create a new one but I was thrown with an error message similar with the one below.

Msg 1418, Level 16, State 1, Line 1The server network address "TCP://myserver.domain.domain.domain.com:5022" can not be reached or does not exist. Check the network address name and reissue the command.

I had checked that the FQDN is pingable, able to telnet port 5022 of the mirror server, the endpoint status for both servers were started and the database on the mirror server was properly restore with the NORECOVERY option.

After spending a few hours trying to solve the mystery, I decided to drop the endpoints setup on both servers and re-create the it. I re-created the the mirroring from scratch and still it did not work. Then I noticed that there are two other instances of SQL running and with database mirroring setup. One of the instance is using port 5023 for its endpoints and the other one is using 5022!!! The port 5022 was already taken up. So I changed the endpoint port to 8022 for the default instance and it worked!!! Case closed.

1 comment:

digitalhts said...

This is a great inspiring article. I am pretty much pleased with your good work. otherwise anyone wants to learn Revit MEP Course so contact here- +91-9311002620 or visit website- https://www.htsindia.com/Courses/cad-cam-cae/autodesk-revit-mep-training-course