SQL Server NOLOCK Data Loss

I often get asked about the implications of using nolock query hints or read uncommitted and my response is usually well received until I add “there are some scenarios where nolock can result in data loss or data duplication” which usually generates a look of shocked disbelief on the face of person asking the casual question. Well today was no different.

But instead of rehashing the whole story this post by Tony Rogerson or this one by Lubor Kollar will provide you with the requisite detail to fully understand the scenarios I refer to.

The right answer to this problem is to use READ_COMMITTED_SNAPSHOT on SQL Server 2005 or SQL Server 2008.

<Gary>