Re: read uncommited
Date: 25 Nov 2009 12:42:39 -0700
Frank Swarbrick (Frank.Swarbrick_at_efirstbank.com) wrote:
: In DB2 you can do something like the following:
: SELECT *
: FROM MYTABLE
: WITH UR;
: If you have, say, a batch application that is inserting a lot of rows in to
: a table, with no commits until the end of the job, doing the above query
: while the batch update job is still running will allow you to see the
: inserted but not yet committed rows.
: Not something that you would want to do with a user application, but it's
: something that as a developer I have found occasionally useful (seeing what
: my batch job is "doing" before it's actually done).
: Is there any such feature available for Oracle?
No, Oracle prevents you from seeing data until it's committed.
The way around that for debugging is to use autonomous transactions (google it). You might, for example, add a trigger that records log details about the running job in a logging table, so set that trigger to use autonomous transactions so the log details can be committed and seen. Received on Wed Nov 25 2009 - 13:42:39 CST