Home > Archive > Microsoft SQL Server forum > February 2006 > with nolock problem









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author with nolock problem
Rycho

2006-02-17, 11:23 am

Hi,
Is there a way to catch every select comming to sql and change it to
select with nolock?
or how to make database READ UNCOMMITTED permanent?
any ideas?
Richard

Erland Sommarskog

2006-02-17, 8:23 pm

Rycho (sercik@interia.pl) writes:
> Is there a way to catch every select comming to sql and change it to
> select with nolock?
> or how to make database READ UNCOMMITTED permanent?
> any ideas?


If there are no updates in the database, you can set it to READONLY, to
avoid the overhead of locking. But apart from that, there is no option to
do this on database level.

However, the application could issue SET TRANSACTION ISOLATION LEVEL
READ UNCOMMITED when it connects.

But I would definitely think twice before I took such a step. If you
have issues with blocking, maybe you should rather review indexing
than resorting to NOLOCK.



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

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx
Rycho

2006-02-20, 7:23 am

Thanks for your replay,
Richard

Richard

2006-02-20, 11:23 am

Hi,
Is there a way of using triggers for this?
Thanks,
Richard

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com