Re: IsolationLevel workaround?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



David Rueter wrote:
I would like to use the SQL 2005 SNAPSHOT isolation level. I
understand that the ADO IsolationLevelEnum has not been updated for
SQL 2005.

I thought it would be OK if I left the connection set to
cn.IsolationLevel=adXactReadCommitted, and then I issued a statement
on the connection like:

cn.Execute('SET TRANSACTION ISOLATION LEVEL SNAPSHOT');

However, ADO is kind enough to set the isolation method back to
ReadCommitted whenever I begin a transaction. And, I am not allowed
to change the isolation level to SNAPSHOT inside a transaction if the
isolation level was not SNAPSHOT at when the transaction was started.
Argh...

So I thought if I set cn.IsolationLevel=adXactUnspecified, then
issued the Execute statement as above to set the isolation level for
the connection that I would be OK. However, then I get errors like:

"Neither the isolation level nor a strengthening of it is supported."

Is there any way to get ADO to use the SNAPSHOT isolation level? Or,
is there at least any way to get ADO to NOT set the isolation level
at the start of a transaction so that I can set the isolation level
myself?

According to BOL, the SQL Native Client provider should provide this
support. I haven't tried it myself, but are you using SQLODEDB or
SQLNACLI for your provider?
See the topic "Working with Snapshot Isolation"
--
HTH,
Bob Barrows


.



Relevant Pages

  • Re: ISOLATION LEVEL setting at different trancounts
    ... Say you have Two transaction, one on Isolation A. ... You will not need another connection, ... the ISOLATION LEVEL setting is set at the connection level. ...
    (microsoft.public.sqlserver.programming)
  • Re: Database or store to handle 30 Mb/sec and 40,000 inserts/sec
    ... Does Oracle support query sampling? ... Isolation is semantics, locking is implementation. ... readers block writers, while Oracle has never had this problem. ... SQL Server 2005 introduces a new "snapshot" isolation level that is ...
    (comp.databases.oracle.server)
  • Re: Database or store to handle 30 Mb/sec and 40,000 inserts/sec
    ... Does Oracle support query sampling? ... Isolation is semantics, locking is implementation. ... readers block writers, while Oracle has never had this problem. ... SQL Server 2005 introduces a new "snapshot" isolation level that is ...
    (comp.databases.oracle.server)
  • Wheres the aspnet_wp?
    ... ASP.Net web project in VS.Net "pointing" to the virtual catalog. ... The web itself (in IIS config ... MMC snap-in) is set to normal (pool or middle option of isolation) (remember ... it used to be the case that the isolation level of the application in IIS ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: SnapshotIsolation Level and Com
    ... COM+ often uses distributed transaction to talk with SQL Server. ... We recommend that you use "read committed snapshot isolation" instead of ... > Isolation level in SQL Server 2005 and have a question. ...
    (microsoft.public.sqlserver.server)