Will lost update occur if transaction isolation level set to SNAPSHOT?

Let's say if there're two transactions updating a column of the same row concurrently, will one of the update be overwritten by the latest one

Answer this question

Will lost update occur if transaction isolation level set to SNAPSHOT?

  • Kimme

    Unless you use optimistic locking (timestamps) or serializable transactions then this will be the case

  • brucehatton

    oops

  • GrantV

    No an, error will occur:

    Msg 3960, Level 16, State 4, Line 1

    Snapshot isolation transaction aborted due to update conflict. You cannot use snapshot isolation to access table 'dbo.Test' directly or indirectly in database 'AdventureWorks' to update, delete, or insert the row that has been modified or deleted by another transaction. Retry the transaction or change the isolation level for the update/delete statement.

    HTH, Jens Suessmeyer.


  • Will lost update occur if transaction isolation level set to SNAPSHOT?