web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Deadlock In SQL Dynamic AX

(1) ShareShare
ReportReport
Posted on by

please help I've been handling this error since yesterday

this deadlock effects on application performance to be extremely slow:

"Cannot create a record in DirPartyTable. Deadlocks, where on or more users have simultaneouslu locked the whole table or part of it"

been surf the whole time but cannot find exact solution. Any help would be appreciated.

Best Regards,

Eriko Prasetyo

*This post is locked for comments

I have the same question (0)
  • Brandon Wiese Profile Picture
    17,788 on at

    That's a rather unusual table to have deadlocks.

    Do you have SQL Server trace flag 1224 enabled?

    Have you enabled SQL Server trace flag 1222 to write deadlock information to the error log?

  • Community Member Profile Picture
    on at

    Hi Brandon,

    Sorry for late reply,

    This is what it looked like from SQL Statement Trace Log

    use.jpg

    From description : INSERT INTO DIRPARTYTABLE (INITIALS,CHILDRENNAMES,MARITALSTATUS,HOBBIES,GENDER,NAMESEQUENCE,PHONETICFIRSTNAME,PHONETICMIDDLENAME,PHONETICLASTNAME,PERSONALTITLE,PERSONALSUFFIX,PROFESSIONALTITLE,PROFESSIONALSUFFIX,BIRTHMONTH,BIRTHDAY,BIRTHYEAR,ANNIVERSARYMONTH,ANNIVERSARYDAY,ANNIVERSARYYEAR,COMMUNICATORSIGNIN,NAME,LANGUAGEID,NAMEALIAS,PARTYNUMBER,INSTANCERELATIONTYPE,KNOWNAS,PRIMARYADDRESSLOCATION,PRIMARYCONTACTEMAIL,PRIMARYCONTACTFAX,PRIMARYCONTACTPHONE,PRIMARYCONTACTTELEX,PRIMARYCONTACTURL,MODIFIEDDATETIME,MODIFIEDBY,CREATEDDATETIME,CREATEDBY,RECVERSION,RELATIONTYPE,PARTITION,RECID) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)

    use.jpg

    Please let me know if anybody come up with something.

    Best Regards,

    Eriko Prasetyo

  • Martin Dráb Profile Picture
    237,967 Most Valuable Professional on at

    A deadlock requires several queries blocking each other. Here you can see just one side of the problem; SQL Server logs will tell you what were the other queries, what kind of locks they held on which resources and so on.

  • Community Member Profile Picture
    on at

    Dear Martin,

    Can u guide on what to discover in SQL Server logs? Especially for my kind of deadlocks.

    Thank you,

    Best Regards,

    Eriko Prasetyo

  • Community Member Profile Picture
    on at

    And this is what it looks like from my SQL log, hope it helps:

    deadlock.png

    dead.png

  • Martin Dráb Profile Picture
    237,967 Most Valuable Professional on at

    It looks like you have deadlock details there. The logs above the highlighted lines shows details including one of the queries. You'll have to go through quite a few lines; you might find easier to export the log to a file and work with the file.

    You can also use other (possibly better) techniques, such as extended events.

  • Suggested answer
    Peter Janik Profile Picture
    70 on at

    You can also use system_health session in the Extended events and filter deadlock events.

    system_5F00_health.JPG

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans