Transactions - Oracle versus Sql Server

  • 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.

  • 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

  • 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.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply