Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Unanswered

DB Deadlock caused by changetracking trigger

(0) ShareShare
ReportReport
Posted on by 593

Hi I tried to Setup the changetracking inside Dynamics AX2012. Therefore I enabled the changetracking on the databases I want and created the triggers in the related tables.

My triggers are set on the following table:

  • ECORESPRODUCT
  • EcoResProductTranslation
  • InventDimCombination
  • RetailAssortmentLookup
  • EcoResProductCategory
  • EcoResProductMasterDimensionValue
  • EcoResInstanceValue
  • EcoResAttributeValue
  • EcoResValue

For all these tables I do have an update, insert and delete trigger.

since the changetracking is running I am not able tocreate values in  the EcoResValue table. There is always a deadlock on the DB

The error message Looks like

Cannot add arecord in The base table for other value tables that each stores values of a different data type (EcoResValue), RelationTypeField: xxxx, xxxxxxx. Deadlock, one or more users try….

Any suggestions why this happens and how I can track changes in the EcoRes Tables?

  • Sunnyw Profile Picture
    Sunnyw on at
    RE: DB Deadlock caused by changetracking trigger

    Hello CRSW,

    In addition, you may want to work with DBA to gather deadlock event or report to understand what SQL statements involved with deadlock to troubleshoot further.  You can also obtain yourself using existing tools like extended event, see www.mssqltips.com/.../.  It would also be easy to troubleshoot in isolated environment with replication step as well.

  • Jim Ji Profile Picture
    Jim Ji on at
    RE: DB Deadlock caused by changetracking trigger

    How did you insert the records(SQL script / X++ / UI)? would you share your code or provide more information.

    Change tracking won't cuase deadlock issue normally.

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

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,458 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans