Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Transactions - Oracle versus Sql Server Expand / Collapse
Author
Message
Posted Thursday, April 18, 2013 10:30 AM


SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Tuesday, July 8, 2014 1:39 PM
Points: 245, Visits: 735
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.
Post #1443992
Posted Thursday, April 18, 2013 11:29 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Today @ 3:44 PM
Points: 1,221, Visits: 973
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
Post #1444042
Posted Thursday, April 18, 2013 12:48 PM


SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Tuesday, July 8, 2014 1:39 PM
Points: 245, Visits: 735
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.
Post #1444096
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse