web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Exception on update of any entity

(0) ShareShare
ReportReport
Posted on by 1,515

Hello All,

this error is occuring on update of any entity, i have already checked that no custom/default plugin is registered on "update of entity"

following is the error detail

Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=6.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: Generic SQL error.Detail:
<OrganizationServiceFault xmlns:i="www.w3.org/.../XMLSchema-instance" xmlns="schemas.microsoft.com/.../Contracts">
<ErrorCode>-2147204784</ErrorCode>
<ErrorDetails xmlns:d2p1="schemas.datacontract.org/.../System.Collections.Generic" />
<Message>Generic SQL error.</Message>
<Timestamp>2017-01-30T16:38:34.2499325Z</Timestamp>
<InnerFault i:nil="true" />
<TraceText>
[Autonumbering: Autonumbering.Invoker]
[95c6ca32-13a9-e311-aa21-002655573aa2: Autonumbering.Invoker: Create of lead]


[Microsoft.Crm.ObjectModel: Microsoft.Crm.Workflow.WorkflowNotificationPlugin]
[becdbb1b-ea3e-db11-86a7-000a3a5473e8: Notifies workflow that entity has been updated.]


</TraceText>
</OrganizationServiceFault>

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Aiden Kaskela Profile Picture
    19,696 on at

    Hi Shahzeb,

    That error message sure looks like there's a plugin running that isn't working correctly - apparently an auto-number plugin on create of the lead. If you're getting that error on every save it may be registered not on Lead specifically but for no entity, and it's being invoked by all records being saved.

    Hope this helps! I'd appreciate if you'd mark this as Answering your question.

    Thanks,

     Aiden

  • Bilal Ahmed Profile Picture
    270 on at

    Hi Aiden

    Autonumber is just a example, its coming on even sending a email, assiging a task etc means on every recording update. The text mark red in above question and Message "SQL Generic error" is generic between all errors

  • Suggested answer
    Nithya Gopinath Profile Picture
    17,078 on at

    Hi,

    If you have a CRM OnPremise instance, then you can enable Server Verbose Tracing which will allow you to see what is the true error behind the generic error "An error has occurred.. " type of error. You can easily achieve this by using one of the following:

    crmdiagtool2011.codeplex.com

    support.microsoft.com/.../how-to-enable-tracing-in-microsoft-dynamics-crm

    Hope this helps.

  • ShahXu Profile Picture
    1,515 on at

    Dear Nithaya,

    Thanks for replying after using diagnostics tool i got the following error log and i didn't find it usefull as well..

    look at it may be you get something

    # CRM Tracing Version 2.0
    # LocalTime: 2017-01-31 12:21:07.516
    # Categories: Application.*:Error;Deployment_Sdk.*:Error;Exception.*:Error
    # CallStackOn: No
    # ComputerName: CRMSRV
    # CRMVersion: 6.1.0000.0581
    # DeploymentType: OnPremise
    # ScaleGroup: 
    # ServerRole: AppServer, AsyncService, DiscoveryService, ApiServer, HelpServer, DeploymentService, SandboxServer, DeploymentManagementTools, VssWriter, EmailConnector
    
    [2017-01-31 12:21:07.516] Process: w3wp |Organization:7216af00-374b-41f1-b31a-35677fe29f20 |Thread: 11 |Category: Exception |User: e3ffd441-137a-e311-99c5-002655573aa2 |Level: Error |ReqId: 04dc8d29-0fb0-43e5-8d50-85b62b6e5de5 | CrmException..ctor ilOffset = 0x7
    at CrmException..ctor(String message, Exception innerException, Int32 errorCode, Boolean isFlowControlException) ilOffset = 0x7
    at CrmException..ctor(Exception innerException, Int32 errorCode, Object[] arguments) ilOffset = 0xB
    at SoapExtensionExceptionHandlerBase.PrivateGetCrmExceptionNoDependencies(Exception exception) ilOffset = 0xA8
    at SoapExtensionExceptionHandlerBase.GetCrmException(Exception exception) ilOffset = 0x0
    at PluginExceptionConvertor.ConvertPluginException(Exception originalException, Boolean isAsync, Boolean unwrapTargetInvocationException) ilOffset = 0x43
    at PluginExceptionConvertor.ConvertPluginException(Exception originalException, String pluginTrace, String assemblyName, String pluginType, String stepIdOrWorkflowGroup, String stepDescription, Boolean isAsync, Boolean addPluginTrace, Boolean unwrapTargetInvocationException) ilOffset = 0x29
    at VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context) ilOffset = 0x65
    at Pipeline.Execute(PipelineExecutionContext context) ilOffset = 0x65
    at MessageProcessor.Execute(PipelineExecutionContext context) ilOffset = 0x21C
    at InternalMessageDispatcher.Execute(PipelineExecutionContext context) ilOffset = 0xE4
    at ExtensiblePlatformMessageDispatcher.Execute(PipelineExecutionContext pluginContext) ilOffset = 0x0
    at ExtensiblePlatformMessageDispatcher.UpdateWithInvocationSource(BusinessEntity entity, FilterExpression filter, Int32 invocationSource, ExecutionContext context) ilOffset = 0xCE
    at ExtensiblePlatformMessageDispatcher.Update(BusinessEntity entity, FilterExpression filter, ExecutionContext context) ilOffset = 0x5
    at BusinessProcessObject.UpdateWithPipelineAndExtensions(IBusinessEntity entity, ExecutionContext context) ilOffset = 0x80
    at GenericActivityServiceBase.UpdateInternal(IBusinessEntity entityInterface, ExecutionContext context) ilOffset = 0xA7
    at CommunicationActivityServiceBase.Update(IBusinessEntity entity, ExecutionContext context) ilOffset = 0x1B
    at EmailService.Send(Guid emailId, Boolean issueSend, String trackingToken, ExecutionContext context) ilOffset = 0x575
    at RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) ilOffset = 0xFFFFFFFF
    at RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) ilOffset = 0x25
    at RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) ilOffset = 0x89
    at LogicalMethodInfo.Invoke(Object target, Object[] values) ilOffset = 0x4F
    at InternalOperationPlugin.Execute(IServiceProvider serviceProvider) ilOffset = 0x57
    at V5PluginProxyStep.ExecuteInternal(PipelineExecutionContext context) ilOffset = 0x200
    at VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context) ilOffset = 0x65
    at Pipeline.Execute(PipelineExecutionContext context) ilOffset = 0x65
    at MessageProcessor.Execute(PipelineExecutionContext context) ilOffset = 0x1C5
    at InternalMessageDispatcher.Execute(PipelineExecutionContext context) ilOffset = 0xE4
    at ExternalMessageDispatcher.ExecuteInternal(IInProcessOrganizationServiceFactory serviceFactory, IPlatformMessageDispatcherFactory dispatcherFactory, String messageName, String requestName, Int32 primaryObjectTypeCode, Int32 secondaryObjectTypeCode, ParameterCollection fields, CorrelationToken correlationToken, CallerOriginToken originToken, UserAuth userAuth, Guid callerId, Guid transactionContextId, Int32 invocationSource, Nullable`1 requestId, Version endpointVersion) ilOffset = 0x16E
    at OrganizationSdkServiceInternal.ExecuteRequest(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, UserAuth userAuth, Guid targetUserId, OrganizationContext context, Boolean returnResponse, Boolean checkAdminMode) ilOffset = 0x1F1
    at OrganizationSdkServiceInternal.ExecuteRequest(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, Boolean checkAdminMode) ilOffset = 0x2D
    at OrganizationSdkServiceInternal.Execute(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, Boolean checkAdminMode) ilOffset = 0x26
    at InprocessServiceProxy.ExecuteCore(OrganizationRequest request) ilOffset = 0x34
    at PlatformCommand.XrmExecuteInternal() ilOffset = 0xF6
    at Email.Send() ilOffset = 0x49
    at EmailSendCommand.ExecuteCommand(String commandXml) ilOffset = 0x128
    at CommandBase.Execute(String commandXml) ilOffset = 0x13
    at InlineEditWebService.Execute(Int32 command, String commandXml) ilOffset = 0xD0
    at RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) ilOffset = 0xFFFFFFFF
    at RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) ilOffset = 0x25
    at RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) ilOffset = 0x89
    at LogicalMethodInfo.Invoke(Object target, Object[] values) ilOffset = 0x4F
    at WebServiceHandler.Invoke() ilOffset = 0xC3
    at WebServiceHandler.CoreProcessRequest() ilOffset = 0x13E
    at SyncSessionlessHandler.ProcessRequest(HttpContext context) ilOffset = 0x39
    at HandlerWrapper.ProcessRequest(HttpContext context) ilOffset = 0x7
    at CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() ilOffset = 0x18D
    at HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) ilOffset = 0x15
    at ApplicationStepManager.ResumeSteps(Exception error) ilOffset = 0x10A
    at HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData) ilOffset = 0x5C
    at HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) ilOffset = 0x16A
    at ISAPIRuntime.ProcessRequest(IntPtr ecb, Int32 iWRType) ilOffset = 0x4B
    >Crm Exception: Message: Generic SQL error., ErrorCode: -2147204784, InnerException: System.Data.SqlClient.SqlException (0x80131904): The provided statistics stream is corrupt.
    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.ExecuteDbDataReader(CommandBehavior behavior)
    at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader()
    at Microsoft.Crm.CrmDbConnection.InternalExecuteWithRetry[TResult](Func`1 ExecuteMethod, IDbCommand command)
    at Microsoft.Crm.CrmDbConnection.InternalExecuteReader(IDbCommand command, Boolean capturePerfTrace)
    at Microsoft.Crm.CrmDbConnection.ExecuteReader(IDbCommand command, Boolean impersonate, Boolean capturePerfTrace)
    at Microsoft.Crm.BusinessEntities.BusinessProcessObject.ExecuteQuery(CrmDbConnection dbConnection, IDbCommand command, ISqlExecutionContext context, Nullable`1 commandTimeout)
    at Microsoft.Crm.Workflow.WorkflowNotificationPlugin.ResumeAsyncOperations(Guid entityId, String entityName, ExecutionContext context)
    at Microsoft.Crm.Workflow.WorkflowNotificationPlugin.Execute(IServiceProvider serviceProvider)
    at Microsoft.Crm.Extensibility.V5PluginProxyStep.ExecuteInternal(PipelineExecutionContext context)
    at Microsoft.Crm.Extensibility.VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context)
    ClientConnectionId:cd123fcb-322b-4dd1-9b9f-d6e93f6883c3
    [2017-01-31 12:21:07.518] Process: w3wp |Organization:7216af00-374b-41f1-b31a-35677fe29f20 |Thread: 11 |Category: Exception |User: e3ffd441-137a-e311-99c5-002655573aa2 |Level: Error |ReqId: 04dc8d29-0fb0-43e5-8d50-85b62b6e5de5 | CrmException..ctor ilOffset = 0x7
    at CrmException..ctor(String message, Exception innerException, Int32 errorCode, Boolean isFlowControlException) ilOffset = 0x7
    at CrmException..ctor(Exception innerException, Int32 errorCode, Object[] arguments) ilOffset = 0xB
    at SoapExtensionExceptionHandlerBase.PrivateGetCrmExceptionNoDependencies(Exception exception) ilOffset = 0xA8
    at SoapExtensionExceptionHandlerBase.GetCrmException(Exception exception) ilOffset = 0x0
    at VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context) ilOffset = 0x65
    at Pipeline.Execute(PipelineExecutionContext context) ilOffset = 0x65
    at MessageProcessor.Execute(PipelineExecutionContext context) ilOffset = 0x21C
    at InternalMessageDispatcher.Execute(PipelineExecutionContext context) ilOffset = 0xE4
    at ExtensiblePlatformMessageDispatcher.Execute(PipelineExecutionContext pluginContext) ilOffset = 0x0
    at ExtensiblePlatformMessageDispatcher.UpdateWithInvocationSource(BusinessEntity entity, FilterExpression filter, Int32 invocationSource, ExecutionContext context) ilOffset = 0xCE
    at ExtensiblePlatformMessageDispatcher.Update(BusinessEntity entity, FilterExpression filter, ExecutionContext context) ilOffset = 0x5
    at BusinessProcessObject.UpdateWithPipelineAndExtensions(IBusinessEntity entity, ExecutionContext context) ilOffset = 0x80
    at GenericActivityServiceBase.UpdateInternal(IBusinessEntity entityInterface, ExecutionContext context) ilOffset = 0xA7
    at CommunicationActivityServiceBase.Update(IBusinessEntity entity, ExecutionContext context) ilOffset = 0x1B
    at EmailService.Send(Guid emailId, Boolean issueSend, String trackingToken, ExecutionContext context) ilOffset = 0x575
    at RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) ilOffset = 0xFFFFFFFF
    at RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) ilOffset = 0x25
    at RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) ilOffset = 0x89
    at LogicalMethodInfo.Invoke(Object target, Object[] values) ilOffset = 0x4F
    at InternalOperationPlugin.Execute(IServiceProvider serviceProvider) ilOffset = 0x57
    at V5PluginProxyStep.ExecuteInternal(PipelineExecutionContext context) ilOffset = 0x200
    at VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context) ilOffset = 0x65
    at Pipeline.Execute(PipelineExecutionContext context) ilOffset = 0x65
    at MessageProcessor.Execute(PipelineExecutionContext context) ilOffset = 0x1C5
    at InternalMessageDispatcher.Execute(PipelineExecutionContext context) ilOffset = 0xE4
    at ExternalMessageDispatcher.ExecuteInternal(IInProcessOrganizationServiceFactory serviceFactory, IPlatformMessageDispatcherFactory dispatcherFactory, String messageName, String requestName, Int32 primaryObjectTypeCode, Int32 secondaryObjectTypeCode, ParameterCollection fields, CorrelationToken correlationToken, CallerOriginToken originToken, UserAuth userAuth, Guid callerId, Guid transactionContextId, Int32 invocationSource, Nullable`1 requestId, Version endpointVersion) ilOffset = 0x16E
    at OrganizationSdkServiceInternal.ExecuteRequest(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, UserAuth userAuth, Guid targetUserId, OrganizationContext context, Boolean returnResponse, Boolean checkAdminMode) ilOffset = 0x1F1
    at OrganizationSdkServiceInternal.ExecuteRequest(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, Boolean checkAdminMode) ilOffset = 0x2D
    at OrganizationSdkServiceInternal.Execute(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, Boolean checkAdminMode) ilOffset = 0x26
    at InprocessServiceProxy.ExecuteCore(OrganizationRequest request) ilOffset = 0x34
    at PlatformCommand.XrmExecuteInternal() ilOffset = 0xF6
    at Email.Send() ilOffset = 0x49
    at EmailSendCommand.ExecuteCommand(String commandXml) ilOffset = 0x128
    at CommandBase.Execute(String commandXml) ilOffset = 0x13
    at InlineEditWebService.Execute(Int32 command, String commandXml) ilOffset = 0xD0
    at RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) ilOffset = 0xFFFFFFFF
    at RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) ilOffset = 0x25
    at RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) ilOffset = 0x89
    at LogicalMethodInfo.Invoke(Object target, Object[] values) ilOffset = 0x4F
    at WebServiceHandler.Invoke() ilOffset = 0xC3
    at WebServiceHandler.CoreProcessRequest() ilOffset = 0x13E
    at SyncSessionlessHandler.ProcessRequest(HttpContext context) ilOffset = 0x39
    at HandlerWrapper.ProcessRequest(HttpContext context) ilOffset = 0x7
    at CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() ilOffset = 0x18D
    at HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) ilOffset = 0x15
    at ApplicationStepManager.ResumeSteps(Exception error) ilOffset = 0x10A
    at HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData) ilOffset = 0x5C
    at HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) ilOffset = 0x16A
    at ISAPIRuntime.ProcessRequest(IntPtr ecb, Int32 iWRType) ilOffset = 0x4B
    >Crm Exception: Message: Generic SQL error., ErrorCode: -2147204784, InnerException: System.Data.SqlClient.SqlException (0x80131904): The provided statistics stream is corrupt.
    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.ExecuteDbDataReader(CommandBehavior behavior)
    at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader()
    at Microsoft.Crm.CrmDbConnection.InternalExecuteWithRetry[TResult](Func`1 ExecuteMethod, IDbCommand command)
    at Microsoft.Crm.CrmDbConnection.InternalExecuteReader(IDbCommand command, Boolean capturePerfTrace)
    at Microsoft.Crm.CrmDbConnection.ExecuteReader(IDbCommand command, Boolean impersonate, Boolean capturePerfTrace)
    at Microsoft.Crm.BusinessEntities.BusinessProcessObject.ExecuteQuery(CrmDbConnection dbConnection, IDbCommand command, ISqlExecutionContext context, Nullable`1 commandTimeout)
    at Microsoft.Crm.Workflow.WorkflowNotificationPlugin.ResumeAsyncOperations(Guid entityId, String entityName, ExecutionContext context)
    at Microsoft.Crm.Workflow.WorkflowNotificationPlugin.Execute(IServiceProvider serviceProvider)
    at Microsoft.Crm.Extensibility.V5PluginProxyStep.ExecuteInternal(PipelineExecutionContext context)
    at Microsoft.Crm.Extensibility.VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context)
    ClientConnectionId:cd123fcb-322b-4dd1-9b9f-d6e93f6883c3
    [2017-01-31 12:21:07.520] Process: w3wp |Organization:7216af00-374b-41f1-b31a-35677fe29f20 |Thread: 11 |Category: Exception |User: e3ffd441-137a-e311-99c5-002655573aa2 |Level: Error |ReqId: 04dc8d29-0fb0-43e5-8d50-85b62b6e5de5 | CrmException..ctor ilOffset = 0x7
    at CrmException..ctor(String message, Exception innerException, Int32 errorCode, Boolean isFlowControlException) ilOffset = 0x7
    at CrmException..ctor(String message, Exception innerException, Int32 errorCode) ilOffset = 0x5
    at RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) ilOffset = 0xFFFFFFFF
    at RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) ilOffset = 0xF7
    at RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark) ilOffset = 0x1E8
    at Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) ilOffset = 0xBB
    at Activator.CreateInstance(Type type, Object[] args) ilOffset = 0xA
    at VersionedPluginProxyStepBase.WrapExceptionToThrow(CrmException exception) ilOffset = 0xA5
    at VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context) ilOffset = 0x65
    at Pipeline.Execute(PipelineExecutionContext context) ilOffset = 0x65
    at MessageProcessor.Execute(PipelineExecutionContext context) ilOffset = 0x21C
    at InternalMessageDispatcher.Execute(PipelineExecutionContext context) ilOffset = 0xE4
    at ExtensiblePlatformMessageDispatcher.Execute(PipelineExecutionContext pluginContext) ilOffset = 0x0
    at ExtensiblePlatformMessageDispatcher.UpdateWithInvocationSource(BusinessEntity entity, FilterExpression filter, Int32 invocationSource, ExecutionContext context) ilOffset = 0xCE
    at ExtensiblePlatformMessageDispatcher.Update(BusinessEntity entity, FilterExpression filter, ExecutionContext context) ilOffset = 0x5
    at BusinessProcessObject.UpdateWithPipelineAndExtensions(IBusinessEntity entity, ExecutionContext context) ilOffset = 0x80
    at GenericActivityServiceBase.UpdateInternal(IBusinessEntity entityInterface, ExecutionContext context) ilOffset = 0xA7
    at CommunicationActivityServiceBase.Update(IBusinessEntity entity, ExecutionContext context) ilOffset = 0x1B
    at EmailService.Send(Guid emailId, Boolean issueSend, String trackingToken, ExecutionContext context) ilOffset = 0x575
    at RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) ilOffset = 0xFFFFFFFF
    at RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) ilOffset = 0x25
    at RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) ilOffset = 0x89
    at LogicalMethodInfo.Invoke(Object target, Object[] values) ilOffset = 0x4F
    at InternalOperationPlugin.Execute(IServiceProvider serviceProvider) ilOffset = 0x57
    at V5PluginProxyStep.ExecuteInternal(PipelineExecutionContext context) ilOffset = 0x200
    at VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context) ilOffset = 0x65
    at Pipeline.Execute(PipelineExecutionContext context) ilOffset = 0x65
    at MessageProcessor.Execute(PipelineExecutionContext context) ilOffset = 0x1C5
    at InternalMessageDispatcher.Execute(PipelineExecutionContext context) ilOffset = 0xE4
    at ExternalMessageDispatcher.ExecuteInternal(IInProcessOrganizationServiceFactory serviceFactory, IPlatformMessageDispatcherFactory dispatcherFactory, String messageName, String requestName, Int32 primaryObjectTypeCode, Int32 secondaryObjectTypeCode, ParameterCollection fields, CorrelationToken correlationToken, CallerOriginToken originToken, UserAuth userAuth, Guid callerId, Guid transactionContextId, Int32 invocationSource, Nullable`1 requestId, Version endpointVersion) ilOffset = 0x16E
    at OrganizationSdkServiceInternal.ExecuteRequest(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, UserAuth userAuth, Guid targetUserId, OrganizationContext context, Boolean returnResponse, Boolean checkAdminMode) ilOffset = 0x1F1
    at OrganizationSdkServiceInternal.ExecuteRequest(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, Boolean checkAdminMode) ilOffset = 0x2D
    at OrganizationSdkServiceInternal.Execute(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, Boolean checkAdminMode) ilOffset = 0x26
    at InprocessServiceProxy.ExecuteCore(OrganizationRequest request) ilOffset = 0x34
    at PlatformCommand.XrmExecuteInternal() ilOffset = 0xF6
    at Email.Send() ilOffset = 0x49
    at EmailSendCommand.ExecuteCommand(String commandXml) ilOffset = 0x128
    at CommandBase.Execute(String commandXml) ilOffset = 0x13
    at InlineEditWebService.Execute(Int32 command, String commandXml) ilOffset = 0xD0
    at RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) ilOffset = 0xFFFFFFFF
    at RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) ilOffset = 0x25
    at RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) ilOffset = 0x89
    at LogicalMethodInfo.Invoke(Object target, Object[] values) ilOffset = 0x4F
    at WebServiceHandler.Invoke() ilOffset = 0xC3
    at WebServiceHandler.CoreProcessRequest() ilOffset = 0x13E
    at SyncSessionlessHandler.ProcessRequest(HttpContext context) ilOffset = 0x39
    at HandlerWrapper.ProcessRequest(HttpContext context) ilOffset = 0x7
    at CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() ilOffset = 0x18D
    at HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) ilOffset = 0x15
    at ApplicationStepManager.ResumeSteps(Exception error) ilOffset = 0x10A
    at HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData) ilOffset = 0x5C
    at HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) ilOffset = 0x16A
    at ISAPIRuntime.ProcessRequest(IntPtr ecb, Int32 iWRType) ilOffset = 0x4B
    >Crm Exception: Message: Generic SQL error., ErrorCode: -2147204784, InnerException: Microsoft.Crm.CrmException: Generic SQL error. ---> System.Data.SqlClient.SqlException: The provided statistics stream is corrupt.
    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.ExecuteDbDataReader(CommandBehavior behavior)
    at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader()
    at Microsoft.Crm.CrmDbConnection.InternalExecuteWithRetry[TResult](Func`1 ExecuteMethod, IDbCommand command)
    at Microsoft.Crm.CrmDbConnection.InternalExecuteReader(IDbCommand command, Boolean capturePerfTrace)
    at Microsoft.Crm.CrmDbConnection.ExecuteReader(IDbCommand command, Boolean impersonate, Boolean capturePerfTrace)
    at Microsoft.Crm.BusinessEntities.BusinessProcessObject.ExecuteQuery(CrmDbConnection dbConnection, IDbCommand command, ISqlExecutionContext context, Nullable`1 commandTimeout)
    at Microsoft.Crm.Workflow.WorkflowNotificationPlugin.ResumeAsyncOperations(Guid entityId, String entityName, ExecutionContext context)
    at Microsoft.Crm.Workflow.WorkflowNotificationPlugin.Execute(IServiceProvider serviceProvider)
    at Microsoft.Crm.Extensibility.V5PluginProxyStep.ExecuteInternal(PipelineExecutionContext context)
    at Microsoft.Crm.Extensibility.VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context)
    --- End of inner exception stack trace ---
    [2017-01-31 12:21:07.522] Process: w3wp |Organization:7216af00-374b-41f1-b31a-35677fe29f20 |Thread: 11 |Category: Exception |User: e3ffd441-137a-e311-99c5-002655573aa2 |Level: Error |ReqId: 04dc8d29-0fb0-43e5-8d50-85b62b6e5de5 | CrmException..ctor ilOffset = 0x7
    at CrmException..ctor(String message, Exception innerException, Int32 errorCode, Boolean isFlowControlException) ilOffset = 0x7
    at CrmException..ctor(String message, Exception innerException, Int32 errorCode) ilOffset = 0x5
    at RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) ilOffset = 0xFFFFFFFF
    at RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) ilOffset = 0xF7
    at RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark) ilOffset = 0x1E8
    at Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) ilOffset = 0xBB
    at Activator.CreateInstance(Type type, Object[] args) ilOffset = 0xA
    at VersionedPluginProxyStepBase.WrapExceptionToThrow(CrmException exception) ilOffset = 0xA5
    at VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context) ilOffset = 0x65
    at Pipeline.Execute(PipelineExecutionContext context) ilOffset = 0x65
    at MessageProcessor.Execute(PipelineExecutionContext context) ilOffset = 0x1C5
    at InternalMessageDispatcher.Execute(PipelineExecutionContext context) ilOffset = 0xE4
    at ExternalMessageDispatcher.ExecuteInternal(IInProcessOrganizationServiceFactory serviceFactory, IPlatformMessageDispatcherFactory dispatcherFactory, String messageName, String requestName, Int32 primaryObjectTypeCode, Int32 secondaryObjectTypeCode, ParameterCollection fields, CorrelationToken correlationToken, CallerOriginToken originToken, UserAuth userAuth, Guid callerId, Guid transactionContextId, Int32 invocationSource, Nullable`1 requestId, Version endpointVersion) ilOffset = 0x16E
    at OrganizationSdkServiceInternal.ExecuteRequest(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, UserAuth userAuth, Guid targetUserId, OrganizationContext context, Boolean returnResponse, Boolean checkAdminMode) ilOffset = 0x1F1
    at OrganizationSdkServiceInternal.ExecuteRequest(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, Boolean checkAdminMode) ilOffset = 0x2D
    at OrganizationSdkServiceInternal.Execute(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, Boolean checkAdminMode) ilOffset = 0x26
    at InprocessServiceProxy.ExecuteCore(OrganizationRequest request) ilOffset = 0x34
    at PlatformCommand.XrmExecuteInternal() ilOffset = 0xF6
    at Email.Send() ilOffset = 0x49
    at EmailSendCommand.ExecuteCommand(String commandXml) ilOffset = 0x128
    at CommandBase.Execute(String commandXml) ilOffset = 0x13
    at InlineEditWebService.Execute(Int32 command, String commandXml) ilOffset = 0xD0
    at RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) ilOffset = 0xFFFFFFFF
    at RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) ilOffset = 0x25
    at RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) ilOffset = 0x89
    at LogicalMethodInfo.Invoke(Object target, Object[] values) ilOffset = 0x4F
    at WebServiceHandler.Invoke() ilOffset = 0xC3
    at WebServiceHandler.CoreProcessRequest() ilOffset = 0x13E
    at SyncSessionlessHandler.ProcessRequest(HttpContext context) ilOffset = 0x39
    at HandlerWrapper.ProcessRequest(HttpContext context) ilOffset = 0x7
    at CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() ilOffset = 0x18D
    at HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) ilOffset = 0x15
    at ApplicationStepManager.ResumeSteps(Exception error) ilOffset = 0x10A
    at HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData) ilOffset = 0x5C
    at HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) ilOffset = 0x16A
    at ISAPIRuntime.ProcessRequest(IntPtr ecb, Int32 iWRType) ilOffset = 0x4B
    >Crm Exception: Message: Generic SQL error., ErrorCode: -2147204784, InnerException: Microsoft.Crm.CrmException: Generic SQL error. ---> Microsoft.Crm.CrmException: Generic SQL error. ---> System.Data.SqlClient.SqlException: The provided statistics stream is corrupt.
    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.ExecuteDbDataReader(CommandBehavior behavior)
    at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader()
    at Microsoft.Crm.CrmDbConnection.InternalExecuteWithRetry[TResult](Func`1 ExecuteMethod, IDbCommand command)
    at Microsoft.Crm.CrmDbConnection.InternalExecuteReader(IDbCommand command, Boolean capturePerfTrace)
    at Microsoft.Crm.CrmDbConnection.ExecuteReader(IDbCommand command, Boolean impersonate, Boolean capturePerfTrace)
    at Microsoft.Crm.BusinessEntities.BusinessProcessObject.ExecuteQuery(CrmDbConnection dbConnection, IDbCommand command, ISqlExecutionContext context, Nullable`1 commandTimeout)
    at Microsoft.Crm.Workflow.WorkflowNotificationPlugin.ResumeAsyncOperations(Guid entityId, String entityName, ExecutionContext context)
    at Microsoft.Crm.Workflow.WorkflowNotificationPlugin.Execute(IServiceProvider serviceProvider)
    at Microsoft.Crm.Extensibility.V5PluginProxyStep.ExecuteInternal(PipelineExecutionContext context)
    at Microsoft.Crm.Extensibility.VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context)
    --- End of inner exception stack trace ---
    --- End of inner exception stack trace ---
    at Microsoft.Crm.Extensibility.VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context)
    at Microsoft.Crm.Extensibility.Pipeline.Execute(PipelineExecutionContext context)
    at Microsoft.Crm.Extensibility.MessageProcessor.Execute(PipelineExecutionContext context)
    at Microsoft.Crm.Extensibility.InternalMessageDispatcher.Execute(PipelineExecutionContext context)
    at Microsoft.Crm.Extensibility.ExtensiblePlatformMessageDispatcher.Execute(PipelineExecutionContext pluginContext)
    at Microsoft.Crm.Extensibility.ExtensiblePlatformMessageDispatcher.UpdateWithInvocationSource(BusinessEntity entity, FilterExpression filter, Int32 invocationSource, ExecutionContext context)
    at Microsoft.Crm.Extensibility.ExtensiblePlatformMessageDispatcher.Update(BusinessEntity entity, FilterExpression filter, ExecutionContext context)
    at Microsoft.Crm.BusinessEntities.BusinessProcessObject.UpdateWithPipelineAndExtensions(IBusinessEntity entity, ExecutionContext context)
    at Microsoft.Crm.Common.ObjectModel.GenericActivityServiceBase.UpdateInternal(IBusinessEntity entityInterface, ExecutionContext context)
    at Microsoft.Crm.Common.ObjectModel.CommunicationActivityServiceBase.Update(IBusinessEntity entity, ExecutionContext context)
    at Microsoft.Crm.Common.ObjectModel.EmailService.Send(Guid emailId, Boolean issueSend, String trackingToken, ExecutionContext context)
    [2017-01-31 12:21:07.525] Process: w3wp |Organization:00000000-0000-0000-0000-000000000000 |Thread: 11 |Category: Exception |User: 00000000-0000-0000-0000-000000000000 |Level: Error |ReqId: 04dc8d29-0fb0-43e5-8d50-85b62b6e5de5 | CrmException..ctor ilOffset = 0x7
    at CrmException..ctor(String message, Exception innerException, Int32 errorCode, Boolean isFlowControlException) ilOffset = 0x7
    at CrmException..ctor(String message, Int32 errorCode) ilOffset = 0x5
    at PlatformCommand.CreateCrmExceptionFromServiceFault(FaultException`1 fe) ilOffset = 0x1B
    at PlatformCommand.XrmExecuteInternal() ilOffset = 0xF6
    at Email.Send() ilOffset = 0x49
    at EmailSendCommand.ExecuteCommand(String commandXml) ilOffset = 0x128
    at CommandBase.Execute(String commandXml) ilOffset = 0x13
    at InlineEditWebService.Execute(Int32 command, String commandXml) ilOffset = 0xD0
    at RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) ilOffset = 0xFFFFFFFF
    at RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) ilOffset = 0x25
    at RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) ilOffset = 0x89
    at LogicalMethodInfo.Invoke(Object target, Object[] values) ilOffset = 0x4F
    at WebServiceHandler.Invoke() ilOffset = 0xC3
    at WebServiceHandler.CoreProcessRequest() ilOffset = 0x13E
    at SyncSessionlessHandler.ProcessRequest(HttpContext context) ilOffset = 0x39
    at HandlerWrapper.ProcessRequest(HttpContext context) ilOffset = 0x7
    at CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() ilOffset = 0x18D
    at HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) ilOffset = 0x15
    at ApplicationStepManager.ResumeSteps(Exception error) ilOffset = 0x10A
    at HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData) ilOffset = 0x5C
    at HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) ilOffset = 0x16A
    at ISAPIRuntime.ProcessRequest(IntPtr ecb, Int32 iWRType) ilOffset = 0x4B
    >Crm Exception: Message: Generic SQL error., ErrorCode: -2147204784
    [2017-01-31 12:21:07.526] Process: w3wp |Organization:7216af00-374b-41f1-b31a-35677fe29f20 |Thread: 11 |Category: Application |User: 00000000-0000-0000-0000-000000000000 |Level: Error |ReqId: 04dc8d29-0fb0-43e5-8d50-85b62b6e5de5 | ErrorInformation.LogError ilOffset = 0x17
    >MSCRM Error Report:
    --------------------------------------------------------------------------------------------------------
    Error: Generic SQL error.
    
    Error Number: 0x80044150
    
    Error Message: Generic SQL error.
    
    Error Details: Generic SQL error.
    
    Source File: Not available
    
    Line Number: Not available
    
    Request URL:
    
    Stack Trace Info: [CrmException: Generic SQL error.]
    at Microsoft.Crm.Application.Platform.ServiceCommands.PlatformCommand.XrmExecuteInternal()
    at Microsoft.Crm.Common.Application.Platform.Email.Send()
    at Microsoft.Crm.Common.Application.WebServices.InlineEdit.EmailSendCommand.ExecuteCommand(String commandXml)
    at Microsoft.Crm.Core.Application.WebServices.InlineEdit.CommandBase.Execute(String commandXml)
    
    
    [2017-01-31 12:21:13.887] Process: w3wp |Organization:7216af00-374b-41f1-b31a-35677fe29f20 |Thread: 99 |Category: Exception |User: e3ffd441-137a-e311-99c5-002655573aa2 |Level: Error |ReqId: f7f02fe4-60ae-413b-8e49-297fad12d9cf | CrmException..ctor ilOffset = 0x7
    at CrmException..ctor(String message, Exception innerException, Int32 errorCode, Boolean isFlowControlException) ilOffset = 0x7
    at CrmException..ctor(Exception innerException, Int32 errorCode, Object[] arguments) ilOffset = 0xB
    at SoapExtensionExceptionHandlerBase.PrivateGetCrmExceptionNoDependencies(Exception exception) ilOffset = 0xA8
    at SoapExtensionExceptionHandlerBase.GetCrmException(Exception exception) ilOffset = 0x0
    at PluginExceptionConvertor.ConvertPluginException(Exception originalException, Boolean isAsync, Boolean unwrapTargetInvocationException) ilOffset = 0x43
    at PluginExceptionConvertor.ConvertPluginException(Exception originalException, String pluginTrace, String assemblyName, String pluginType, String stepIdOrWorkflowGroup, String stepDescription, Boolean isAsync, Boolean addPluginTrace, Boolean unwrapTargetInvocationException) ilOffset = 0x29
    at VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context) ilOffset = 0x65
    at Pipeline.Execute(PipelineExecutionContext context) ilOffset = 0x65
    at MessageProcessor.Execute(PipelineExecutionContext context) ilOffset = 0x21C
    at InternalMessageDispatcher.Execute(PipelineExecutionContext context) ilOffset = 0xE4
    at ExtensiblePlatformMessageDispatcher.Execute(PipelineExecutionContext pluginContext) ilOffset = 0x0
    at ExtensiblePlatformMessageDispatcher.UpdateWithInvocationSource(BusinessEntity entity, FilterExpression filter, Int32 invocationSource, ExecutionContext context) ilOffset = 0xCE
    at ExtensiblePlatformMessageDispatcher.Update(BusinessEntity entity, FilterExpression filter, ExecutionContext context) ilOffset = 0x5
    at BusinessProcessObject.UpdateWithPipelineAndExtensions(IBusinessEntity entity, ExecutionContext context) ilOffset = 0x80
    at RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) ilOffset = 0xFFFFFFFF
    at RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) ilOffset = 0x25
    at RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) ilOffset = 0x89
    at LogicalMethodInfo.Invoke(Object target, Object[] values) ilOffset = 0x4F
    at InternalOperationPlugin.Execute(IServiceProvider serviceProvider) ilOffset = 0x57
    at V5PluginProxyStep.ExecuteInternal(PipelineExecutionContext context) ilOffset = 0x200
    at VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context) ilOffset = 0x65
    at Pipeline.Execute(PipelineExecutionContext context) ilOffset = 0x65
    at MessageProcessor.Execute(PipelineExecutionContext context) ilOffset = 0x1C5
    at InternalMessageDispatcher.Execute(PipelineExecutionContext context) ilOffset = 0xE4
    at ExternalMessageDispatcher.ExecuteInternal(IInProcessOrganizationServiceFactory serviceFactory, IPlatformMessageDispatcherFactory dispatcherFactory, String messageName, String requestName, Int32 primaryObjectTypeCode, Int32 secondaryObjectTypeCode, ParameterCollection fields, CorrelationToken correlationToken, CallerOriginToken originToken, UserAuth userAuth, Guid callerId, Guid transactionContextId, Int32 invocationSource, Nullable`1 requestId, Version endpointVersion) ilOffset = 0x16E
    at OrganizationSdkServiceInternal.ExecuteRequest(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, UserAuth userAuth, Guid targetUserId, OrganizationContext context, Boolean returnResponse, Boolean checkAdminMode) ilOffset = 0x1F1
    at OrganizationSdkServiceInternal.ExecuteRequest(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, Boolean checkAdminMode) ilOffset = 0x2D
    at OrganizationSdkServiceInternal.Execute(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, Boolean checkAdminMode) ilOffset = 0x26
    at InprocessServiceProxy.ExecuteCore(OrganizationRequest request) ilOffset = 0x34
    at PlatformCommand.XrmExecuteInternal() ilOffset = 0xF6
    at UpdateCommand.Execute() ilOffset = 0x7
    at RecentlyViewedList.SaveInternal(IOrganizationContextEx context, Int32 typeCode, String recentlyViewedXml, Dictionary`2 entityList) ilOffset = 0x34
    at RecentlyViewedList.SaveAll(IOrganizationContextEx context, Boolean dataChanged, IList`1 clientEntityList, IList`1 clientViewList, ICollection`1 etcList) ilOffset = 0xCC
    at RecentlyViewedList.SaveAll(IOrganizationContextEx context, String recentlyViewedXml) ilOffset = 0x80
    at RecentlyViewedWebService.UploadRecentlyViewed(String recentlyViewedXml, Boolean retrieveAfterUpdated) ilOffset = 0x11
    at RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) ilOffset = 0xFFFFFFFF
    at RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) ilOffset = 0x25
    at RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) ilOffset = 0x89
    at LogicalMethodInfo.Invoke(Object target, Object[] values) ilOffset = 0x4F
    at WebServiceHandler.Invoke() ilOffset = 0xC3
    at WebServiceHandler.CoreProcessRequest() ilOffset = 0x13E
    at SyncSessionlessHandler.ProcessRequest(HttpContext context) ilOffset = 0x39
    at HandlerWrapper.ProcessRequest(HttpContext context) ilOffset = 0x7
    at CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() ilOffset = 0x18D
    at HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) ilOffset = 0x15
    at ApplicationStepManager.ResumeSteps(Exception error) ilOffset = 0x10A
    at HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData) ilOffset = 0x5C
    at HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) ilOffset = 0x16A
    at ISAPIRuntime.ProcessRequest(IntPtr ecb, Int32 iWRType) ilOffset = 0x4B
    >Crm Exception: Message: Generic SQL error., ErrorCode: -2147204784, InnerException: System.Data.SqlClient.SqlException (0x80131904): The provided statistics stream is corrupt.
    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.ExecuteDbDataReader(CommandBehavior behavior)
    at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader()
    at Microsoft.Crm.CrmDbConnection.InternalExecuteWithRetry[TResult](Func`1 ExecuteMethod, IDbCommand command)
    at Microsoft.Crm.CrmDbConnection.InternalExecuteReader(IDbCommand command, Boolean capturePerfTrace)
    at Microsoft.Crm.CrmDbConnection.ExecuteReader(IDbCommand command, Boolean impersonate, Boolean capturePerfTrace)
    at Microsoft.Crm.BusinessEntities.BusinessProcessObject.ExecuteQuery(CrmDbConnection dbConnection, IDbCommand command, ISqlExecutionContext context, Nullable`1 commandTimeout)
    at Microsoft.Crm.Workflow.WorkflowNotificationPlugin.ResumeAsyncOperations(Guid entityId, String entityName, ExecutionContext context)
    at Microsoft.Crm.Workflow.WorkflowNotificationPlugin.Execute(IServiceProvider serviceProvider)
    at Microsoft.Crm.Extensibility.V5PluginProxyStep.ExecuteInternal(PipelineExecutionContext context)
    at Microsoft.Crm.Extensibility.VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context)
    ClientConnectionId:cd123fcb-322b-4dd1-9b9f-d6e93f6883c3
    [2017-01-31 12:21:13.889] Process: w3wp |Organization:7216af00-374b-41f1-b31a-35677fe29f20 |Thread: 99 |Category: Exception |User: e3ffd441-137a-e311-99c5-002655573aa2 |Level: Error |ReqId: f7f02fe4-60ae-413b-8e49-297fad12d9cf | CrmException..ctor ilOffset = 0x7
    at CrmException..ctor(String message, Exception innerException, Int32 errorCode, Boolean isFlowControlException) ilOffset = 0x7
    at CrmException..ctor(Exception innerException, Int32 errorCode, Object[] arguments) ilOffset = 0xB
    at SoapExtensionExceptionHandlerBase.PrivateGetCrmExceptionNoDependencies(Exception exception) ilOffset = 0xA8
    at SoapExtensionExceptionHandlerBase.GetCrmException(Exception exception) ilOffset = 0x0
    at VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context) ilOffset = 0x65
    at Pipeline.Execute(PipelineExecutionContext context) ilOffset = 0x65
    at MessageProcessor.Execute(PipelineExecutionContext context) ilOffset = 0x21C
    at InternalMessageDispatcher.Execute(PipelineExecutionContext context) ilOffset = 0xE4
    at ExtensiblePlatformMessageDispatcher.Execute(PipelineExecutionContext pluginContext) ilOffset = 0x0
    at ExtensiblePlatformMessageDispatcher.UpdateWithInvocationSource(BusinessEntity entity, FilterExpression filter, Int32 invocationSource, ExecutionContext context) ilOffset = 0xCE
    at ExtensiblePlatformMessageDispatcher.Update(BusinessEntity entity, FilterExpression filter, ExecutionContext context) ilOffset = 0x5
    at BusinessProcessObject.UpdateWithPipelineAndExtensions(IBusinessEntity entity, ExecutionContext context) ilOffset = 0x80
    at RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) ilOffset = 0xFFFFFFFF
    at RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) ilOffset = 0x25
    at RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) ilOffset = 0x89
    at LogicalMethodInfo.Invoke(Object target, Object[] values) ilOffset = 0x4F
    at InternalOperationPlugin.Execute(IServiceProvider serviceProvider) ilOffset = 0x57
    at V5PluginProxyStep.ExecuteInternal(PipelineExecutionContext context) ilOffset = 0x200
    at VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context) ilOffset = 0x65
    at Pipeline.Execute(PipelineExecutionContext context) ilOffset = 0x65
    at MessageProcessor.Execute(PipelineExecutionContext context) ilOffset = 0x1C5
    at InternalMessageDispatcher.Execute(PipelineExecutionContext context) ilOffset = 0xE4
    at ExternalMessageDispatcher.ExecuteInternal(IInProcessOrganizationServiceFactory serviceFactory, IPlatformMessageDispatcherFactory dispatcherFactory, String messageName, String requestName, Int32 primaryObjectTypeCode, Int32 secondaryObjectTypeCode, ParameterCollection fields, CorrelationToken correlationToken, CallerOriginToken originToken, UserAuth userAuth, Guid callerId, Guid transactionContextId, Int32 invocationSource, Nullable`1 requestId, Version endpointVersion) ilOffset = 0x16E
    at OrganizationSdkServiceInternal.ExecuteRequest(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, UserAuth userAuth, Guid targetUserId, OrganizationContext context, Boolean returnResponse, Boolean checkAdminMode) ilOffset = 0x1F1
    at OrganizationSdkServiceInternal.ExecuteRequest(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, Boolean checkAdminMode) ilOffset = 0x2D
    at OrganizationSdkServiceInternal.Execute(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, Boolean checkAdminMode) ilOffset = 0x26
    at InprocessServiceProxy.ExecuteCore(OrganizationRequest request) ilOffset = 0x34
    at PlatformCommand.XrmExecuteInternal() ilOffset = 0xF6
    at UpdateCommand.Execute() ilOffset = 0x7
    at RecentlyViewedList.SaveInternal(IOrganizationContextEx context, Int32 typeCode, String recentlyViewedXml, Dictionary`2 entityList) ilOffset = 0x34
    at RecentlyViewedList.SaveAll(IOrganizationContextEx context, Boolean dataChanged, IList`1 clientEntityList, IList`1 clientViewList, ICollection`1 etcList) ilOffset = 0xCC
    at RecentlyViewedList.SaveAll(IOrganizationContextEx context, String recentlyViewedXml) ilOffset = 0x80
    at RecentlyViewedWebService.UploadRecentlyViewed(String recentlyViewedXml, Boolean retrieveAfterUpdated) ilOffset = 0x11
    at RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) ilOffset = 0xFFFFFFFF
    at RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) ilOffset = 0x25
    at RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) ilOffset = 0x89
    at LogicalMethodInfo.Invoke(Object target, Object[] values) ilOffset = 0x4F
    at WebServiceHandler.Invoke() ilOffset = 0xC3
    at WebServiceHandler.CoreProcessRequest() ilOffset = 0x13E
    at SyncSessionlessHandler.ProcessRequest(HttpContext context) ilOffset = 0x39
    at HandlerWrapper.ProcessRequest(HttpContext context) ilOffset = 0x7
    at CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() ilOffset = 0x18D
    at HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) ilOffset = 0x15
    at ApplicationStepManager.ResumeSteps(Exception error) ilOffset = 0x10A
    at HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData) ilOffset = 0x5C
    at HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) ilOffset = 0x16A
    at ISAPIRuntime.ProcessRequest(IntPtr ecb, Int32 iWRType) ilOffset = 0x4B
    >Crm Exception: Message: Generic SQL error., ErrorCode: -2147204784, InnerException: System.Data.SqlClient.SqlException (0x80131904): The provided statistics stream is corrupt.
    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.ExecuteDbDataReader(CommandBehavior behavior)
    at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader()
    at Microsoft.Crm.CrmDbConnection.InternalExecuteWithRetry[TResult](Func`1 ExecuteMethod, IDbCommand command)
    at Microsoft.Crm.CrmDbConnection.InternalExecuteReader(IDbCommand command, Boolean capturePerfTrace)
    at Microsoft.Crm.CrmDbConnection.ExecuteReader(IDbCommand command, Boolean impersonate, Boolean capturePerfTrace)
    at Microsoft.Crm.BusinessEntities.BusinessProcessObject.ExecuteQuery(CrmDbConnection dbConnection, IDbCommand command, ISqlExecutionContext context, Nullable`1 commandTimeout)
    at Microsoft.Crm.Workflow.WorkflowNotificationPlugin.ResumeAsyncOperations(Guid entityId, String entityName, ExecutionContext context)
    at Microsoft.Crm.Workflow.WorkflowNotificationPlugin.Execute(IServiceProvider serviceProvider)
    at Microsoft.Crm.Extensibility.V5PluginProxyStep.ExecuteInternal(PipelineExecutionContext context)
    at Microsoft.Crm.Extensibility.VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context)
    ClientConnectionId:cd123fcb-322b-4dd1-9b9f-d6e93f6883c3
    [2017-01-31 12:21:13.890] Process: w3wp |Organization:7216af00-374b-41f1-b31a-35677fe29f20 |Thread: 99 |Category: Exception |User: e3ffd441-137a-e311-99c5-002655573aa2 |Level: Error |ReqId: f7f02fe4-60ae-413b-8e49-297fad12d9cf | CrmException..ctor ilOffset = 0x7
    at CrmException..ctor(String message, Exception innerException, Int32 errorCode, Boolean isFlowControlException) ilOffset = 0x7
    at CrmException..ctor(String message, Exception innerException, Int32 errorCode) ilOffset = 0x5
    at RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) ilOffset = 0xFFFFFFFF
    at RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) ilOffset = 0xF7
    at RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark) ilOffset = 0x1E8
    at Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) ilOffset = 0xBB
    at Activator.CreateInstance(Type type, Object[] args) ilOffset = 0xA
    at VersionedPluginProxyStepBase.WrapExceptionToThrow(CrmException exception) ilOffset = 0xA5
    at VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context) ilOffset = 0x65
    at Pipeline.Execute(PipelineExecutionContext context) ilOffset = 0x65
    at MessageProcessor.Execute(PipelineExecutionContext context) ilOffset = 0x21C
    at InternalMessageDispatcher.Execute(PipelineExecutionContext context) ilOffset = 0xE4
    at ExtensiblePlatformMessageDispatcher.Execute(PipelineExecutionContext pluginContext) ilOffset = 0x0
    at ExtensiblePlatformMessageDispatcher.UpdateWithInvocationSource(BusinessEntity entity, FilterExpression filter, Int32 invocationSource, ExecutionContext context) ilOffset = 0xCE
    at ExtensiblePlatformMessageDispatcher.Update(BusinessEntity entity, FilterExpression filter, ExecutionContext context) ilOffset = 0x5
    at BusinessProcessObject.UpdateWithPipelineAndExtensions(IBusinessEntity entity, ExecutionContext context) ilOffset = 0x80
    at RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) ilOffset = 0xFFFFFFFF
    at RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) ilOffset = 0x25
    at RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) ilOffset = 0x89
    at LogicalMethodInfo.Invoke(Object target, Object[] values) ilOffset = 0x4F
    at InternalOperationPlugin.Execute(IServiceProvider serviceProvider) ilOffset = 0x57
    at V5PluginProxyStep.ExecuteInternal(PipelineExecutionContext context) ilOffset = 0x200
    at VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context) ilOffset = 0x65
    at Pipeline.Execute(PipelineExecutionContext context) ilOffset = 0x65
    at MessageProcessor.Execute(PipelineExecutionContext context) ilOffset = 0x1C5
    at InternalMessageDispatcher.Execute(PipelineExecutionContext context) ilOffset = 0xE4
    at ExternalMessageDispatcher.ExecuteInternal(IInProcessOrganizationServiceFactory serviceFactory, IPlatformMessageDispatcherFactory dispatcherFactory, String messageName, String requestName, Int32 primaryObjectTypeCode, Int32 secondaryObjectTypeCode, ParameterCollection fields, CorrelationToken correlationToken, CallerOriginToken originToken, UserAuth userAuth, Guid callerId, Guid transactionContextId, Int32 invocationSource, Nullable`1 requestId, Version endpointVersion) ilOffset = 0x16E
    at OrganizationSdkServiceInternal.ExecuteRequest(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, UserAuth userAuth, Guid targetUserId, OrganizationContext context, Boolean returnResponse, Boolean checkAdminMode) ilOffset = 0x1F1
    at OrganizationSdkServiceInternal.ExecuteRequest(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, Boolean checkAdminMode) ilOffset = 0x2D
    at OrganizationSdkServiceInternal.Execute(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, Boolean checkAdminMode) ilOffset = 0x26
    at InprocessServiceProxy.ExecuteCore(OrganizationRequest request) ilOffset = 0x34
    at PlatformCommand.XrmExecuteInternal() ilOffset = 0xF6
    at UpdateCommand.Execute() ilOffset = 0x7
    at RecentlyViewedList.SaveInternal(IOrganizationContextEx context, Int32 typeCode, String recentlyViewedXml, Dictionary`2 entityList) ilOffset = 0x34
    at RecentlyViewedList.SaveAll(IOrganizationContextEx context, Boolean dataChanged, IList`1 clientEntityList, IList`1 clientViewList, ICollection`1 etcList) ilOffset = 0xCC
    at RecentlyViewedList.SaveAll(IOrganizationContextEx context, String recentlyViewedXml) ilOffset = 0x80
    at RecentlyViewedWebService.UploadRecentlyViewed(String recentlyViewedXml, Boolean retrieveAfterUpdated) ilOffset = 0x11
    at RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) ilOffset = 0xFFFFFFFF
    at RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) ilOffset = 0x25
    at RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) ilOffset = 0x89
    at LogicalMethodInfo.Invoke(Object target, Object[] values) ilOffset = 0x4F
    at WebServiceHandler.Invoke() ilOffset = 0xC3
    at WebServiceHandler.CoreProcessRequest() ilOffset = 0x13E
    at SyncSessionlessHandler.ProcessRequest(HttpContext context) ilOffset = 0x39
    at HandlerWrapper.ProcessRequest(HttpContext context) ilOffset = 0x7
    at CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() ilOffset = 0x18D
    at HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) ilOffset = 0x15
    at ApplicationStepManager.ResumeSteps(Exception error) ilOffset = 0x10A
    at HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData) ilOffset = 0x5C
    at HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) ilOffset = 0x16A
    at ISAPIRuntime.ProcessRequest(IntPtr ecb, Int32 iWRType) ilOffset = 0x4B
    >Crm Exception: Message: Generic SQL error., ErrorCode: -2147204784, InnerException: Microsoft.Crm.CrmException: Generic SQL error. ---> System.Data.SqlClient.SqlException: The provided statistics stream is corrupt.
    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.ExecuteDbDataReader(CommandBehavior behavior)
    at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader()
    at Microsoft.Crm.CrmDbConnection.InternalExecuteWithRetry[TResult](Func`1 ExecuteMethod, IDbCommand command)
    at Microsoft.Crm.CrmDbConnection.InternalExecuteReader(IDbCommand command, Boolean capturePerfTrace)
    at Microsoft.Crm.CrmDbConnection.ExecuteReader(IDbCommand command, Boolean impersonate, Boolean capturePerfTrace)
    at Microsoft.Crm.BusinessEntities.BusinessProcessObject.ExecuteQuery(CrmDbConnection dbConnection, IDbCommand command, ISqlExecutionContext context, Nullable`1 commandTimeout)
    at Microsoft.Crm.Workflow.WorkflowNotificationPlugin.ResumeAsyncOperations(Guid entityId, String entityName, ExecutionContext context)
    at Microsoft.Crm.Workflow.WorkflowNotificationPlugin.Execute(IServiceProvider serviceProvider)
    at Microsoft.Crm.Extensibility.V5PluginProxyStep.ExecuteInternal(PipelineExecutionContext context)
    at Microsoft.Crm.Extensibility.VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context)
    --- End of inner exception stack trace ---
    [2017-01-31 12:21:13.893] Process: w3wp |Organization:7216af00-374b-41f1-b31a-35677fe29f20 |Thread: 99 |Category: Exception |User: e3ffd441-137a-e311-99c5-002655573aa2 |Level: Error |ReqId: f7f02fe4-60ae-413b-8e49-297fad12d9cf | CrmException..ctor ilOffset = 0x7
    at CrmException..ctor(String message, Exception innerException, Int32 errorCode, Boolean isFlowControlException) ilOffset = 0x7
    at CrmException..ctor(String message, Exception innerException, Int32 errorCode) ilOffset = 0x5
    at RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) ilOffset = 0xFFFFFFFF
    at RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) ilOffset = 0xF7
    at RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark) ilOffset = 0x1E8
    at Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) ilOffset = 0xBB
    at Activator.CreateInstance(Type type, Object[] args) ilOffset = 0xA
    at VersionedPluginProxyStepBase.WrapExceptionToThrow(CrmException exception) ilOffset = 0xA5
    at VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context) ilOffset = 0x65
    at Pipeline.Execute(PipelineExecutionContext context) ilOffset = 0x65
    at MessageProcessor.Execute(PipelineExecutionContext context) ilOffset = 0x1C5
    at InternalMessageDispatcher.Execute(PipelineExecutionContext context) ilOffset = 0xE4
    at ExternalMessageDispatcher.ExecuteInternal(IInProcessOrganizationServiceFactory serviceFactory, IPlatformMessageDispatcherFactory dispatcherFactory, String messageName, String requestName, Int32 primaryObjectTypeCode, Int32 secondaryObjectTypeCode, ParameterCollection fields, CorrelationToken correlationToken, CallerOriginToken originToken, UserAuth userAuth, Guid callerId, Guid transactionContextId, Int32 invocationSource, Nullable`1 requestId, Version endpointVersion) ilOffset = 0x16E
    at OrganizationSdkServiceInternal.ExecuteRequest(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, UserAuth userAuth, Guid targetUserId, OrganizationContext context, Boolean returnResponse, Boolean checkAdminMode) ilOffset = 0x1F1
    at OrganizationSdkServiceInternal.ExecuteRequest(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, Boolean checkAdminMode) ilOffset = 0x2D
    at OrganizationSdkServiceInternal.Execute(OrganizationRequest request, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType, Boolean checkAdminMode) ilOffset = 0x26
    at InprocessServiceProxy.ExecuteCore(OrganizationRequest request) ilOffset = 0x34
    at PlatformCommand.XrmExecuteInternal() ilOffset = 0xF6
    at UpdateCommand.Execute() ilOffset = 0x7
    at RecentlyViewedList.SaveInternal(IOrganizationContextEx context, Int32 typeCode, String recentlyViewedXml, Dictionary`2 entityList) ilOffset = 0x34
    at RecentlyViewedList.SaveAll(IOrganizationContextEx context, Boolean dataChanged, IList`1 clientEntityList, IList`1 clientViewList, ICollection`1 etcList) ilOffset = 0xCC
    at RecentlyViewedList.SaveAll(IOrganizationContextEx context, String recentlyViewedXml) ilOffset = 0x80
    at RecentlyViewedWebService.UploadRecentlyViewed(String recentlyViewedXml, Boolean retrieveAfterUpdated) ilOffset = 0x11
    at RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) ilOffset = 0xFFFFFFFF
    at RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) ilOffset = 0x25
    at RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) ilOffset = 0x89
    at LogicalMethodInfo.Invoke(Object target, Object[] values) ilOffset = 0x4F
    at WebServiceHandler.Invoke() ilOffset = 0xC3
    at WebServiceHandler.CoreProcessRequest() ilOffset = 0x13E
    at SyncSessionlessHandler.ProcessRequest(HttpContext context) ilOffset = 0x39
    at HandlerWrapper.ProcessRequest(HttpContext context) ilOffset = 0x7
    at CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() ilOffset = 0x18D
    at HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) ilOffset = 0x15
    at ApplicationStepManager.ResumeSteps(Exception error) ilOffset = 0x10A
    at HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData) ilOffset = 0x5C
    at HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) ilOffset = 0x16A
    at ISAPIRuntime.ProcessRequest(IntPtr ecb, Int32 iWRType) ilOffset = 0x4B
    >Crm Exception: Message: Generic SQL error., ErrorCode: -2147204784, InnerException: Microsoft.Crm.CrmException: Generic SQL error. ---> Microsoft.Crm.CrmException: Generic SQL error. ---> System.Data.SqlClient.SqlException: The provided statistics stream is corrupt.
    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.ExecuteDbDataReader(CommandBehavior behavior)
    at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader()
    at Microsoft.Crm.CrmDbConnection.InternalExecuteWithRetry[TResult](Func`1 ExecuteMethod, IDbCommand command)
    at Microsoft.Crm.CrmDbConnection.InternalExecuteReader(IDbCommand command, Boolean capturePerfTrace)
    at Microsoft.Crm.CrmDbConnection.ExecuteReader(IDbCommand command, Boolean impersonate, Boolean capturePerfTrace)
    at Microsoft.Crm.BusinessEntities.BusinessProcessObject.ExecuteQuery(CrmDbConnection dbConnection, IDbCommand command, ISqlExecutionContext context, Nullable`1 commandTimeout)
    at Microsoft.Crm.Workflow.WorkflowNotificationPlugin.ResumeAsyncOperations(Guid entityId, String entityName, ExecutionContext context)
    at Microsoft.Crm.Workflow.WorkflowNotificationPlugin.Execute(IServiceProvider serviceProvider)
    at Microsoft.Crm.Extensibility.V5PluginProxyStep.ExecuteInternal(PipelineExecutionContext context)
    at Microsoft.Crm.Extensibility.VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context)
    --- End of inner exception stack trace ---
    --- End of inner exception stack trace ---
    at Microsoft.Crm.Extensibility.VersionedPluginProxyStepBase.Execute(PipelineExecutionContext context)
    at Microsoft.Crm.Extensibility.Pipeline.Execute(PipelineExecutionContext context)
    at Microsoft.Crm.Extensibility.MessageProcessor.Execute(PipelineExecutionContext context)
    at Microsoft.Crm.Extensibility.InternalMessageDispatcher.Execute(PipelineExecutionContext context)
    at Microsoft.Crm.Extensibility.ExtensiblePlatformMessageDispatcher.Execute(PipelineExecutionContext pluginContext)
    at Microsoft.Crm.Extensibility.ExtensiblePlatformMessageDispatcher.UpdateWithInvocationSource(BusinessEntity entity, FilterExpression filter, Int32 invocationSource, ExecutionContext context)
    at Microsoft.Crm.Extensibility.ExtensiblePlatformMessageDispatcher.Update(BusinessEntity entity, FilterExpression filter, ExecutionContext context)
    at Microsoft.Crm.BusinessEntities.BusinessProcessObject.UpdateWithPipelineAndExtensions(IBusinessEntity entity, ExecutionContext context)
    [2017-01-31 12:21:13.895] Process: w3wp |Organization:00000000-0000-0000-0000-000000000000 |Thread: 99 |Category: Exception |User: 00000000-0000-0000-0000-000000000000 |Level: Error |ReqId: f7f02fe4-60ae-413b-8e49-297fad12d9cf | CrmException..ctor ilOffset = 0x7
    at CrmException..ctor(String message, Exception innerException, Int32 errorCode, Boolean isFlowControlException) ilOffset = 0x7
    at CrmException..ctor(String message, Int32 errorCode) ilOffset = 0x5
    at PlatformCommand.CreateCrmExceptionFromServiceFault(FaultException`1 fe) ilOffset = 0x1B
    at PlatformCommand.XrmExecuteInternal() ilOffset = 0xF6
    at UpdateCommand.Execute() ilOffset = 0x7
    at RecentlyViewedList.SaveInternal(IOrganizationContextEx context, Int32 typeCode, String recentlyViewedXml, Dictionary`2 entityList) ilOffset = 0x34
    at RecentlyViewedList.SaveAll(IOrganizationContextEx context, Boolean dataChanged, IList`1 clientEntityList, IList`1 clientViewList, ICollection`1 etcList) ilOffset = 0xCC
    at RecentlyViewedList.SaveAll(IOrganizationContextEx context, String recentlyViewedXml) ilOffset = 0x80
    at RecentlyViewedWebService.UploadRecentlyViewed(String recentlyViewedXml, Boolean retrieveAfterUpdated) ilOffset = 0x11
    at RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) ilOffset = 0xFFFFFFFF
    at RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) ilOffset = 0x25
    at RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) ilOffset = 0x89
    at LogicalMethodInfo.Invoke(Object target, Object[] values) ilOffset = 0x4F
    at WebServiceHandler.Invoke() ilOffset = 0xC3
    at WebServiceHandler.CoreProcessRequest() ilOffset = 0x13E
    at SyncSessionlessHandler.ProcessRequest(HttpContext context) ilOffset = 0x39
    at HandlerWrapper.ProcessRequest(HttpContext context) ilOffset = 0x7
    at CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() ilOffset = 0x18D
    at HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) ilOffset = 0x15
    at ApplicationStepManager.ResumeSteps(Exception error) ilOffset = 0x10A
    at HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData) ilOffset = 0x5C
    at HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) ilOffset = 0x16A
    at ISAPIRuntime.ProcessRequest(IntPtr ecb, Int32 iWRType) ilOffset = 0x4B
    >Crm Exception: Message: Generic SQL error., ErrorCode: -2147204784
    [2017-01-31 12:21:13.896] Process: w3wp |Organization:7216af00-374b-41f1-b31a-35677fe29f20 |Thread: 99 |Category: Application |User: 00000000-0000-0000-0000-000000000000 |Level: Error |ReqId: f7f02fe4-60ae-413b-8e49-297fad12d9cf | ErrorInformation.LogError ilOffset = 0x17
    >MSCRM Error Report:
    --------------------------------------------------------------------------------------------------------
    Error: Generic SQL error.
    
    Error Number: 0x80044150
    
    Error Message: Generic SQL error.
    
    Error Details: Generic SQL error.
    
    Source File: Not available
    
    Line Number: Not available
    
    Request URL: crmsrv/.../RecentlyViewedWebService.asmx
    
    Stack Trace Info: [CrmException: Generic SQL error.]
    at Microsoft.Crm.Application.Platform.ServiceCommands.PlatformCommand.XrmExecuteInternal()
    at Microsoft.Crm.Application.Platform.ServiceCommands.UpdateCommand.Execute()
    at Microsoft.Crm.Application.Utility.RecentlyViewedList.SaveInternal(IOrganizationContextEx context, Int32 typeCode, String recentlyViewedXml, Dictionary`2 entityList)
    at Microsoft.Crm.Application.Utility.RecentlyViewedList.SaveAll(IOrganizationContextEx context, Boolean dataChanged, IList`1 clientEntityList, IList`1 clientViewList, ICollection`1 etcList)
    at Microsoft.Crm.Application.Utility.RecentlyViewedList.SaveAll(IOrganizationContextEx context, String recentlyViewedXml)
    at Microsoft.Crm.Core.Application.WebServices.RecentlyViewedWebService.UploadRecentlyViewed(String recentlyViewedXml, Boolean retrieveAfterUpdated)


  • Suggested answer
    Nithya Gopinath Profile Picture
    17,078 on at

    Hi,

    You could enable tracing for Dynamics CRM instead of using diagnostic tool.

    support.microsoft.com/.../how-to-enable-tracing-in-microsoft-dynamics-crm

    Have you tried that?

  • ShahXu Profile Picture
    1,515 on at

    Yes i tried it as well

  • Verified answer
    ShahXu Profile Picture
    1,515 on at

    Issue resolved... didn't get the root cause but the resolution process is shared below.

    step 1 :  run on sql management studio --> EXEC sp_updatestats

    it gave this error "The provided statistics stream is corrupt." on table "WorkflowWaitSubscriptionBase"

    Step 2 : checked all the indexes of above table and tried to rebuild them so the culprit index was "ndx_CascadeRelationship_AsyncOperation_WorkflowWaitSubscription"

    Step 3: Deleted the above index and recreated by script 

    CREATE NONCLUSTERED INDEX [ndx_CascadeRelationship_AsyncOperation_WorkflowWaitSubscription] ON [dbo].[WorkflowWaitSubscriptionBase]
    (
    [AsyncOperationId] ASC
    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 80) ON [PRIMARY]
    GO

    now we can perform all the CRUD operations sucessfully.

     

    Thanks all for your precious time and advices.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans