Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

CRMAsynservice throwing an exception while connecting to the database.

Posted on by

Hello All,

I am getting below error.

Microsoft.Crm.CrmSqlGovernorRequestDeniedException: Unable to acquire lock on entity opportunity with id 42a00ed6-35ed-e611-80f5-005056b70140
at Microsoft.Crm.Workflow.Services.ActivityServiceBase.TryAcquireLockWithRetry(String entityLogicalName, Guid entityId)
at Microsoft.Crm.Workflow.Services.UpdateActivityService.<>c__DisplayClass1.<UpdateInternal>b__0(IOrganizationService sdkService)
at Microsoft.Crm.Workflow.Services.ActivityServiceBase.ExecuteInTransactedContext(ActivityDelegate activityDelegate)
at Microsoft.Crm.Workflow.Services.UpdateActivityService.UpdateInternal(Entity entity, String stepId)
at Microsoft.Crm.Workflow.Services.UpdateActivityService.ExecuteInternal(ActivityContext executionContext, UpdateEntity updateEntity)
at Microsoft.Crm.Workflow.Services.UpdateActivityService.Execute(ActivityContext executionContext, UpdateEntity updateEntity)
at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)

The above error i have got it from the database table.

while tracing i have got another error which says.

 Exception while trying to open the database connection Workstation ID=Servername.CrmAsyncService;Data Source=servername;Initial Catalog=dbname;Integrated Security=True;Min Pool Size=2;Connect Timeout=150;Application Name=MSCRMAsyncService : System.Data.SqlClient.SqlException (0x80131904): Cannot open database "databasename" requested by the login. The login failed.

can anybody help me in resolving this.

*This post is locked for comments

  • Kristian Cole Profile Picture
    Kristian Cole 290 on at
    RE: CRMAsynservice throwing an exception while connecting to the database.

    How many organisations do you have in the same environment?

  • Suggested answer
    Nadeeja Bomiriya Profile Picture
    Nadeeja Bomiriya 6,804 on at
    RE: CRMAsynservice throwing an exception while connecting to the database.

    HI EmployeeOcta,

    Is your Async service running under a service account?  Below are the permissions required for the service account.  Please check if they are configured correctly.

    Microsoft Dynamics CRM Asynchronous Processing Service and Microsoft Dynamics CRM Asynchronous Processing Service (maintenance) services

    1. Domain Users membership.

    2. PrivUserGroup and SQLAccessGroup membership. By default, these groups are created and appropriate membership is granted during Microsoft Dynamics CRM Server Setup.

    3. Built-in local group Performance Log Users membership.

    4. That account must be granted the Logon as service permission in the Local Security Policy.

    5. Folder read and write permission on the Trace folder, by default located under \Program Files\Microsoft Dynamics CRM\, and user account %AppData% folder on the local computer.

    6. Read and write permission to the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSCRM and HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\MSCRMSandboxService subkeys in the Windows registry.

    7, The service account may need an SPN for the URL used to access the website that is associated with it. To set the SPN for the Asynchronous Service account, run the following command at a command prompt on the computer where the service is running.

    SETSPN –a MSCRMAsyncService/<ComputerName> <service account>

  • EmployeeOcta Profile Picture
    EmployeeOcta on at
    RE: CRMAsynservice throwing an exception while connecting to the database.

    This issue is resolved but i am not sure the solution was correct or not.

    what we have done is the connectionstring in the above database from within MSCRM_Config database we changed with the actual database to which we wanted the service should connect.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans