locked
<Message>Generic SQL error.</Message> RRS feed

  • Question

  • Error Details:

    Error Message:
    Unhandled Exception: Microsoft.Xrm.Sdk.InvalidPluginExecutionException: An error occurred in the FollupupPlugin plug-in.
       at Microsoft.Crm.Sdk.Samples.Welcome.Execute(IServiceProvider serviceProvider)
       at Microsoft.Crm.Asynchronous.V5ProxyPlugin.Execute(IServiceProvider serviceProvider)
       at Microsoft.Crm.Asynchronous.EventOperation.InvokePlugin(AsyncExecutionContext context, IPlugin pluginInstance)
    Inner Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: Generic SQL error.Detail: 
    <OrganizationServiceFault xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/xrm/2011/Contracts">
      <ErrorCode>-2147204784</ErrorCode>
      <ErrorDetails xmlns:d2p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
      <Message>Generic SQL error.</Message>
      <Timestamp>2014-06-11T06:56:19.2862541Z</Timestamp>
      <InnerFault>
        <ErrorCode>-2147204784</ErrorCode>
        <ErrorDetails xmlns:d3p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
        <Message>Generic SQL error.</Message>
        <Timestamp>2014-06-11T06:56:19.2862541Z</Timestamp>
        <InnerFault>
          <ErrorCode>-2147204784</ErrorCode>
          <ErrorDetails xmlns:d4p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
          <Message>Generic SQL error.</Message>
          <Timestamp>2014-06-11T06:56:19.2862541Z</Timestamp>
          <InnerFault>
            <ErrorCode>-2147220970</ErrorCode>
            <ErrorDetails xmlns:d5p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic" />
            <Message>System.Data.SqlClient.SqlException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #8282382C</Message>
            <Timestamp>2014-06-11T06:56:19.2862541Z</Timestamp>
            <InnerFault i:nil="true" />
            <TraceText i:nil="true" />
          </InnerFault>
          <TraceText i:nil="true" />
        </InnerFault>
        <TraceText i:nil="true" />
      </InnerFault>
      <TraceText i:nil="true" />
    </OrganizationServiceFault>
       at Microsoft.Crm.Extensibility.OrganizationSdkServiceInternal.Create(Entity entity, CorrelationToken correlationToken, CallerOriginToken callerOriginToken, WebServiceType serviceType)
       at Microsoft.Crm.Extensibility.InprocessServiceProxy.CreateCore(Entity entity)

    Scenario: I have triggered a plugin in Async mode for send Email functionality for more than 5000+ records.

    Plug-in started on - 11:52 A.M and Failed on around 12.28 P.M [duration of more than 30 mins] , So Failed with above mentioned error message "Generic SQL Error"

    Is there any workaround for this situation?

    Basically i have thought of Timeouts,Query Optimization.

    Kindly Suggest any other soltuin for the same.


    If this post answers your question, please click &quot;Mark As Answer&quot; on the post and &quot;Mark as Helpful&quot;

    Wednesday, June 11, 2014 12:58 PM

All replies

  • did the initial set succeed?  If you are plugging into 5000+ records for each email, you might want to come up with a different solution.  If you're doing some sort of one-time mass update, you might want to think about writing a command line executable and page the records into smaller sets thereby applying a governor of sorts.  Since the generic SQL error doesn't really tell us anything, I'm guessing that you swamped it -- something seemingly impossible to accomplish through the snail-paced web resources.

    http://msdn.microsoft.com/en-us/library/gg327917.aspx

    • Edited by mardukes Wednesday, June 11, 2014 1:28 PM
    Wednesday, June 11, 2014 1:25 PM
  • Actual Scenario is that,

    I have created a Plugin which create email activities for the records that ws getting from linq query [5000+] , And Similary update a field on related entity from which i got relevant records (not for all records , only for those valid emailaddress).

    Since, The plugin started on 11:52 A.M there are 3000+ emails suppose to go through the plugin[Email Activity], Instead around 1700 mails went out successfully and plu-in gets Failed showing the above mentioned Error...

    Note :  there more 2 instances of the same plugin triggered [with not that much huge records]and running simultaneously, these 2 plu-in instances completed successfully and not consumed that much of time to complete.


    If this post answers your question, please click &quot;Mark As Answer&quot; on the post and &quot;Mark as Helpful&quot;

    Wednesday, June 11, 2014 1:34 PM
  • 1. You need to use execute multiple command http://msdn.microsoft.com/en-gb/library/jj863631.aspx

    2. Retreive 1000 records create emails and update these 1000 records and then retrieve next 1000 record...............

    3. Log errors some where in cvs file with the id of record.

    4. A console application or windows service is a better option then plugin.


    Regards Faisal

    Wednesday, June 11, 2014 2:27 PM