My current application has 2 processes which both use the same MS SQL Server database. Once in a while, one of them throws an exception since the other locked some rows it tried to use. Reading (select) rows causes them to get locked too.
The default isolation level is ReadCommited, but I was wondering what the best practice or guideline is regarding this topic? I can't imagine lowering the isolation level to ReadUncommited for instance to "solve" this issue is a good practice? Since it doesn't really solve the issue at the core.
I thought I read somewhere MS SQL Server would wait a while when it tried to use rows which have been locked, but apparently this isn't the case. Is there someway to enable this waiting-behaviour?
Thanks, Yannick
|