Home Forums SQL Server 2012 SQL Server 2012 - T-SQL SERIALIZABLE Transaction Isolation Level Is Not Behaving As I Expected RE: SERIALIZABLE Transaction Isolation Level Is Not Behaving As I Expected

  • Given the rare occurrences and not being able to reproduce it either by myself nor by your DBA friend, I am only able to suggest it is a side effect off phantom rows which can exists out with of SERIALIZABLE - both the archive and the checker need to work in this isolation level. It is after all why this isolation level exists.

    I think it would be fairly involved to capture enough system data and to analyse it to work out exactly whats happening, I'd certainly be interested in hearing your results if you go down this path!

    Personally, I'd reimplement the solution (using DELETE...OUTPUT or another suggested solution - whichever is best for your solution) to try and minimise any time spent within the transaction, before forcing such a high level isolation level.

    I guess you could also try using PAGE locks rather than ROW locks, and up the number of rows you archive at a time. It might be more aggressive, but it could give you the room you need to work at a lower isolation level.

    Jamie