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)

Blocking on BatchRunServerTaskLock

(0) ShareShare
ReportReport
Posted on by

DECLARE @res int; EXEC @res = SP_GETAPPLOCK @resource = N'BatchRunServerTaskLock', @lockmode = 'shared', @locktimeout = [moved from the title by a moderator]

why I  see blocking related with this every time in SQL databases?

Wait type:- APPLICATION: 8:0:[BatchRunServerTaskLock]:(401b210f)

I dont find any good AX block that mention about this type of application lock. can some one explain? 

|------ 1516 xp_userlock

|.......|------ 276 xp_userlock

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Martin Dráb Profile Picture
    239,108 Most Valuable Professional on at

    You see a lock because the code works - the point of SP_GETAPPLOCK is creating a lock.

  • Community Member Profile Picture
    on at

    You see a lock because the code works ?? so this is general  behavior of AX? , I have seem this all time . when i run blocking report ,I always see session getting block in SQL end and wait resource =APPLICATION: 8:0:[BatchRunServerTaskLock]:(401b210f)....I have excluded this one from my blocking report to avoid continuous alert. but curious to know..why it happening...  

  • Martin Dráb Profile Picture
    239,108 Most Valuable Professional on at

    You didn't tell us anything about any logic. You asked about the code and the purpose of this code indeed is to take a lock on BatchRunServerTaskLock.

    If you have any problem with this lock, now it's time to explain it to us. You mentioned a blocking, but if it's short and justified, it's not a problem by itself.

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

Basit 1

#1
GL-01081504-0 Profile Picture

GL-01081504-0 1

#1
Roya Profile Picture

Roya 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans