SfB Server 2015: Event 57005, LS User Store Sync Agent – Could not find stored procedure XdsQueryCriticalDocumentSignatures

While updating our SfB Server 2015 lab, we notice that a recently updated Front End server had multiple errors and warnings in the Event Viewer:

Log Name: Lync Server
Source: LS User Store Sync Agent
Date: 12/09/2017 21:54:33
Event ID: 57005
Task Category: (1061)
Level: Error
Keywords: Classic
User: N/A
Computer: sfbfe03.recore.lab
Description:
Error encountered pushing data to RtcXds Blob Store

#CTX#{ctx:{traceId:10006, activityId:”e40d8197-4293-4146-9d72-03c0c2957f6c”}}#CTX#
Push cycle identifier: [sfbfe03.recore.lab.2fd688f5-0f3a-407f-bab5-3fa5c3757443]
ItemCount: [0]
Error Message: [PushController: XdsQueryCriticalDocumentSignatures failed: System.Data.SqlClient.SqlException (0x80131904): Could not find stored procedure ‘XdsQueryCriticalDocumentSignatures’.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
at System.Data.SqlClient.SqlDataReader.get_MetaData()
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
at System.Data.SqlClient.SqlCommand.ExecuteReader()
at Microsoft.Rtc.Common.Data.DBCore.Execute(SprocContext sprocContext, SqlConnection sqlConnection, SqlTransaction sqlTransaction)
ClientConnectionId:e597ef79-3a87-4d08-8561-8e8c0db10e37
Error Number:2812,State:62,Class:16]
Cause: Possible issues with back-end database.
Resolution:
Ensure the back-end is functioning correctly.

Log Name: Lync Server
Source: LS User Store Sync Agent
Date: 12/09/2017 21:54:33
Event ID: 57006
Task Category: (1061)
Level: Warning
Keywords: Classic
User: N/A
Computer: sfbfe03.recore.lab
Description:
RtcDb Sync Agent sproc failed

#CTX#{ctx:{traceId:10006, activityId:”e40d8197-4293-4146-9d72-03c0c2957f6c”}}#CTX#
Sproc: [XdsQueryCriticalDocumentSignatures]
Exception: [System.Data.SqlClient.SqlException (0x80131904): Could not find stored procedure ‘XdsQueryCriticalDocumentSignatures’.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
at System.Data.SqlClient.SqlDataReader.get_MetaData()
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
at System.Data.SqlClient.SqlCommand.ExecuteReader()
at Microsoft.Rtc.Common.Data.DBCore.Execute(SprocContext sprocContext, SqlConnection sqlConnection, SqlTransaction sqlTransaction)
ClientConnectionId:e597ef79-3a87-4d08-8561-8e8c0db10e37
Error Number:2812,State:62,Class:16]

The error message mentions that XdsQueryCriticalDocumentSignatures store procedure is missing from RTCXDS database, after checking the version for this particular database, we notice that a new version was available:

Test-CsDatabase -ConfiguredDatabases -SqlServerFqdn sqlpool.recore.lab | Select SqlServerFqdn, SqlInstanceName, DatabaseName, InstalledVersion, ExpectedVersion | ft -AutoSize

A complete database version list for Skype for Business Server 2015 is available here:

Doug Deitterick’s Blog – How to Verify if Skype for Business Server 2015 Database Updates Completed Successfully
https://blogs.technet.microsoft.com/dodeitte/2015/05/10/how-to-verify-if-skype-for-business-server-2015-database-updates-completed-successfully/

Please note that XdsQueryCriticalDocumentSignatures store procedure was added in the May 2017 Cumulative Update for SfB Server 2015.

After we finish updating the remaining Front End servers and updated the RTCXDS database on the SfB Back End, we didn’t get more Errors/Warnings related to the missing XdsQueryCriticalDocumentSignatures store procedure.

We need to make sure that we follow the steps described for each Lync/SfB Server version:

Updates for Lync Server 2010
http://support.microsoft.com/kb/2493736

Updates for Lync Server 2013
http://support.microsoft.com/kb/2809243

Updates for Skype for Business Server 2015
http://support.microsoft.com/kb/3061064

SfB Server: Cannot install KB2982006 – This update is not applicable to your computer.

Update 2018/01/31 – Please note that the fix for this is included in the Skype for Business January 2018 Cumulative Update (CU6 HF1)

Prerequisite (KB2982006) not satisfied when you try to install Skype for Business Server 2015
https://support.microsoft.com/kb/4056288

In a recent deployment with all the Windows Updates installed, including the KB2919442 and KB2919355,  we couldn’t install the KB2982006:

We also got the same error in the Event Viewer > Windows Logs > Setup:

Log Name: Setup
Source: Microsoft-Windows-WUSA
Date: 04/09/2017 18:48:44
Event ID: 3
Task Category: None
Level: Error
Keywords:
User: RECORE\Administrator
Computer: sfbstd.recore.lab
Description:
Windows update could not be installed because of error 2149842967 “” (Command line: “”C:\Windows\system32\wusa.exe” “C:\UCLobby\Windows8.1-KB2982006-x64.msu” “)

The good news is we can use the DISM tool to manually add the KB2982006.

Before using DISM we need to make sure that KB2919442 and KB2919355 are already installed:

Get-Hotfix KB2919442,KB2919355,KB2982006

Please note that we cannot use a .msu file if we use the Online switch with DISM:

dism /Online /Add-Package /PackagePath:C:\UCLobby\Windows8.1-KB2982006-x64.msu

We have to expand the .msu file first using the steps described here:

How to use DISM to install a hotfix from within Windows
https://blogs.technet.microsoft.com/askcore/2011/02/15/how-to-use-dism-to-install-a-hotfix-from-within-windows/

An easy way is to create a folder and copy the Windows8.1-KB2982006-x64.msu file and also create a KB2982006 sub-folder:

Then we expand the .msu with the following cmdlet:

Expand -F:* C:\UCLobby\Windows8.1-KB2982006-x64.msu C:\UCLobby\KB2982006
https://technet.microsoft.com/en-gb/library/cc722332(v=ws.10).aspx

Since we have a .cab file we can proceed and manually add the KB2982006 with DISM:

dism /Online /Add-Package /PackagePath:C:\UCLobby\KB2982006\Windows8.1-KB2982006-x64.cab

With Get-Hotfix we confirm that KB2919442, KB2919355 and KB2982006 are installed:

Get-Hotfix KB2919442,KB2919355,KB2982006

Finally, we run Step 2 and confirm that the check for KB2982006 is successful:

 

Lync/SfB: Quickly access the Certificate Store

In a previous post we wrote about the Checks to do in the Lync/Skype for Business Server Certificate Store, however, sometimes we might also want to manually check it using the Certificate Store MMC.

Since Windows Server 2012 and Windows 8 we can quick access the Certificate Store MMC, for Local Computer and Current User, using Command Prompt/PowerShell or the Windows Search:

Local Computer

certlm

Note: Using the Windows Search we need to add the .msc – certlm.msc

Current User

certmgr

Note: Using the Windows Search we need to add the .msc – certmgr.msc 

Please also check the original post:

PKI Tip: Certificate Store Shortcuts
https://blogs.technet.microsoft.com/xdot509/2013/06/10/pki-tip-certificate-store-shortcuts/