Hi,
I've created a custom changelog based on SQL triggers (Navision 3.70B, SQL2k). Log table has an autoincremet primary key and during testing concurrent transactions were able to add records without locking each other on this resource. The main "logged" tables are Sales Header, Sales Line, Reservation Entry and Item Ledger Entry. After the triggers were placed in production database users started to complain about being the deadlock victims. These deadlocks are caused by different tables. It seems that system instead of waiting for a lock to be realeased interprets it as deadlock and I have no idea how to check if that's really the case.
Any ideas?
0
Comments
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
I won't comment on your choice to implement this using SQL Server triggers, but you will have to make sure that your process locks resources in the same order, so that two resources can't lock eachother out, and they are forced to wait until the regular lock is released.
RIS Plus, LLC
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!