SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 TSQL/ SP Best Practices
 New Topic  Reply to Topic
 Printer Friendly
Previous Page
Author Previous Topic Topic Next Topic
Page: of 3

derrickleggett
Pointy Haired Yak DBA

USA
4184 Posts

Posted - 12/05/2005 :  23:45:19  Show Profile  Visit derrickleggett's Homepage  Send derrickleggett an AOL message  Send derrickleggett a Yahoo! Message  Reply with Quote
WOW. He lives. Good to see you Vyas.

MeanOldDBA
derrickleggett@hotmail.com

When life gives you a lemon, fire the DBA.
Go to Top of Page

klsrao
Starting Member

USA
4 Posts

Posted - 04/13/2010 :  14:40:17  Show Profile  Reply with Quote
Onamuji,
why do you say:


"Never use NOLOCK unless you are super sure you want to ignore all locks on a table (this can cause you so much pain) "


Learn how not to speak negative.
Go to Top of Page

Lamprey
Flowing Fount of Yak Knowledge

4614 Posts

Posted - 04/13/2010 :  17:52:06  Show Profile  Reply with Quote
quote:
Originally posted by klsrao

Onamuji,
why do you say:


"Never use NOLOCK unless you are super sure you want to ignore all locks on a table (this can cause you so much pain) "


Learn how not to speak negative.

Here is one reason:
http://blogs.msdn.com/sqlcat/archive/2007/02/01/previously-committed-rows-might-be-missed-if-nolock-hint-is-used.aspx
Go to Top of Page

Kristen
Test

United Kingdom
22431 Posts

Posted - 04/14/2010 :  02:55:50  Show Profile  Reply with Quote
This is a very old thread - if using SQL2005 or later I recommend that you use READ_COMMITTED_SNAPSHOT - it provides the benefits of NOLOCK that developers are normally looking for (READs don't block WRITES) and none of the disastrous side effects of NOLOCK, plus you don't have to modify your code (well, you do need to remove NOLOCK if you have been using that because it still has the same disastrous side effects ...)

Edited by - Kristen on 04/14/2010 03:03:28
Go to Top of Page
Page: of 3 Previous Topic Topic Next Topic  
Previous Page
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000