Although is not a direct Lync issue, in a Enterprise deployment pool we use SQL mirroring for database high availability. I’ve found a strange issue that affected 1/4 of the SQL servers. I wasn’t unable to identify precisely the root cause, but here’s some clues and a workaround.
The SQL mirror node might not start correctly after the server reboot (it can also only fail after a second restart).
This as been observed on Windows 2012 Servers.
When you try to get the database mirror state from Lync PS it will show you that the mirror is not enabled/disconnected/DatabaseInaccessibleOrMirroringNotEnabled:
SELECT type_desc,state_desc FROM sys.database_mirroring_endpoints
Further log investigation will show that the SQL server at initial startup reports that the mirror endpoint configuration is disable for each database:
‘Database Mirroring Transport is disabled in the endpoint configuration‘
A few lines later on the log you will see the mirror endpoint being enabled, but the databases remain at ‘in recovery’ state.
I still cannot pinpoint the exact cause, but it looked at first it was caused by two updates installed at the same time:
* KB3147071 (this is not a security update) – “Connection to Oracle database fails when you use Microsoft ODBC or OLE DB Driver for Oracle or Microsoft DTC in Windows”
* KB3146706 – (this is an important security updates) – “Security update for Windows OLE”
NOTE: the other updates on the pictures were also removed at the same time, but from the KB information I don’t see a relation with the main issue.
(a) The only effective ‘quick fix’ is to force, on the affected SQL server, the mirrror endpoint status to ‘started’ with the SQL query:
ALTER ENDPOINT mirroring_endpoint STATE = STARTED
Attention!: ‘mirroring_endpoint’ is the default name created by Lync/Skype4B setup commands. You might need to confirm the enpoint name using the query:
SELECT name,type_desc,state_desc FROM sys.database_mirroring_endpoints
(b) Restarting the SQL services will also solve the issue
(c) rebooting the server can sometimes solve the issue (only do this if you don’t have rights to manage/restart the SQL server)
The above workarounds will not solve the issue the next time you need to reboot the server.
(not the) SOLUTION
(2) Install KB3146706 again and restart the server. (3) (optional) install KB3147071 (4) reboot the server (at least) twice to check if the mirror starts sucessfully
Update 17/05: The sugested solution was not effective. After 24 hours I restarted the server and the issue is back 😦