Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
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 73,696 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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans