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

Need help with a blocking SQL statement

(0) ShareShare
ReportReport
Posted on by 5

(@P1 int)UPDATE T1 SET SHIPMENTSERIES=T2.SHIPMENTSERIES,ORIGIN=T2.ORIGIN,STONECOUNT=T2.STONECOUNT,WEIGHT=T2.WEIGHT,POTVALUE=T2.POTVALUE,RECVERSION=@P1 FROM IMXSSRSTASKHISTORYLAST T1 CROSS JOIN IMXTASKHISTORYTABLE T2 WHERE ((T1.PARTITION=5637144576) AND (T1.DATAAREAID=N'dtc')) AND (((T2.PARTITION=5637144576) AND (T2.DATAAREAID=N'dtc')) AND ((((((T2.POT=T1.POT) AND (T2.LINENUMBER=T1.LINENUMBER)) AND (T2.TASK=T1.TASK)) AND (T2.MILESTONE=T1.MILESTONE)) AND (T2.PRODUCTSTATUS=T1.PRODUCTSTATUS)) AND (T2.SIZE_=T1.SIZE_)))

This query creates a blocking every time it runs. How to resolve this blocking issue so that it never occurs again.

I have the same question (0)
  • Suggested answer
    Sergei Minozhenko Profile Picture
    23,093 on at

    Hi Nidhi,

    First, you have to understand why blocking issues occur.

    If it's because you are trying to update the same record in several sessions, you need to think about how to avoid it and don't run an update for the same record in several parallel sessions.

    If it's because you are trying to update a lot of records in the same transaction you have 2 options

    1. Split update to small transactions if possible

    2. Disable lock escalation for table and disable page locks for all indexes for IMXSSRSTASKHISTORYLAST. You can check on the Internet for script how to do it for SQL, but keep in mind if you change index or create a new one, you should re-do this step again

  • Suggested answer
    André Arnaud de Calavon Profile Picture
    303,139 Super User 2026 Season 1 on at

    Hi Nidhi

    This query looks like it is updating records in a partner add-on or customization. Can you contact the partner or developer who created this? I can't map the table and fields with a standard process in AX 2012.

    Can you also try to use a more meaningful title for your question instead of copying a SQL statement?

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!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 576 Super User 2026 Season 1

#2
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 366

#3
Adis Profile Picture

Adis 256 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans