So you have implemented a Lync Server SQL Database Mirror with a Witness but now want to move away from having a Witness but how do you successfully do this? Well do not fear I have decided to do exactly that in my Lab environment.
So what’s in my Lab
- 1 2008r2 Domain Controller called DC01
- 3 Lync Enterprise Front Ends in a pool called pool1.lyncme.local
- 3 2012 SQL Servers
- DB01 – Primary
- DB02 – Mirror
- DB03 – Witness
So to start you will need to open the Topology Builder and uncheck the Witness Server tick box as seen below. This option is located under the Lync Enterprise Pool.
And publish the topology, you may get asked the following
You will need to Specify the File Share Path so a copy of the Primary Database will be created but the Primary Server will need write permission to the location and the Mirror Server will need Read Permission. I am going to point the path to the Mirror Server as its only a copy of the Primary Database to the Mirror Server which serves as a backup.
Press Next to continue, the topology should successfully published but one important thing you will need to make note of. If you click Open-to-do List it will tell you run Uninstall-CsMirrorDatabase cmdlet. You didnt need to run this command if you are only removing Lync Witness, if you run the command it will uninstall the Mirror as well.
Now time for the SQL Bit
We need to turn the Witness on the SQL Database so you will need to connect to your Primary SQL Server and open the SQL Server Management Studio as per below
We will need to remove the Witness Path from all Lync Databases held within this instance. As this instance is only used for Microsoft Lync it gives you a better look at would databases you need to do.
Right Click Database and go to Properties. Once the properties window has opened you will need to Click on Mirroring on the left hand pane. You will now see the below window.
Remove the TCP Path from the Witness Box and Press OK. You will need to repeat this process for the rest of the databases and once complete we can proceed to the next step.
You could also run a SQL Query to remove the Witness information if you want to script the process but using the commands below.
- Connect to the Database Engine on either partner server instance.
- From the Standard bar, click New Query.
- Issue the following statement:
ALTER DATABASE database_name SET WITNESS OFF
Now we have completed removing the Witness information you need to do the following process to complete this task. The following is recommended by Microsoft
Turning off the witness changes the operating mode in accordance with the transaction-safety setting:
- If transaction safety is set to FULL (the default), the session uses high-safety, synchronous mode without automatic failover.
- If transaction safety is set to OFF, the session operates asynchronously (in high-performance mode) without requiring quorum. Whenever transaction safety is turned off, we strongly recommend also turning the witness off.
This completes this blog post