The case of the “DatabaseInaccessibleOrMirroringNotEnabled”

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:

Lync-DBmirror-failure4The SQL management studio show the databases with the status ‘In Recovery’.
If you run the SQL query to check the mirror endpoint status it will show you that is started

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.

 (Potential) CAUSE

Lync-DBmirror-updatesI 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:
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

(1) Uninstall KB3147071 and KB3146706 and restart the server.

(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 😦



One thought on “The case of the “DatabaseInaccessibleOrMirroringNotEnabled”

  1. soder 10/05/2016 / 12:27

    Microsoft patch Q&A at its finest!

Leave a Reply

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

You are commenting using your 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 )

Google+ photo

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

Connecting to %s