Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Killing Sessions 2

Status
Not open for further replies.

uparna

Technical User
Jun 27, 2001
182
IN
Hi ,
Is it possible to kill sessions using sql prompt , given the session Id ?
I need to do this because there are a large number of inactive sessions which are hindering optimum performance of the Oracle Server . I am obtaining connections through a webserver (WebSphere) and am making use of connection pooling. Somehow , the old sessions are not getting killed properly even though i am giving the con.close statement at the right places everywhere (yes , i am using jsp). My doubt is that the webserver is getting connections , but is not killing them .

Thanks in advance . :cool:

Jayaram.


 
From the Oracle documentation
-----------------------------------------------------------
ALTER SYSTEM KILL SESSION

terminates a session, rolls back ongoing transactions, releases all session locks, and frees all session resources. To use this clause, your instance must have the database open. You must identify the session with both of the following values from the V$SESSION view:

integer1
is the value of the SID column.

integer2
is the value of the SERIAL# column.

If the session is performing some activity that must be completed, such as waiting for a reply from a remote database or rolling back a transaction, Oracle waits for this activity to complete, kills the session, and then returns control to you. If the waiting lasts a minute, Oracle marks the session to be killed and returns control to you with a message that the session is marked to be killed. Oracle then kills the session when the activity is complete.


.
.. Eat, think and be merry .
... ....................... .
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top