Debugging table locks in NAV 2013 and later

dave_c
Member Posts: 46
What is the best way to find what process is locking a table in versions of NAV where the SQL access happens as the user running the SQL service? I guess you may be able to manage it with the SQL profiler with full SQL tracing turned on. However we have a customer who is having a lock happening once a week or so. We cannot leave the profiler running that long to find who started the blocking session, so what is the best approach?
0
Comments
-
Lock once a week... they are happy users and for me it is nothing to solve, it is standard behavior that sometime the lock is held longer than timeout. Or you mean "massive locking problem once per week, when system is unusable because all is locked by one user"?0
-
You can use the Blocked Process Report feature.0
-
kine wrote:Lock once a week... they are happy users and for me it is nothing to solve, it is standard behavior that sometime the lock is held longer than timeout. Or you mean "massive locking problem once per week, when system is unusable because all is locked by one user"?
. However when it is locked it's kept locked for 20 minutes or so, so it is a minor inconvenience. As much as anything I'm wondering so I know what to do next time it happens and it's more of an issue.
I will look into the Blocked Process Report.0 -
If it is locked for 20 minutes, than yes, it is something you need to look at. Good is, that you have around 18 minutes to find on which table the lock is, and than trying to find the user and ask him what he is doing. Just looking to the SQL Profiler and queries running against the DB could lead you to the process which is generating them (e.g. if it is about Requisition worksheet etc.). Or you can enable full SQL tracking to see the info about the user generating the queries...0
-
I had a customer where a long running block was caused by waiting for user action before the transaction was committed.
In this case, a shipment would pop up an email that the user would then edit and send before the transaction was committed. Sometimes the user took off for lunch before the email screen popped up!
Check if any of your transactions require user input before completing.David Machanick
http://mibuso.com/blogs/davidmachanick/0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions