Migrate Lync 2013 Standalone SQL to SQL Mirrored Store Step – By – Step PART-I

Howdy,

I got a request to move the SQL backend store of a Lync 2013 Enterprise Edition pool deployment, from a standalone to a dedicated Mirrored SQL Servers Store for high availability.

Was an interesting task as I am very bad with SQL technologies, so I researched and did my homework and tested it in my lab, before I applied it to the customer which was a good success, so I thought I will write a How-to , step by step to the point guide to help anyone that might have to do so one day 🙂

Overview

The infrastructure had the following servers:

  • LAB-DC01 (domain controller)
  • LAB-LyncPool.lyncdude.local (Lync frontend enterprise pool) consist of:
  • LAB-LYFE01
  • LAB-LYFE02
  • LAB-LYFE03
  • LAB-SQL01 (Existing SQL Store + planned to be decommissioned)

Problem

What you must know is that there is no easy direct way to do the migration of the SQL store, especially if you have only one Pool in your Topology as this pool will be hosting the Central Management Server, and if you try to edit it in the Topology builder or define a new SQL Store, you will see the lovely warning:

“Note: You cannot move the user store for this pool because this pool also hosts the central Management Server. To Move the user store to another SQL Instance….etc.”

Note: If the existing SQL Store is not planned to be decommissioned and can still be used then follow this guide, but you don’t need to move your CMS to another pool, you need to prepare the 2nd SQL node and your witness and then follow this guide from “Enable Mirroring in the Topology”.

Solution

So I decided that what I can do is (maybe there is a better way that I don’t know about):

  • Deploy a Standard Edition Lync 2013 Pool
  • Prepare 3 machine to host the New Mirrored SQL store
  • Plan a downtime
  • Move the CMS to the new Standard Edition Pool
  • Define new mirrored SQL store for the Lync Enterprise Edition Pool
  • Move the CMS back to the Enterprise Edition Pool
  • Decommission the Standard Edition Pool

Implementation

So the plan is to deploy / Configure the following Servers:

  • LAB-LYSTD01
  • LAB-SQL02 (Installed SQL 2012 Server) – Primary
  • LAB-SQL03 (Installed SQL 2012 Server) – Mirrored
  • LAB-SQL04 (Installed SQL 2012 Express) – Witness

Deploy SQL Servers & Witness

So I got 3 machines to use as the new dedicated SQL Store for the Lync Enterprise Pool, I started by installing all required windows security updates and patches.

Then I asked for 4 domain services accounts to be used by the SQL services (maybe two would have been enough but again, I’m not SQL expert)

  • lyncdude.localsql02-SA (SQL02 Server Agent Service account)
  • lyncdude.localsql02-dbe (SQL02 Server Database Engine Service account)
  • lyncdude.localsql03-SA (SQL03 Server Agent Service account)
  • lyncdude.localsql03-dbe (SQL03 Server Database Engine Service account)

Then I installed SQL 2012 Server on LAB-SQL02, which will be the new primary SQL Store, the following Screenshots shows you what you need to do step by step, feel free to edit the steps with different setup path or database location, I used the default.

1

2

3

4

5

I didn’t install the Update in the following step, left it to be done by their administrator in their scheduled patch day

6

7

8

9

10

11

12

13

14

15

16

17

18

And that’s it, do the same for the second node that will host the Mirrored databases, just keep in mind to use the SQL services accounts created for it, so I did the same steps over again on the second node LAB-SQL03 using

the sql03_SA and sql03_DBE services accounts.

Configure the witness Server

On LAB-SQL04 the server I prepared to be the witness so I can count on Lync for Automatic Failover in case of a break on the primary node without administrator interfering.

I installed SQL 2012 Express on it using the default settings / configuration of the installation wizard.

Then I created a folder called “sqlshare” on the c: drive (\\LAB-SQL04.lyncdude.local\sqlshare\)and made sure I have the following permissions on it

  • For both SQL02 service accounts and Server I gave “readwrite” permission
  • For both SQL03 service accounts and Server I gave “read” permissions

Firewall Requirements:

Made sure that required Mirroring Ports are allowed between the nodes, follow this Article to prepare your firewall

http://technet.microsoft.com/en-us/library/jj204992.aspx

Move CMS to the new Standard Edition Pool

After I added a standard edition pool to the Topology, and installed it, updated it and made sure it is running same patch level as the already existing Enterprise Edition Pool, I moved the CMS to it with the following steps:

C:> Install-CsDatabase -CentralManagementDatabase -SqlServerFqdn “LAB-LYSTD.lyncdude.local”

Then

C:> Enable-CsTopology

  • Made sure that Replication is finished using Get-CsManagementStoreReplicationStatus

Then

C:> Move-CsManagementServer -TargetFqdn “LAB-LYSTD.lyncdude.local”

Ran the installation wizard on all affected nodes as recommended by the output of the Move-CsManagementServer command line (again refer to my Article on “Moving Central Management Store”)

In Part-II , I will continue with defining a new mirrored SQL store and finalizing the migration

Author: Lyncdude

A Senior Microsoft Unified Communications Consultant with more than 9 years of experience in Microsoft Exchange and Microsoft Lync Server / Skype for Business. Egyptian guy lives and works in Frankfurt - Germany. Worked Closely with Microsoft Dubai for 3 years designing , building and supporting Exchange and Lync Infrastructures. A Microsoft Certified ITP in Lync, Exchange and also attended Microsoft Partner Primer Filed Support Engineer T1 Training for Microsoft Lync 2010.

One thought on “Migrate Lync 2013 Standalone SQL to SQL Mirrored Store Step – By – Step PART-I”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s