how in toad 8.6 you do it? but a session can have 100 sql statements. would it show you all.
Main Topics
Browse All Topics1. Does anyone how oracle 9i changes STATUS for sessions from ACTIVE to INACTIVE?
2. We have an issue with some "web" sessions coming from mod_plsql statying active for 2-3 hours. Any idea what would keep them there? can some bad sql cause this issue?
3. can i see the SQL code associated with a session from any view?
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
I guess it is showing last or the active one, I did not check the queries, maybe there is a condition to get the last one... If these queries (you should check each one carefully, play with values, remove conditions and see whole picture) does not help you, you need to have the right tools, which does all the job for you and just gives what you want :)
ok, thanks, a small question
if the query is "select * from EMP" the session will show ACTIVE until it is done.
then it shows INACTIVE. correct?
when does oracle remove that session/process so it gets used by someone else.
my main problem now is that those INACTIVE sessions are staying there and blocking new web httpd session coming in. any ideas why?
here is some definitions from oracle
If the session is not making a SQL call to Oracle (is INACTIVE)
When an inactive session has been terminated, STATUS in the V$SESSION view is KILLED.
A session is ACTIVE when it is making a SQL call to Oracle. A session is INACTIVE if it is not making a SQL call to Oracle.
read this, lots of useful info... http://download.oracle.com
great
do you know how long oracle keeps "inactive" session which is holding a process in the system before it disconnects it automatically?
DO you think there might be something wrong if those inactive sessions stay there for hours/days?
not sure of MOD_PLSQL should clean them up or oracle database. unless oracle might resuse this idle session for another request from another machine but i doubt it.
Business Accounts
Answer for Membership
by: HainKurtPosted on 2009-11-06 at 15:43:10ID: 25764078
if you have toad, you can use it to view sessions, and the queries issued for each session...
/docs/cd/B 19306_01/s erver.102/ b28051/tdp pt_realtim e.htm
or use oracle tool if you have it
http://download.oracle.com