Generic Sql Error Ms Crm 4.0
: https://community.dynamics.com/product/crm/crmtechnical/b/xrmavanade/archive/2011/04/26/troubleshooting-crm-quot-generic-sql-error-quot.aspx The Microsoft CRM web-services normally give you pretty good error messages when you make an invalid request, but occasionally you will get this error message: “Generic Sql Error”. These errors pop up enough that they’ve become a fairlycommon question on the CRM development forums. The usual responses are to either enable CRM tracing or use SQL Server Profiler to get a better error message. I find that the CRM trace logs don’t always give you anything better that the same generic error message the SDK provides, so SQL profiler is probably the better option. However, if you don’t have experience using the SQL Profiler it can be hard to find the actual error message in the vast amount of data it provides. These are the steps I take to get to the bottom of most CRM “generic SQL” errors using the SQL Profiler: Open SQL server profiler on your SQL machine. You can usually find it in the start menu under SQL server 2008 ->Performance Tools. In SQL server profiler, click File -> Templates -> New Template. Select "Microsoft Sql Server 2008 R2" in the Server Type dropdown. Give the Template a name in the “New Template Name” field (something like “CRM Generic Sql Error”), and then click the “Event Selection” tab. On the “Event Selection” tab, check the “Show All Events” and “Show all Columns” checkboxes. In the Events table, scroll down and expand the “Errors and Warnings” section, then check the checkbox next to “Exception” (this will automatically check all the other boxes on the same row). In the same “Errors and Warnings” section, also check the “User Error Message” checkbox. This event will give you the real SQL error message. Expand the “Stored Procedures” section and check the “RPC Completed” checkbox. This event will give you the actual SQL statement that caused the SQL error (since CRM uses stored procedures for nearly everything). Next, click the “Column Filters” button, and select “DatabaseName”, and enter the name of your CRM database in the “Like” field. This will ensure that you only see CRM related data in the profiler output. N
(1) Google Analytics (1) Programming (7) C# (4) Dynamics CRM (1) SQL Server (2) SQL Server Reporting Services (2) Typescript (1) SEM (1) Uncategorized (7) Widgets (23) Brandstofprijzen Widget (3) Euro Stocks Widget (7) NL Weerradar Widget (12) Yahoo Search Marketing (1) Fighting “General SQL Error” in Dynamics CRM custom workflows Working for my client Valx, I had some serious problems in custom workflows for Microsoft Dynamics CRM 4. Every now and then, a workflow would throw a SoapException. I always put the original https://chitrarasan.wordpress.com/2012/05/09/troubleshooting-crm-generic-sql-error/ exception in the InvalidPluginExecutionException (second parameter "inner exception"). Now the actual exception information you want to see is in SoapException.Detail, which is an XmlNode. You won't see that info if you just put the SoapException in the InvalidPluginExecutionException's inner exception. Therefore, I use the following try/catch construction in each custom workflow's Execute method to see some relevant information in the WorkflowLog http://www.broes.nl/2011/09/fighting-general-sql-error-in-dynamics-crm-custom-workflows/ view of the Dynamics CRM database. try { // do stuff } catch (Exception ex) { string soapExceptionDetail = string.empty; if (ex is SoapException) { soapExceptionDetail = string.Format( "\nSoapException Detail: {0}\n", ((SoapException)ex).Detail.InnerText ); } throw new InvalidPluginExecutionException( string.Format( "An error occurred in the {0} plug-in.{1}", this.GetType().ToString(), soapExceptionDetail ), ex ); } Now sometimes, property names promise a bit too much. Because the error I was getting in the SoapException.Detail was the anything but helpful "Generic SQL Error" (0x80044150 or 2147762512). That could be anything. By the way, the following is the SQL query I'm running on the WorkflowLog view of the organization's Dynamics CRM database. It will only show the ones with an ErrorCode, sorted by newest date first. SELECT TOP 1000 [AsyncOperationIdName] ,[Description] ,[Message] ,[CreatedOn] ,[ModifiedOn] ,[CompletedOn] ,[StepName] ,[Status] ,[ErrorCode] ,[ActivityName] FROM [WorkflowLog] WHERE ErrorCode IS NOT NULL ORDER BY ModifiedOn DESC, StepName DESC We're looking at the "Message" column of data here. If a plugin throws an InvalidPluginExecutionException, you'll find the error message (provided you've entered one) and the stack trace (also of any inner exceptions) in this databa
(Nederlands)Polska (Polski)România (Română)Singapore (English)Türkiye (Türkçe)Россия (Русский)ישראל (עברית)المملكة العربية السعودية (العربية)ไทย (ไทย)대한민국 (한국어)中华人民共和国 (中文)台灣 (中文)日本 (日本語)香港特別行政區 (中文) https://social.microsoft.com/Forums/en-US/640ac516-4a0c-410a-8876-73b49c09c053/microsoft-dynamics-crm-generic-sql-error?forum=crm Microsoft Home Ask a question Quick access Forums home Browse forums users FAQ Search related threads Remove From My Forums Asked by: Microsoft Dynamics CRM - generic sql Generic SQL error. Dynamics > CRM Question 1 Sign in to vote Dear All With Dynamics CRM 2011, experiencing an issue with SQL. Log File; Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: Generic generic sql error SQL error.Detail: