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 :
Finance | Project Operations, Human Resources, ...
Unanswered

Number sequence-deadlock

(0) ShareShare
ReportReport
Posted on by 346

Dear experts,

For past few weeks , client experience AX 2009 application slowness ,freezes and not allow to login to users in some intervals only . Post some analysis, it has been noticed that always SQL database had dead blocks as follows ,which is related to number sequence table.

SELECT TOP 1 A.NUMBERSEQUENCE, A.TXT, A.LATESTCLEANDATETIME, A.LATESTCLEANDATETIMETZID, A.LOWEST, A.HIGHEST, A.NEXTREC, A.BLOCKED, A.FORMAT, A.CONTINUOUS, A.CYCLIC, A.CLEANATACCESS, A.INUSE, A.NOINCREMENT, A.CLEANINTERVAL, A.DEL_LATESTCLEANDATE, A.DEL_LATESTCLEANTIME, A.ALLOWCHANGEUP, A.ALLOWCHANGEDOWN, A.MANUAL, A.FETCHAHEADQTY, A.FETCHAHEAD, A.MODIFIEDTRANSACTIONID, A.RECVERSION, A.RECID

FROM NUMBERSEQUENCETABLE A WITH ( UPDLOCK) WHERE ((DATAAREAID=@P1) AND (NUMBERSEQUENCE=@P2)) )

https://community.dynamics.com/ax/f/microsoft-dynamics-ax-forum/102526/number-sequence-database-blocking/195823

 In this blog , it quoted as Continuous number sequences might cause this issue and suggested to disable Continuous .It is strongly recommend going through the list of numbersequences and disable "Continuous" on all that does not have this strict business requirement. More often, users think the number sequences MUST be Continuous, while it isn't necessarily so. Any continuous numbersequence can cause degraded performance if not used correctly.

But client has continuous number sequence for proforma Invoice, Sales Invoice , Sales delivery note number sequence and as per local regulatory requirements these codes should be continuous only ,but it causes deadlock .

Could any one of guide how to overcome this situation ? Thanks in advance.

I have the same question (0)
  • sri17 Profile Picture
    346 on at

    Hi All ,

    Could any one of guide how to overcome this situation ? Thanks in advance.

  • André Arnaud de Calavon Profile Picture
    300,917 Super User 2025 Season 2 on at

    Hi Sri,

    You have to check if you are running the latest available CU update on AX2009. Then try to trace back which exact process is causing this deadlock. You should be able to see the SPIDs in SQL activity monitor and link it back on the online users form. Then you know which persons did start an action which could be the culprit.

  • sri17 Profile Picture
    346 on at

    Hi Andre ,

    Thanks for reply .

    We have identified the issue that while business user posting the sales praforma invoice ,then SQL creates deadlocks and not allowed to post that transaction and application freezes . Based on the deadlock ,below post highlights that it is because of continuous number sequence ,which to be disabled ,but as per local regulatory requirements , client not allowed to disable continuous number sequence and looking for a workaround .

    https://community.dynamics.com/ax/f/microsoft-dynamics-ax-forum/102526/number-sequence-database-blocking/195823

    Any insights from your end ?

  • André Arnaud de Calavon Profile Picture
    300,917 Super User 2025 Season 2 on at

    Did you already check if you are running the latest available CU for AX2009? There might be a fix. However, in more recent versions (AX2012

    and Dynamics 365, the way continuous numbers are maintained in the database has been redesigned.

  • sri17 Profile Picture
    346 on at
    [quote]

    Did you already check if you are running the latest available CU for AX2009? There might be a fix. However, in more recent versions (AX2012

    and Dynamics 365, the way continuous numbers are maintained in the database has been redesigned.

    [/quote]

    Thanks Andre for the reply . Client running AX 2009 for two countries only and rest all countries on AX 2012 . AX 2009 counties also planned to upgrade to R3 shortly,hence they don't have any plan for latest CU updates of AX 2009.

    You quoted that continuous numbers are maintained in the database has been redesigned in AX 2012 and D365 . Could you provide any blog or ms portal to understand about indetail ?

    Thanks in advance for your support

  • André Arnaud de Calavon Profile Picture
    300,917 Super User 2025 Season 2 on at

    Hi sri17,

    I don't have any link with detailed information about the differences. In AX 2009 it was handled with logic within the application. In AX2012 the number sequences are managed also using SQL stored procedures.

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 > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 664 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 522 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 303 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans