G
GiroCarl
Hello Everyone,
We want to take advantage of the new SNAPSHOT ISOLATION LEVEL that SQL
Server Yukon offers. This will allow readers not bloking
"modificators" and "modificators" not blocking readers. Just like
Oracle offers for a long time with their rollback segments.
The problem is that I don't know how to use it with ADO.NET.
To be in SNAPSHOT ISOLATION LEVEL you have to issue this statement to
the DB:
ALTER DATABASE MyDbName SET ALLOW_SNAPSHOT_ISOLATION ON
After that you can issue all the queries you want and you'll see the
"before image" of any uncommited data that exists at the beginning of
the query (snapshot).
Since all queries sent to the server with ADO.NET are executed with
the stored procedure sp_executesql, all those queries are in another
context and they don't "see" that the ALTER DATABASE ...
ALLOSW_SNAPSHOT_ISOLATION ON was set.
We tried this by executin a command as nonquery (containing the ALTER
DATABASE command) and after that issuing a query with a SqlDataReader
and it did not worked.
Any idea, clue on how to implement it with ADO.NET?
Hope I was clear,
Regards,
Carl
We want to take advantage of the new SNAPSHOT ISOLATION LEVEL that SQL
Server Yukon offers. This will allow readers not bloking
"modificators" and "modificators" not blocking readers. Just like
Oracle offers for a long time with their rollback segments.
The problem is that I don't know how to use it with ADO.NET.
To be in SNAPSHOT ISOLATION LEVEL you have to issue this statement to
the DB:
ALTER DATABASE MyDbName SET ALLOW_SNAPSHOT_ISOLATION ON
After that you can issue all the queries you want and you'll see the
"before image" of any uncommited data that exists at the beginning of
the query (snapshot).
Since all queries sent to the server with ADO.NET are executed with
the stored procedure sp_executesql, all those queries are in another
context and they don't "see" that the ALTER DATABASE ...
ALLOSW_SNAPSHOT_ISOLATION ON was set.
We tried this by executin a command as nonquery (containing the ALTER
DATABASE command) and after that issuing a query with a SqlDataReader
and it did not worked.
Any idea, clue on how to implement it with ADO.NET?
Hope I was clear,
Regards,
Carl