• GSquared (3/30/2009)


    Santa Ana (3/27/2009)


    A question gents :

    If i place a NOLOCK for an update on a row (Update triggered by the background process) Say Transaction 1

    If there is a ROWLOCK for another update on the same row (user updates a column) Say Transaction 2

    What would happen now ?

    I do not care about dirty reads. My question is : would both the updates go through ?

    "Nolock" doesn't apply to updates or deletes. Only to selects. If you issue two update commands, one will finish, and then the other will start. Simple as that.

    Thanks for the reply. Sorry for my ignorance i got it right now. Thanks.

    Few of my SELECT statements are becoming deadlock victims. (i'm using sql server 2005). I cannot understand why a SELECT statement that has NOLOCK would end up as a dead lock victim.

    When it has a NOLOCK, what is it competing with or who is locking this select from reading something ? I have a "NOLOCK" for selects as i said earlier gents.

    A deadlock occurs when Tran A holds something that Tran B needs and vice-versa.

    When i exclusively force Tran A to lock/hold nothing by using the NOLOCK keyword, how can this be a participant of a DEADLOCK ? <--- I don't understand this scenario in particular.

    Can someone throw some light on this please ?