Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: keep select in transaction

Re: keep select in transaction

From: DA Morgan <damorgan_at_x.washington.edu>
Date: Tue, 12 Apr 2005 08:42:27 -0700
Message-ID: <1113320320.802973@yasure>


Michael Gast wrote:

> Hi Eitan,
> 
> Eitan schrieb:
> 

>> Hello,
>> I want to open a transaction in oracle (9i),
>> where first I declare a transaction,
>> I want that any select will not be affected, as the database changes
>> after I
>> open the transaction.
>>
>> i.e :
>>
>> start transaction
>> ....
>> ' during this time rows were inserted to database in other transaction.
>> ' I don't want that when I do the following select - I get the rows, that
>> were inserted
>>
>> select * from table_that_was_changed_after_start_trans
>> ' I don't want that the changes on the above tables will be seen on the
>> result.
>>
>> commit transaction
>>
>> Thanks :)
>>
>>
> 
> as far as i remember Oracle works in 'read commited' mode per default. 
> That means that you will 'see' rows inserted AND commited in other 
> transactions within your transaction. What you need in this case is to 
> set the transaction isolation level to 'serializable'.
> 
> And: Please don't cross post.

By default it is impossible, in Oracle, to see uncommitted data.

By default it is impossible, in Oracle, to see records committed after your transaction has begun.

-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu
(replace 'x' with 'u' to respond)
Received on Tue Apr 12 2005 - 10:42:27 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US