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)

Strange deadlock in accountinevent table, bug in AX 2012?

(1) ShareShare
ReportReport
Posted on by

Find function in AOT can't find sql which causes stange deadlocks (AX 2012, SQL Server 2012)

Occasionally we encounter deadlocks lasting 0 seconds, causing by

UPDATE ACCOUNTINGEVENT SET STATE=3,RECVERSION=1044259975 WHERE ((PARTITION=5637144576) AND (STATE=2)) AND EXISTS (SELECT 'x' FROM SUBLEDGERJOURNALENTRY T2 WHERE ((T2.PARTITION=5637144576) AND (((T2.ACCOUNTINGEVENT=ACCOUNTINGEVENT.RECID) AND (T2.TRANSFERID=5637747324)) AND (T2.LEDGER=5637151326))) AND NOT (EXISTS (SELECT 'x' FROM SUBLEDGERJOURNALENTRY T3 WHERE ((T3.PARTITION=5637144576) AND (((T3.ACCOUNTINGEVENT=T2.ACCOUNTINGEVENT) AND (T3.STATUS<>2)) AND (T3.LEDGER<>T2.LEDGER))))))

keylock hobtid=72057642628612096 dbid=9 objectname=AXKUNTAX2012R2.dbo.ACCOUNTINGEVENT indexname=I_7456STATEIDX id=lock22d2fbff80 mode=X associatedObjectId=72057642628612096

owner id=process2c25498 mode=X

process id=process2c25498 taskpriority=0 logused=85176 waitresource=KEY: 9:72057642628612096 (dd16fd78610e) waittime=6795 ownerId=10538141175 transactionname=user_transaction lasttranstarted=2015-11-25T11:57:38.900 XDES=0x217a7dcb78 lockMode=U schedulerid=3 kpid=13440 status=suspended spid=78 sbid=0 ecid=0 priority=0 trancount=2 lastbatchstarted=2015-11-25T11:57:39.500 lastbatchcompleted=2015-11-25T11:57:39.500 lastattention=1900-01-01T00:00:00.500 clientapp=Microsoft Dynamics AX hostname=KPRO-AXAOS-02 hostpid=1604 loginname=KPRO\AxAOS1 isolationlevel=read committed (2) xactid=10538141175 currentdb=9 lockTimeout=4294967295 clientoption1=671088672 clientoption2=128056

User (SPID) behing the deadlock says that he/she probably in general ledger did voucher transactions query and exported it to excel (we have AX excel add-in installed in AOS but users does not use it in Excel)

*This post is locked for comments

I have the same question (0)
  • Community Member Profile Picture
    on at

    We found solution for that. Query used index I_7456STATEIDX non-clustered index seek (accountingevent table). We dropped column state from index I_7456STATEIDX and then put it back. Then the query stated using index I_7456RECID (clustered indek seek)

    teknokoodiradio.vuodatus.net

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