SQL Mirror Failure


  • Got this error when Publishing the Topology. Seems to fail on the mirror creation for the Archive and Monitoring databases. However, the Lync CMS databases worked correctly. Can you not have the same Mirror Port?

      Error: An error occurred: "Microsoft.Rtc.Management.Deployment.MirrorDatabaseException" "Cannot set up mirroring because there is an error configuring endpoint "mirroring_endpoint" of type "DatabaseMirroring" and role type "Partner" on database server "cldbprod05.domain.internal\LyncArchive". Exception: Microsoft.SqlServer.Management.Smo.FailedOperationException: Start failed for Endpoint 'mirroring_endpoint'. ---> Microsoft.SqlServer.Management.Common.ExecutionFailureException: An exception occurred while executing a Transact-SQL statement or batch. ---> System.Data.SqlClient.SqlException: The Database Mirroring endpoint cannot listen on port 5022 because it is in use by another process.


    MCITP Exchange 2010 | MCTS Exchange 2007 | MCITP Lync Server 2010 | MCTS Windows 2008 | MCSE 2003

    Monday, June 10, 2013 5:19 PM


All replies

  • If the destination SQL Server for the mirror is hosting mirrors for other servers, you will need to change the mirror port to an available port (example 5023 via Topology Builder).

    Monday, June 10, 2013 5:49 PM
  • Are you by any chance specifying the mirroring port as the same port you have nominated for the Archive SQL instance?

    Monday, June 10, 2013 7:09 PM
  • No, I chose Port 5022 for all mirror ports and Port 7022 for the Witness, which are the defaults. However, I do have static ports set up on the actual SQL instances, but don't see that as a problem. So, what you are saying is that I need to go back to the Topology Builder and try using different Mirror Ports for the Archive and Monitoring databases?

    MCITP Exchange 2010 | MCTS Exchange 2007 | MCITP Lync Server 2010 | MCTS Windows 2008 | MCSE 2003

    Monday, June 10, 2013 7:46 PM
  • The error is saying 5022 is already in use, so you will need to use a port that is available. This is done in the Topology Builder.
    Monday, June 10, 2013 8:26 PM
  • Any updates?

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

    Friday, June 14, 2013 9:12 AM
  • I'm having the same issue.  One SQL 2012 server with two SQL instances for Lync DBs and Monitoring/Archiving.  I was abled to mirrored the Lync DBs but when  I tried to mirror the Monitoring/Archiving, i get the same error.  i haven't been able to figure out how to change the mirroring (endpoint) port to 5023 on the 2nd SQL instance.  Any ideas?  Thank you.
    Thursday, October 10, 2013 8:26 PM