Tell me more ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

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

share|improve this question
1  
Related Question: dba.stackexchange.com/questions/2994/… – Leigh Riffel Sep 5 '11 at 15:50
You're right this is probably a dupe - now I've read the other Q, I'm only hesitating about flagging this one because of this answer - I don't think that was ever cleared up – Jack Douglas Sep 5 '11 at 17:00

2 Answers

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

share|improve this answer
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

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.

share|improve this answer
+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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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