Over the years I have resolved many deadlocking issues. Normally the problem stems from either an incorrect locking sequence of 2 processes or some bad code. There are all sorts of ways to solve deadlocking in NAV such as putting LockTables or Commits in the code, Optimzing the Code (using IsEmpty where possible so there is no lock, using a proper key, etc...) or more. I have always use Client Monitor to track these probems down. I am now stuck and need more then what client monitor can give me.
I have 2 processes: Posting an Order (many table locks) and Creating a Settlement (only 3 table locks) for ChargeLogic. The locking sequences for each process are the same. The code exectues quickly with 99% of the statements running under 16ms. I think I need to turn to SQL Server now to identify the deadlock so I can see how to fix it.
Can someone tell me the simplest way to monitor deadlocking in SQL? I have used SQL Profiler before but am not an expert with it.
0
Comments
You need the following events in "Locks":
-Deadlock graph
-Lock:Deadlock
-Lock:Deadlock Chain
And you need specially TextData. The Deadlock graph will be the most interesting: it shows a nice graph with lots of info.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
jwilder@stonewallkitchen.com
Since the deadlock is happening on an ISV product, you should ask the ISV what you should do to resolve this.
AP Commerce, Inc. = where I work
Getting Started with Dynamics NAV 2013 Application Development = my book
Implementing Microsoft Dynamics NAV - 3rd Edition = my 2nd book
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
http://dynamicsuser.net/blogs/stryk/archive/tags/Locking/default.aspx
I hope this could help you to identify the blocking and deadlocking issues.
Cheers,
Jörg
NAV/SQL Performance Optimization & Troubleshooting
STRYK System Improvement
The Blog - The Book - The Tool