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 🙂
The infrastructure had the following servers:
- LAB-DC01 (domain controller)
- LAB-LyncPool.lyncdude.local (Lync frontend enterprise pool) consist of:
- LAB-SQL01 (Existing SQL Store + planned to be decommissioned)
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”.
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
So the plan is to deploy / Configure the following Servers:
- 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.
I didn’t install the Update in the following step, left it to be done by their administrator in their scheduled patch day
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
Made sure that required Mirroring Ports are allowed between the nodes, follow this Article to prepare your firewall
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:
- Started a Lync Management Shell with account member of RTCUniversalServerAdmins
- Used the following PowerShell cmdlet (refer to my pervious article on how to move CMS):
C:> Install-CsDatabase -CentralManagementDatabase -SqlServerFqdn “LAB-LYSTD.lyncdude.local”
- Made sure that Replication is finished using Get-CsManagementStoreReplicationStatus
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