pavan27
asked on
inactive sessions in oracle databae.
experts,
i am seeing more number if INACTIVE sessions in oracle. i am not sure why this inactive sessions.
i can see more sessions are belongs to one app server. i could not able to find out root cause of this problem. how do i investigate this problem. can any one help me. please let me know if you need any information/
i am seeing more number if INACTIVE sessions in oracle. i am not sure why this inactive sessions.
i can see more sessions are belongs to one app server. i could not able to find out root cause of this problem. how do i investigate this problem. can any one help me. please let me know if you need any information/
This is not a problem. Sessions with a status of INACTIVE in V$SESSION just means they are not currently running a query. When the session is running a query it will go to ACTIVE, then back to INACTIVE when the query finishes.
ASKER
Experts,
Thanks for quick response. my problem is here why the sessions are in inactive even though it is not doing any activity in the DB. why session are not closing automatically after query execution is completed.?
at db side no chance to time out those sessions. we have allocated unlimited resource to that user account which are making session in the db.
can any one help me to find why the sessions are being inactive and not flushing out from db.
Thanks for quick response. my problem is here why the sessions are in inactive even though it is not doing any activity in the DB. why session are not closing automatically after query execution is completed.?
at db side no chance to time out those sessions. we have allocated unlimited resource to that user account which are making session in the db.
can any one help me to find why the sessions are being inactive and not flushing out from db.
A session wouldn't close automatically when a query completes. Coding an application to connect, run one query and disconnect is very inefficient. A lot of time will be spent connecting to the database.
ASKER
do you think this these inactive session are inactive due to connection is not made to oracle in proper time?
i did not understand your explanation. could you please clarify me once again.
i did not understand your explanation. could you please clarify me once again.
Normally, an application would do this:
- connect
- run a query
- wait for user input <- Connection would show as INACTIVE here
- run a query
- wait for user input <- Connection would show as INACTIVE here
- .....
- disconnect
It should not do this:
- connect
- run a query
- disconnect
- connect
- run a query
- disconnect
- connect
- run a query
- wait for user input <- Connection would show as INACTIVE here
- run a query
- wait for user input <- Connection would show as INACTIVE here
- .....
- disconnect
It should not do this:
- connect
- run a query
- disconnect
- connect
- run a query
- disconnect
ASKER
John,
thanks for reply. i have one question
how does i know that session is waiting for user input. is there any way to find .
if yes could you please tell me how can i get it.
thanks for reply. i have one question
how does i know that session is waiting for user input. is there any way to find .
if yes could you please tell me how can i get it.
V$SESSION_WAIT will tell you what the session is waiting for. It will most likely be SQL Net message from client, or something similar.
ASKER
Hello Experts,
i have one question.
- connect
- run a query
- wait for user input <- Connection would show as INACTIVE here
how much time session will wait for user input.
i have one question.
- connect
- run a query
- wait for user input <- Connection would show as INACTIVE here
how much time session will wait for user input.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.