SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Transactions - Oracle versus Sql Server


Transactions - Oracle versus Sql Server

Author
Message
Tobar
Tobar
SSC-Addicted
SSC-Addicted (451 reputation)SSC-Addicted (451 reputation)SSC-Addicted (451 reputation)SSC-Addicted (451 reputation)SSC-Addicted (451 reputation)SSC-Addicted (451 reputation)SSC-Addicted (451 reputation)SSC-Addicted (451 reputation)

Group: General Forum Members
Points: 451 Visits: 758
By default Oracle does everything in transactions. Once a I start a change the current state of the DB is frozen (from the transaction's perspective) until the transaction completes.

If I start a transaction in SQL Server am I assured that records added to a source table, after the transaction is running, will not be visible to me during the transaction? I believe this touches on isolation level and such, but I do not see any isolation settings for "Begin Transaction". I do not understand the isolation level settings all that well either (which may be obvious :-) ).

Thanks.

<><
Livin' down on the cube farm. Left, left, then a right.
DBA From The Cold
DBA From The Cold
SSCrazy
SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)SSCrazy (2.2K reputation)

Group: General Forum Members
Points: 2181 Visits: 1745
Hi,

The default isolation level of a SQL Server instance is READ COMMITTED, which means that tranactions cannot read data that has been modified by other transactions but not committed. However data can be changed by other transactions between the SQL statements of the current transaction.

You could change the isolation level of your transaction to SNAPSHOT, which means that your transaction is reading a snapshot of the data as it was when your transaction began.

Have a look here:- http://msdn.microsoft.com/en-gb/library/ms173763.aspx

Andrew
Tobar
Tobar
SSC-Addicted
SSC-Addicted (451 reputation)SSC-Addicted (451 reputation)SSC-Addicted (451 reputation)SSC-Addicted (451 reputation)SSC-Addicted (451 reputation)SSC-Addicted (451 reputation)SSC-Addicted (451 reputation)SSC-Addicted (451 reputation)

Group: General Forum Members
Points: 451 Visits: 758
Andrew Pruski (4/18/2013)

tranactions cannot read data that has been modified by other transactions but not committed


That is my worry as other operational procedures are all auto-commit.

Thanks for the reference. That is exactly what I needed.

<><
Livin' down on the cube farm. Left, left, then a right.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search