0

What is the recommended isolation level for a website's database?

1
  • Just a note that the snapshot alternatives has a higher overhead compared to the "traditional" ones. That is to store the prior version in tempdb and also the row will be 24 byte bigger to accommodate that pointer. Possibly you wont notice, but I just wanted to point it out... Oct 25, 2019 at 6:44

1 Answer 1

3

To switch a database to RCSI:

USE mydb;
ALTER DATABASE mydb SET SINGLE_USER WITH ROLLBACK IMMEDIATE;
ALTER DATABASE mydb SET READ_COMMITTED_SNAPSHOT ON;
ALTER DATABASE mydb SET MULTI_USER;

For most new applications READ COMMITTED with the READ_COMMITTED_SNAPSHOT option is preferred.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.