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)

SQL Locking when attempting to print an Invoice...

(0) ShareShare
ReportReport
Posted on by 170

Hello,

Lately, we have encountered SQL locking on production database when attempting to print a document like an invoice.  This is happening more frequently now.  We also isolated it to one particular Sales Order.  If we attempt to print the invoice for that one Sales Order, it locks up every single time forcing to end the process to unlock.  

We found this...

https://blogs.msdn.microsoft.com/axsupport/2011/09/22/severe-sql-locking-and-blocking-on-dynamics-ax/

But this doesn't apply because that setting was already on.

How can we troubleshoot this further and now can I reprint this Invoice now that it is impossible.

Any help is appreciated.

Thank you,

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    André Arnaud de Calavon Profile Picture
    301,020 Super User 2025 Season 2 on at

    Hi mikefern,

    Did you use SQL monitoring to find out the SQL command which is causing the block? Then you know the call and can see if it is related to a customization or not. You can also enable database logging from within the client. In that case there you can find SQL calls together with x++ code reference.

    You can find more information about this on the next page: Tracing with the Tools Menu [AX 2012].

  • Suggested answer
    Vilmos Kintera Profile Picture
    46,149 on at

    Do you have the correct trace flags set on your SQL Server instance, especially for the lock escalation?

    blogs.msdn.microsoft.com/.../dynamics-ax-and-sql-server-trace-flags-quick-and-dirty

    Are you doing regular index and statistics maintenance for your AX databases, to avoid fragmentation?

    Do you have dataareaid literals setting enabled, to have separate query plans per legal entity and avoid parameter sniffing in SQL?

    blogs.msdn.microsoft.com/.../sql-server-parameter-sniffing-with-dynamics-ax-just-plain-evil-redux-5-19-2014

    Do you have SQL Server disks set up as per recommendation? I.e. multiple TempDB data files, AX data and log files on separate drives and I/O communication channel paths/controllers spread across multiple disks?

    Please troubleshoot your environment as per the above and let us know about the details.

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
Priya_K Profile Picture

Priya_K 4

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#3
Ali Zaidi Profile Picture

Ali Zaidi 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans