Wednesday, March 28, 2012

Read Uncommitted

Stored procedure is causing blocking. Stored procedure only reads.
We add :
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED
to the stored procedure and the blocking has gone down and I'm addressing a
similar problem with other stored procedures. I know the whole "dirty read"
thing and I'm not sure how likely that is...but is there anything else we
should be aware of while using this statement?
ThanksApart from the obvious, doing dirty read you risk getting inconsistent data:
You can get false data corruption messages. Like reading the data while "physically" in flux. Just
don't worry about them. If you see them, and want to handle it, just re-try.
Also, if on 2005, consider using any of the snapshot isolation modes. But make sure you read up on
the consequences first.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"jason7655" <jason7655@.discussions.microsoft.com> wrote in message
news:5DEC3C93-73F8-4F24-B264-2018B423C8F4@.microsoft.com...
> Stored procedure is causing blocking. Stored procedure only reads.
> We add :
> SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED
> to the stored procedure and the blocking has gone down and I'm addressing a
> similar problem with other stored procedures. I know the whole "dirty read"
> thing and I'm not sure how likely that is...but is there anything else we
> should be aware of while using this statement?
> Thanks|||See http://sqlblogcasts.com/blogs/tonyrogerson/archive/2006/11/10/1280.aspx
.
--
Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: sylvain aei ca (fill the blanks, no spam please)
"jason7655" <jason7655@.discussions.microsoft.com> wrote in message
news:5DEC3C93-73F8-4F24-B264-2018B423C8F4@.microsoft.com...
> Stored procedure is causing blocking. Stored procedure only reads.
> We add :
> SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED
> to the stored procedure and the blocking has gone down and I'm addressing
> a
> similar problem with other stored procedures. I know the whole "dirty
> read"
> thing and I'm not sure how likely that is...but is there anything else we
> should be aware of while using this statement?
> Thanks

No comments:

Post a Comment