View Single Post

   
  #6 (permalink)  
Old 03-01-2008, 02:43 PM
Erland Sommarskog
 
Posts: n/a
Default Re: Wrong result Set when using NoLock

bmm (bmmsletdetteher@comlog.dk) writes:
> The situation is that I have a configuration table (CONF) which is accesed
> often by severel programs (computers) on our network. Some of them are
> WEB-applications, some are C# applications and some are manual used
> query-analysers.
>
> We noticed, that the C#-application sometimes doesn't get all the data
> from the CONF-table when running the specific Stored procedure that
> reads data from the CONF-table using NOLOCK. We couldn't get
> query-analyser to fail the same way, when we used the same SP. (The SP
> also reads some other tables beside the CONF-table. All the selects were
> using NOLOCK)
>
> The problem was solved when we removed all the NOLOCKs from the SP.
>
> I could understand if the SP returned too many rows in some cases, but not
> too few....


Still not very much information to work from. Are these web application
also using OleDbConnection?

Is this configuration table frequently updated? Or why the use of NOLOCK?

--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pro...ads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinf...ons/books.mspx
Reply With Quote