Keep getting SQL Server error when publishing customisations in MS CRM 2011
-
22. dubna 2012 4:12
Hi,
When I publishing customisations, I regularly got a SQL Server error. When I look at the Event viewer on the web server, it has an entry wtih the error details as below:
"Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 22/04/2012 12:38:20 PM
Event time (UTC): 22/04/2012 2:38:20 AM
Event ID: 081e47d7e4b047bda48b2df37d4cb055
Event sequence: 1329
Event occurrence: 23
Event detail code: 0
Application information:
Application domain: /LM/W3SVC/1/ROOT-1-129795349165742500
Trust level: Full
Application Virtual Path: /
Application Path: C:\Program Files\Microsoft Dynamics CRM\CRMWeb\
Machine name: CSIVCRM02
Process information:
Process ID: 9264
Process name: w3wp.exe
Account name: NT AUTHORITY\NETWORK SERVICE
Exception information:
Exception type: SqlException
Exception message: Cannot generate SSPI context.
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()
at System.Data.SqlClient.TdsParser.ProcessSSPI(Int32 receivedLength)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK)
at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, TimeoutTimer timeout)
at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, TimeoutTimer timeout, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)
at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
at Microsoft.Crm.CrmDbConnection.Open()
at Microsoft.Crm.SqlExecutionContext.OnBeginRequest(Boolean startTransaction, IsolationLevel isoLevel, SolutionOperationContext operationContext, Guid solutionId, String workloadGroup)
at Microsoft.Crm.BusinessEntities.ExecutionContext.OnBeginRequest(Guid userId, Boolean startTransaction, IsolationLevel isolationLevel, ExecutionOperationContext operationContext, CallerOriginToken originToken)
at Microsoft.Crm.Metadata.RelationshipEligibilityChecker.CanEntityBeReferencedEntity(Guid possibleReferencedEntityId)
at Microsoft.Crm.Metadata.RelationshipEligibilityChecker.GetAllowedReferencingEntities(Guid referencedEntityId, ExecutionContext context)
at Microsoft.Crm.Metadata.RelationshipEligibilityChecker.GetAllowedReferencingEntities(Guid referencedEntityId)
at Microsoft.Crm.Metadata.EntityRelationshipService.GetAllowedReferencingEntities(Guid referencedEntityId)
at Microsoft.Crm.SystemCustomization.SCUtil.GetAllowedReferencingEntities(Guid referencedEntityId)
at Microsoft.Crm.Web.Tools.Views.FormEditorPage.ConfigurePage()
at Microsoft.Crm.Application.Controls.PageManager.OnPreRender(EventArgs e)
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Request information:
Request URL: https://thefaculty.accelero.com.au:443/tools/formEditor/formeditor.aspx?action=-1&appSolutionId={FD140AAF-4DF4-11DD-BD17-0019B9312238}&formId=894CC46A-B0CB-4AB0-8BF6-200544E46A2D&formtype=main&objectTypeCode=2&pagemode=iframe&sitemappath=Workplace|Database|nav_conts
Request path: /tools/formEditor/formeditor.aspx
User host address: 121.44.206.27
User: AHS\Administrator
Is authenticated: True
Authentication Type: Federation
Thread account name: NT AUTHORITY\NETWORK SERVICE
Thread information:
Thread ID: 38
Thread account name: NT AUTHORITY\NETWORK SERVICE
Is impersonating: False
Stack trace: at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning()
at System.Data.SqlClient.TdsParser.ProcessSSPI(Int32 receivedLength)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK)
at System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(ServerInfo serverInfo, String newPassword, Boolean redirectedUserInstance, SqlConnection owningObject, SqlConnectionString connectionOptions, TimeoutTimer timeout)
at System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, TimeoutTimer timeout, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance)
at System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)
at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.SqlClient.SqlConnection.Open()
at Microsoft.Crm.CrmDbConnection.Open()
at Microsoft.Crm.SqlExecutionContext.OnBeginRequest(Boolean startTransaction, IsolationLevel isoLevel, SolutionOperationContext operationContext, Guid solutionId, String workloadGroup)
at Microsoft.Crm.BusinessEntities.ExecutionContext.OnBeginRequest(Guid userId, Boolean startTransaction, IsolationLevel isolationLevel, ExecutionOperationContext operationContext, CallerOriginToken originToken)
at Microsoft.Crm.Metadata.RelationshipEligibilityChecker.CanEntityBeReferencedEntity(Guid possibleReferencedEntityId)
at Microsoft.Crm.Metadata.RelationshipEligibilityChecker.GetAllowedReferencingEntities(Guid referencedEntityId, ExecutionContext context)
at Microsoft.Crm.Metadata.RelationshipEligibilityChecker.GetAllowedReferencingEntities(Guid referencedEntityId)
at Microsoft.Crm.Metadata.EntityRelationshipService.GetAllowedReferencingEntities(Guid referencedEntityId)
at Microsoft.Crm.SystemCustomization.SCUtil.GetAllowedReferencingEntities(Guid referencedEntityId)
at Microsoft.Crm.Web.Tools.Views.FormEditorPage.ConfigurePage()
at Microsoft.Crm.Application.Controls.PageManager.OnPreRender(EventArgs e)
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Custom event details: "
Could anyone help me with this?
Thank you so much.
Cheers
Lisa
Lisa Li
Všechny reakce
-
23. dubna 2012 13:53ModerátorRun SQL Server Profiler on the SQL Server and while it is running recreate the error. Then review the profiler logs to find what query is causing the problem. This should help give you some clues.
Jamie Miley
Check out my about.me profile!
http://mileyja.blogspot.com
Linked-In Profile
Follow Me on Twitter! -
23. dubna 2012 18:31
Hi LisaLi,
One thing that worked for me was the follow:
Method 1: Add the OLEDBTimeout and the ExtendedTimeout registry subkeys to increase the time-out values
Warning Serious problems might occur if you modify the registry incorrectly by using Registry Editor or by using another method. These problems might require that you reinstall your operating system. Microsoft cannot guarantee that these problems can be solved. Modify the registry at your own risk.- Click Start, click Run, type regedit, and then click OK.
- Locate the following registry subkey:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSCRM
- Right-click MSCRM, point to New, and then click DWORD Value to create a new DWORD value.
- Rename the DWORD value to the following value:
OLEDBTimeout
- Right-click the DWORD value, and then click Modify.
- In the Edit DWORD Value dialog box, type 86400 in the
Value data box, click Decimal in the Base option, and then click
OK.
Note According to the requirement of the computer that is running SQL server and the number of customization files, the value can be larger than 86400. The value of 86400 is equivalent to 24 hours. - Right-click MSCRM, point to New, and then click DWORD Value to create a new DWORD value.
- Rename the DWORD value to the following value:
ExtendedTimeout
- Right-click the DWORD value, and then click Modify.
- In the Edit DWORD Value dialog box, type 1000000 in the
Value data box, and then click OK.
Notes- In the Value data box, you can type a value that is larger than 1,000,000. However, do not type a value that is larger than 2,147,483,647. This is hexadecimal 0x7FFFFFFF.
- If this key already exists, notice the current value. After you have completed the import or the upgrade for Microsoft Dynamics CRM, set the value of this key back to the original value or delete the key if it did not previously exist. The default OLEDB timeout value is 30 seconds.
References: http://support.microsoft.com/kb/918609
Hope this help.
- Navržen jako odpověď Michael D. Mayo 23. dubna 2012 21:53
-
23. dubna 2012 21:53
I agree with Adriano Chaves - MCITP
ALSO - look at this: http://social.microsoft.com/Forums/en-US/crm/thread/3ad95fef-ebe5-48ba-8cd3-870e20417ceb
I hope this helps. If my response answered your question, please mark the response as an answer and also vote as helpful. Michael Mayo
-
25. dubna 2012 5:27
Thanks Adriano, i have applied the above, and will test and monitor the web server for next few days to see if the issue has been resovled. will keep you updated.
Lisa
Lisa Li
-
25. dubna 2012 5:28
thanks Michael and will keep you updated with my testing results within next few days.
Cheers
Lisa Li
-
25. března 2013 18:02ModerátorDid you get this resolved, what were the results of your testing?
Jamie Miley
Check out RBA Today!
Check out my about.me profile!
http://mileyja.blogspot.com
Linked-In Profile
Follow Me on Twitter!