Wednesday 15 September 2010

sql server - Can I use both ReadCommited and ReadCommitedSnapshot Transaction Isolation Levels in my c# app? -


ReadCommited transactions with some specific SQL-queries to use isolation level ReadCommitedSnapshot for others ?

After I switch to all the transactions which were previously running under ReadCommied IL I RCS , I SET READ_COMMITTED_SNAPSHOT turned on for my database.

In .net I have only IsolationLevel.ReadCommited .

And off course I can do 'Just turn on / off the SET READ_COMMITTED_SNAPSHOT before each of my questions, because it requires a very single SQL-connection (and actually Takes some time).

Is there any alternative?

EDIT: UP !!!!!

At the SQL Server level, provided that ALLOW_SNAPSHOT_ISOLATION is turned on < / Code>, you can control it using the statement. Do not turn on READ_COMMITTED_SNAPSHOT .

In that way, those connections should be the usual RC :

And for those connections where you Play " RCS / code>", run:

  SET Transaction Accordion Level Snapshot    

No comments:

Post a Comment