Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: keep select in transaction
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.
-- Mit freundlichen Grüßen / Best regards Michael Gast SEPP MED GmbH All emails sent to this address are never read and never will be answered. Sorry, but until someone cleans up the spam mess, that's the way it has to be. E-Mails, die direkt an diese Adresse geschickt werden, lese und beantworte ich nicht. Ich bedauere diesen Umstand sehr, kenne derzeit aber keine bessere Möglichkeit, um die Spam-Flut abzustellen.Received on Tue Apr 12 2005 - 02:21:33 CDT