Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV forum
Suggested answer

NAV lock issue

Posted on by 467

We are having a recurring NAV problem over the last few days. Users complain about table locks, but the NAV Debugger Database Locks page shows no locks. When I look at the locks directly in SQL I find a single SPID locking up multiple users. The query is always the same, copied below. It's clearly an internal NAV query due to the numbered table aliases, but it's unclear what part of NAV is calling it or why it won't run:

IF EXISTS (SELECT TOP 1 NULL FROM NAV.dbo.CQC$Value Entry 5802 WITH (UPDLOCK) WHERE (5802.Item Ledger Entry Type=@0 AND 5802.Order No_=@1 AND 5802.Order Line No_=@2 AND 5802.Valuation Date@3))

​The SPID is always stuck in RUNNABLE status, which would normally indicate a CPU block, but the activity monitor shows no resource issues. CPU is always below 40% utilization, disk is normal, etc. The query isn't waiting on a table lock, so it's not clear why it won't run when CPU is available.

It's happening once or twice per day. I kill the offending spid and everything goes back to normal, seemingly without issue. 

  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 69,864 Super User 2024 Season 2 on at
    RE: NAV lock issue

    Hi, I'm not sure if it's the same situation. One of our client had this problem before, Automatic Cost Posting is enable and Automatic Cost Adjustment is set to Always in their environment. When posting data, the table is sometimes locked. You can check the setup first.

    pastedimage1654734153344v1.png

    In additional, you can try following:

    1.Restart SQL Server, Nav Application Server, and the Client
    2. Add a new Instance and use Cronus demo DB

    check if you have the same problems.

    Hope this helps.

    Thanks

    ZHU

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

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,552 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,552 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans