[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

READ_COMMITTED_SNAPSHOT Equivalence For SQL Server 2000

Posted on 2006-05-10
13
Medium Priority
?
1,211 Views
Last Modified: 2007-12-19
I know that SQL Server 2005 has the READ_COMMITTED_SNAPSHOT option setting.  If a transaction is used in VB.NET with isolation level set to Uncommitted, the tables still seem to be locked, and I can't figure out how to keep the server from doing that at the server level, instead of the procedure level.

Bob
0
Comment
Question by:Bob Learned
  • 8
  • 5
13 Comments
 
LVL 23

Expert Comment

by:Racim BOUDJAKDJI
ID: 16656757
Setting the database on READ_COMMITTED_SNAPSHOT allows to activate row versionning on ALL transactions.  

By running...
alter database <yourdatabase> set read_committed_snapshot on

all selects issued AFTER an uncommited transaction will run because they will access the last commited version of the rows stored in tempdb instead of the tables...It's equivalent to ORACLE Read Consistency

Hope this helps....

0
 
LVL 23

Accepted Solution

by:
Racim BOUDJAKDJI earned 2000 total points
ID: 16656769
Note that this kind of feature does NOT exist on SQL 2000 at database level...I am afraid, you will have to run it at transaction level.  Hope this helps...
0
 
LVL 96

Author Comment

by:Bob Learned
ID: 16657130
There is something strange going on here, because I set the transaction level to ReadUncommitted, which should allow dirty reads, but the records are still be locked.  Maybe cuz I don't use transactions with VB.NET very much, I am not doing something right here, but who knows.  

Bob
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 23

Expert Comment

by:Racim BOUDJAKDJI
ID: 16657332
Do you do that in the same connexion?
0
 
LVL 96

Author Comment

by:Bob Learned
ID: 16657685
Yes, only 1 SqlConnection object defined.

Bob
0
 
LVL 23

Expert Comment

by:Racim BOUDJAKDJI
ID: 16657770
That's strange...It should work...Only thing I can see is provider related...Do you use ODBC, OLEDB, SQLExecDirect?
0
 
LVL 23

Expert Comment

by:Racim BOUDJAKDJI
ID: 16657780
<<Yes, only 1 SqlConnection object defined.>>Do you close the connexion at least once AFTER you set the transaction isolation level to uncommitted?
0
 
LVL 96

Author Comment

by:Bob Learned
ID: 16657802
Pertinent information:
ASP.NET 1.1
VB.NET 2003
SQL Server 2000
SqlClient: SqlConnection and SqlTransaction
Isolation level:  Read Uncommitted

Dim trans As SqlTransaction = conn.BeginTransaction(IsolationLevel.ReadUncommitted)

I realize that this is question that is going to make you think about transactions and isolation levels and record/table locks, so good luck, because I couldn't find any answers for myself.

Bob
0
 
LVL 23

Expert Comment

by:Racim BOUDJAKDJI
ID: 16658207
My concern is about HOW the server actually perceives the instruction

conn.BeginTransaction(IsolationLevel.ReadUncommitted) and if it correctly implements it server side...You may want to catch the instruction on the server using Profiler to make it is properly parsed by the provider...Otherwise, you could try to run the SQL transaction statement on the server and see what happens...If no problem happens then, one can strongly assume the issue is related to parsing the right instruction to the server as opposed to a server problem...Could you validate these points?
0
 
LVL 96

Author Comment

by:Bob Learned
ID: 16658375
I haven't used the Profiler.  I am a programmer, and I hadn't spent much time dealing with the DBA stuff.  There was always someone else around to deal with that part, so I didn't learn anything.  I don't have that luxury how.

Do you have the steps to check that in the Profiler?

Bob
0
 
LVL 23

Expert Comment

by:Racim BOUDJAKDJI
ID: 16658755
All you need to do is set up a simple Profiler session on the server and catch the process server side...If you don't feel confortable with profiler, you may want to take a look at this link

http://vyaskn.tripod.com/analyzing_profiler_output.htm
0
 
LVL 96

Author Comment

by:Bob Learned
ID: 16667403
You know, it is nice when you can use a question as a reference for a reason to upgrade to 2005.  I was trying to convince someone, and they wanted to know if it was possible with 2000 to set a database option for how it processes transactions and isolation.  

Thank you for that information about the profiler.

Bob
0
 
LVL 23

Expert Comment

by:Racim BOUDJAKDJI
ID: 16669888
You are correct it is a justification to go to 2005...MS is slowly catching up with Oracle...But watch out with performance hit on tempdb IO
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
Microsoft Access has a limit of 255 columns in a single table; SQL Server allows tables with over 255 columns, but reading that data is not necessarily simple.  The final solution for this task involved creating a custom text parser and then reading…
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
Viewers will learn how the fundamental information of how to create a table.
Suggested Courses

826 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question