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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Enable tracing for deadlock in AX client for all users

(0) ShareShare
ReportReport
Posted on by 11,633

Hi All,

One of my client have recently experienced frequent deadlocks in SQL, so in order to track it from AX client and which user is causing this, I am thinking of enable deadlock tracing from AX client. As I need to enable it for all users, I have written a below X++ job to do that. I am going to do this in LIVE environment of client, so just wanted to know if anyone have any experience of enabling this flag before and is there any performance impact? Please note that I am just enabling just one flag related to Deadlocks which write the data in database(SysTraceSQLTable is the name of the table I guess), so I don't there would be any performance impact but just wanted to double check. Also, let me know if there is any modifications required in the below job.

static void enableTracingForDeadLocks(Args _args)
{
boolean enable = true;
UserInfo userInfo;

#LOCALMACRO.FLAG_SQLTrace (1 << 8) #ENDMACRO
#LOCALMACRO.FLAG_TraceInfoDeadLockTable (1 << 15) #ENDMACRO
;

ttsbegin;
while select forupdate userInfo
{
userInfo.DebugInfo = userInfo.DebugInfo | #FLAG_SQLTrace;
userInfo.TraceInfo = userInfo.TraceInfo | #FLAG_TraceInfoDeadLockTable;

userInfo.update();
}
ttscommit;
}

Thanks,

Baber.

*This post is locked for comments

I have the same question (0)

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Joris dG Profile Picture

Joris dG 5

#2
Alexey Lekanov Profile Picture

Alexey Lekanov 2

#2
Henrik Nordlöf Profile Picture

Henrik Nordlöf 2 User Group Leader

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans