Jigsaw Blog

21

Jun
2013
0 comments

Dynamics NAV Deadlocks and Blocking

There are a number of things to try when dealing with locking in NAV2009, NAV2009R2 and NAV5

Serialized Read

If you have a specific build or later you can switch away from SERIALIZED to REPEATABLE reads.
This applies to Microsoft Dynamics NAV executable versions 5.00 SP1 and later running on Microsoft SQL Server 2005 SP3 x64 or Microsoft SQL Server 2008 SP1 x64 or Microsoft SQL Server 2008 R2 x64

UPDATE [$ndo$dbproperty] SET diagnostics = 4194304

You'll have to restart the NST, NST and clients for this to take effect

 

SQL Query Parallelism

Reduce the degree of Parallelism
Sometime a large proportion of the deadlock output is caused by intra-query parallelism deadlocking. ie. you do it to yourself

To try and eliminate these you can altered that maximum degree of parallelism to 1. I don't think that too many queries should suffer because of this.

sp_configure 'max degree of parallelism', 1
go
reconfigure with override
go


If you need to back out the change just run the command below

sp_configure 'max degree of parallelism', 0
go
reconfigure with override
go