Monday, March 19, 2012

connection level NOLOCK

Hi!

when WITH (NOLOCK) statement is used in a select statement, it allows to retrieved data from a set of data locked by another transaction. Is it possible to enforce this at connection level?

I mean to open a connection using sqlclient and enforce NOLOCK so that all select statements post to database using that connection are not locked by other transactions.

thanks in advance

Ok. I found it!

I have to begin a transaction with isolation level 'readuncommited' and do all select statements inside that transaction.

No comments:

Post a Comment