Domanda

In SQL Server the default isolation level is READ_COMMITTED but in SQL Azure the default level is READ_COMMITTED_SNAPSHOT.

Suppose I change the default level in my SQL Azure server to READ_COMMITTED_SNAPSHOT (using SET TRANSACTION ISOLATION LEVEL) so that it behaves like SQL Server.

What negative consequences should I expect?

È stato utile?

Soluzione

Your application logic may break. Really, it depends a lot on what you're doing. Overall, some pointers:

  • True SNAPSHOT has a lot less 'surprises' than RCSI. As the 'snapshot' rows version is clearly defined in the true SNAPSHOT as the moment the transaction started, it does not suffer from RCSI issues of seeing different row versions inside the same transaction (which leads to very subtle and difficult to understand issues)
  • You will get update conflicts instead of deadlocks, but one exactly 'instead-of'. There are some differences, and definetely the app may not expect the new error code 3960.

I would recommend going over Implementing Snapshot or Read Committed Snapshot Isolation in SQL Server: A Guide.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top