Log in Page Discussion History Go to the site toolbox

You don't have to use nolocks

From BluWiki

cool fact about saturn mgb saturn alternator conversion king of prussia mail outdoor cat 5 cable domain ebanned aaron carter more photo inflamed tendons domain buy topsoil sitemap free nokia ringtone sent sms via amateur anal asian movie pic sex mushers march nobody does it better This aretical is intended for Microsfts SQL server.

Instead of placing no locks on all your tables in your SQL:

select * from test with(nolock)

You can place this at the top of the Stored Procedure:

SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED

Implements dirty read, or isolation level 0 locking, which means that no shared locks are issued and no exclusive locks are honored. When this option is set, it is possible to read uncommitted or dirty data; values in the data can be changed and rows can appear or disappear in the data set before the end of the transaction. This option has the same effect as setting NOLOCK on all tables in all SELECT statements in a transaction. This is the least restrictive of the four isolation levels.

Makes query look SO much less tortured

Site Toolbox:

Personal tools
GNU Free Documentation License 1.2
This page was last modified on 5 August 2009, at 13:03.
Disclaimers - About BluWiki