, , ,

Hello Everyone,

Last week was a period of struggle for me with Dynamics CRM. In this current post I’ll discuss one of my experience which perplexed me for whole day long.

Actually one of my client was using CRM Online, and later they decided to move to On-Premise. After taking the Database from Online, I Imported the Organization to On-Premise.

Afterwards, When I tried to Create an Entity it failed with the following SQL Error:

When I downloaded the Error log file then it simply says:

System.Data.SqlClient.SqlException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #D41DF5C9.

Since it was an SQL Server Error so I used the SQL Profiler to fetch the error details but even that says:

DBCC execution completed. If DBCC printed error messages, contact your system administrator.

Having no clue as what might be the reason for such error, I finally ran the Trace and looked into the Trace files generated at:

My Computer -> Local Drive C: -> Program Files -> Microsoft Dynamics CRM -> Trace

There was a total of 6 different Trace files which I had to go through minutely, and finally came through the Error Details:

The EXECUTE permission was denied on the object ‘sp_MS_marksystemobject’, database ‘mssqlsystemresource’, schema ‘sys’


I Google it out and found that this error is faced mostly when an Organization is Imported from Online to On-Premise.

The resolution was to grant execute access to the stored procedure ‘sp_MS_marksystemobject’ by running the following query on Master DB:

grant exec on sp_MS_marksystemobject to [Domain\SQLAccess Group {GUID for group}]
grant exec on sp_MS_marksystemobject to [NT AUTHORITY\NETWORK SERVICE]

where Domain is the name of the AD domain in which the SQLAccess Group is contained and GUID is the id that is part of the SQL Access Group name.

After executing both the queries I was now able to Create Entities in the Imported Organization.

This has also been explained further in much detail here.

Hope this was helpful.