SfB Server 2015: Pool Pairing with CMS and AlwaysON

We already publish guides to Deploying SQL Server AlwaysOn Availability Group for Skype for Business Server 2015 and also SfB Server: Moving Central Management to a pool with SQL Server AlwaysOn BackEnd.

However, we were asked to create another guide when we want to pair two SfB Enterprise Pools where the Primary Pool is hosting the Central Management Store (CMS).

Please note that in this scenario we use the SQL Server Defaults Paths.

Step 1 – Create CMS database in secondary pool back end

First, we need to take note of which SQL Server node is Primary in the SfB Backup Pool. In the following example, SQL01BCK is the active node:

Now in a Skype for Business PowerShell execute the following cmdlet:

Install-CsDatabase -CentralManagementDatabase -SqlServerFqdn SQL01BCK.recore.lab -SqlInstanceName SFBBEBCK -UseDefaultSqlPaths
https://docs.microsoft.com/powershell/module/skype/Install-CsDatabase

Note: We need to specify the FQDN of the SQL Server active node and not the AlwaysOn SQL Listener.

The databases are created but not part of the AlwaysOn Availability Group:

Step 2 – Add the CMS databases to the AlwaysOn Availabilty Group

Open a PowerShell on the active SQL Server in the Backup Pool Back End, and set the Recovery to Full and Perform a Full Backup:

Invoke-Sqlcmd -ServerInstance SQL01BCK\SFBBEBCK -Query “ALTER DATABASE [xds] SET RECOVERY FULL WITH NO_WAIT;”
Invoke-Sqlcmd -ServerInstance SQL01BCK\SFBBEBCK -Query “ALTER DATABASE [lis] SET RECOVERY FULL WITH NO_WAIT;”

Backup-SqlDatabase -ServerInstance SQL01BCK\SFBBEBCK -Database xds
Backup-SqlDatabase -ServerInstance SQL01BCK\SFBBEBCK -Database lis

Since in this scenario we use the SQL Server Defaults Paths, we don’t need to copy the folder structures using RoboCopy.

Now in SQL Management Studio, right click in the existent AlwaysOn Availability Group and Add Database:

In the Wizard, select both CMS databases:

Like when we configured AlwaysOn we need to specify a temporary shared folder:

Make sure all check in the validation are successful:

And finally the CMS databases will be added to the AlwaysOn Availability Group:

Step 3 – Add the necessary permissions to the secondary SQL Server node

In the previous guides related to AlwaysOn it was suggested to change the topology builder, however, we can simplify this without republishing the topology.

In the SQL Management Studio failover the AlwaysOn Availability Group:

Select the New Primary Replica:

After connecting to replica, the failover should be successful:

Back in the Skype for Business PowerShell and we execute the following cmdlet:

Install-CsDatabase -Update -CentralManagementDatabase -SqlServerFqdn SQL02BCK.recore.lab -SqlInstanceName SFBBEBCK -UseDefaultSqlPaths

Step 4 – Configure Pool Pairing

In the Topology Builder, edit the Primary Pool and associate the Backup Pool:

Now we publish the topology but unchecked the CMS creation since we already manually created it:

Here is the to-do list:

Update Skype for Business Server with the changes defined in the topology by running local Setup on each server in the following list.
Important: Server changes made in Topology Builder must replicate to the servers in your topology. Please confirm that replication has been successful before proceeding setup.
Server FQDN: sfbfe01.recore.lab, Pool FQDN: sfbpool.recore.lab
Server FQDN: sfbfe02.recore.lab, Pool FQDN: sfbpool.recore.lab
Server FQDN: sfbfe03.recore.lab, Pool FQDN: sfbpool.recore.lab
Server FQDN: sfbfe01bck.recore.lab, Pool FQDN: sfbpoolbck.recore.lab
Server FQDN: sfbfe02bck.recore.lab, Pool FQDN: sfbpoolbck.recore.lab
Server FQDN: sfbfe03bck.recore.lab, Pool FQDN: sfbpoolbck.recore.lab

The databases listed are not part of an AlwaysOn Availability Group. You can use the New Availability Group Wizard in the SQL Server Management Studio to create an Availability Group. You should make sure that the databases are installed before running the ‘New Availability Group Wizard’.
SQL Server instance: sqlpoolbck.recore.lab\sfbbebck, Stores: CentralMgmt

Run the Invoke-CsBackupServiceSync cmdlet to ensure conferencing data is replicated.
Invoke-CsBackupServiceSync -PoolFqdn sfbpool.recore.lab
Invoke-CsBackupServiceSync -PoolFqdn sfbpoolbck.recore.lab

On all SfB Front End servers that are part of both pools we need to run SfB Deployment Wizard Step 2:

After Step 2, the Backup Service will be installed on the Front End Servers that belong to the Primary Pool:

And in the Front End Servers that are part of Backup Pool will have Backup, FTA and Master Replica Services:

Start the stopped services, invoke the backup sync and verify that it was successful:

Invoke-CsBackupServiceSync -PoolFqdn sfbpool.recore.lab
Invoke-CsBackupServiceSync -PoolFqdn sfbpoolbck.recore.lab
https://docs.microsoft.com/powershell/module/skype/Invoke-CsBackupServiceSync

Get-CsBackupServiceStatus -PoolFqdn sfbpool.recore.lab | fl
Get-CsBackupServiceStatus -PoolFqdn sfbpoolbck.recore.lab | fl
https://docs.microsoft.com/powershell/module/skype/Get-CsBackupServiceStatus