Figuring out who is blocking whom
Deadlocking can be a common occurrence in NAV. Unfortunately, users cannot work in the system when their actions are being blocked by another user. This recipe will show you how to determine who is blocking other users and resolve the situation.
How to do it...
Open SQL Server Management Studio.
Open a new query window.
Execute the following code:
sp_who
You will see results similar to this:
How it works...
The sp_who
command queries the sys.sysprocesses
system table in SQL. It returns a list of all connections to the server and if they are being blocked by anyone, the column labeled blk will be filled in with the spid of the user doing the blocking.
This provides similar information to what can be found in NAV. If you go to File | Database | Information, and drill down into the Current Sessions number, you can see the users who are being blocked.
There's more...
You can also write your own query to find the deadlocks.
Another way to find deadlocks
The following...