Thursday, December 12, 2024

[RESOLVED] “Could not find stored procedure” after installing SfB Server Updates

After you patched your Skype for Business environment you might have noticed the error “Could not find stored procedure …” in your event logs and wish to solve that now.

The full error is

Log Name:      Lync Server
Source:        LS User Store Sync Agent
Date:          20.06.2017 15:40:13
Event ID:      57005
Task Category: (1061)
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      front01.emea.int.contoso
Description:
Error encountered pushing data to RtcXds Blob Store

#CTX#{ctx:{traceId:10006, activityId:"bc245a8b-606c-46ad-93ad-d19def7a475c"}}#CTX#
Push cycle identifier: [front01.emea.int.contoso.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, Boolean isInternal, Boolean forDescribeParameterEncryption)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   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:23dd4a87-ae6f-4a5d-8075-a1b097495ab2
Error Number:2812,State:62,Class:16]
Cause: Possible issues with back-end database.
Resolution:
Ensure the back-end is functioning correctly.
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="LS User Store Sync Agent" />
    <EventID Qualifiers="50213">57005</EventID>
    <Level>2</Level>
    <Task>1061</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2017-06-20T13:40:13.000000000Z" />
    <EventRecordID>1002155</EventRecordID>
    <Channel>Lync Server</Channel>
    <Computer>front01.emea.int.contoso</Computer>
    <Security />
  </System>
  <EventData>
    <Data>#CTX#{ctx:{traceId:10006, activityId:"bc245a8b-606c-46ad-93ad-d19def7a475c"}}#CTX#</Data>
    <Data>front01.emea.int.contoso.2fd688f5-0f3a-407f-bab5-3fa5c3757443</Data>
    <Data>0</Data>
    <Data>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&amp; 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, Boolean isInternal, Boolean forDescribeParameterEncryption)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task&amp; task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task&amp; task, Boolean&amp; usedCache, Boolean asyncWrite, Boolean inRetry)
   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:23dd4a87-ae6f-4a5d-8075-a1b097495ab2
Error Number:2812,State:62,Class:16</Data>
  </EventData>
</Event>

and/or

Log Name:      Lync Server
Source:        LS User Store Sync Agent
Date:          20.06.2017 15:45:27
Event ID:      57006
Task Category: (1061)
Level:         Warning
Keywords:      Classic
User:          N/A
Computer:      front01.emea.int.contoso
Description:
RtcDb Sync Agent sproc failed

#CTX#{ctx:{traceId:10006, activityId:"bc245a8b-606c-46ad-93ad-d19def7a475c"}}#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, Boolean isInternal, Boolean forDescribeParameterEncryption)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   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:23dd4a87-ae6f-4a5d-8075-a1b097495ab2
Error Number:2812,State:62,Class:16]
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="LS User Store Sync Agent" />
    <EventID Qualifiers="33829">57006</EventID>
    <Level>3</Level>
    <Task>1061</Task>
    <Keywords>0x80000000000000</Keywords>
    <TimeCreated SystemTime="2017-06-20T13:45:27.000000000Z" />
    <EventRecordID>1002167</EventRecordID>
    <Channel>Lync Server</Channel>
    <Computer>front01.emea.int.contoso</Computer>
    <Security />
  </System>
  <EventData>
    <Data>#CTX#{ctx:{traceId:10006, activityId:"bc245a8b-606c-46ad-93ad-d19def7a475c"}}#CTX#</Data>
    <Data>XdsQueryCriticalDocumentSignatures</Data>
    <Data>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&amp; 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, Boolean isInternal, Boolean forDescribeParameterEncryption)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task&amp; task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task&amp; task, Boolean&amp; usedCache, Boolean asyncWrite, Boolean inRetry)
   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:23dd4a87-ae6f-4a5d-8075-a1b097495ab2
Error Number:2812,State:62,Class:16</Data>
  </EventData>
</Event>

Solution:

If you run a (as mentioned here)

Test-CsDatabase -ConfiguredDatabases -SqlServerFqdn sql01.int.contoso.com | ft databasen*,Expe*,Inst*,Suc* -AutoSize

You should see that the expected version (for example for rtcxds) isn´t the correct one:

DatabaseName ExpectedVersion InstalledVersion Succeed
------------ --------------- ---------------- -------
rtcxds       15.13.11        15.13.10            True
rtcshared    5.0.1           5.0.1               True
rtcab        62.42.12        62.42.12            True
rgsconfig    5.5.1           5.5.1               True
rgsdyn       2.2.1           2.2.1               True
cpsdyn       1.1.2           1.1.2               True
LcsCDR       39.85.10        39.85.10            True
QoEMetrics   62.93.12        62.93.12            True
mgc          1.42.1          1.42.1              True

To fix the issue you need to update the DBs via:

Install-CsDatabase -ConfiguredDatabases -SqlServerFqdn sql01.int.contoso.com  -DatabasePaths “H:\Databases”,”G:\T-Logs” -Verbose

More infos can be found in the article “Skype for Business Server DB update needed after patch management” here.

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Stay Connected

35FollowersFollow
- Advertisement -

Latest Articles