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