2

For interactive debugging purposes I'm wondering whether it's possible to query the data another session has currently put into the database but not yet committed.

Say I have an my application open in a debugger and when I'm stopped in a certain breakpoint I would like to check interactively what the session of the app "is seeing" via simple queries from SQLDeveloper (or sqlplus).

Is this possible with Oracle XE? (As it is for debugging, there's no DBA or security constraints.)

5

no, "Oracle Database doesn't use dirty reads, nor does it even allow them"

  • Hmmm ... I thought more along the lines of somehow "stealing" the session context or somesuch. But maybe it's simply something noone deems to be needed. – Martin Sep 5 '11 at 14:45
  • 1
    Thanks, I've fixed the link. It's not so much that it is not needed. but "The point here is that dirty read is not a feature; rather, it's a liability". There are various ways of getting information out of a session however - eg dbms_application_info – Jack Douglas Sep 5 '11 at 14:53
2

Oracle by default is using MVCC, so it "...provides each user connected to the database with a "snapshot" of the database for that person to work with. Any changes made will not be seen by other users of the database until the transaction has been committed."

So from another connection/session you won't see exactly the version of data you're working on in that specific transaction, but an older version of it.

  • +1 although perhaps worth mentioning that serializable is not the default isolation level so the "snapshot" is at the statement level rather then the transaction level – Jack Douglas Sep 5 '11 at 14:58

Not the answer you're looking for? Browse other questions tagged or ask your own question.