In Part-I I wrote about what we can call “Preparation” to migrate the standalone SQL to Mirrored SQL,

Next is to define new SQL Mirrored Store for the enterprise Pool, install the mirrored database and move back the Central management store and server back to the Enterprise Pool and decommission the Standard Edition Pool.

Note: again, I had to do that, because my client wanted to decommission the current Standalone SQL hosting the Lync Enterprise SQL store, and used also by other technologies, they wanted to move the database to dedicated SQL store used only by Lync.

If you just want to make your Standalone SQL a Mirrored SQL store, all you need is to prepare one more SQL 2012 Server (or two in case you want a witness for Automatic failover – check Part-I) and carry on with following steps without moving the CMS to another Pool.

Define New SQL Store

If you already have Primary SQL Store defined, no need to do the following, start from Define Mirroring SQL Store

  • Start your Topology Builder
  • Expand your site >> Lync Server 2013 >> Enterprise Edition Front End Pools
  • Right Click the Enterprise Pool and select “Edit Properties”
  • Scroll down till “Associations”

· Under the SQL Server Store >> click “New”

  • In the “Define New SQL Server Store” window, put the name of the Primary SQL server, in my case it was the new primary server I deployed LAB-SQL02.lyncdude.local
  • Make sure that the Mirror Port is defined
  • Click Ok

Define Mirroring SQL Store

  • Check the box says “Enable SQL Server Store Mirroring”
  • Under “mirroring SQL Server Store” >> click “New”
  • In the Define New SQL Server Store, put the name of the 2nd SQL node you deployed and will be used for Mirroring, in my case it was “LAB-SQL03.lyncdude.local”

  • Click Ok

Define SQL Mirroring Witness

  • Check the box for the option “Use SQL Server Mirroring Witness to enable automatic failover”
  • And click “New”
  • In “Define New SQL Server Store” window >> put the name of your Witness Server in my case it was LAB-SQL04.lyncdude.local

  • Click Ok
  • Click Ok in the “Edit Properties” windows
  • Publish the topology

While publishing the topology, you will get like a red warning that “File Share is required”, here you need to define the file share you created on the Witness server

  • Click on the error
  • On the “Mirror Database Settings” window

And you are done 🙂

Install the Mirroring

Now last thing to do is to install the mirroring database using the powershell commad line

c:> Install-CsMirrorDatabase -ConfiguredDatabases -FileShare “File Share path” -SqlServerFqdn “Your Primary SQL server” -DropExistingDatabasesOnMirror -Verbose

So in my case it was the following:

c:> Install-CsMirrorDatabase -ConfiguredDatabases -FileShare \Lab-sql04.lyncdude.localsqlshare -SqlServerFqdn “LAB-SQL02.lyncdude.local” -DropExistingDatabasesOnMirror -Verbose

Press “Y” for yes and wait for it to finish

Now you have successfully deployed SQL Mirroring with witness for automatic failover.

Follow the same steps in PART-I and my previous article to move the Central management Store back to the enterprise pool, delete the old one and decommission the Standard edition deployed for the purpose of the SQL migration.

Till next time 🙂