Home » RDBMS Server » Networking and Gateways » How to kill a session Permanently
How to kill a session Permanently [message #165299] Wed, 29 March 2006 05:23 Go to next message
ramsat
Messages: 49
Registered: November 2005
Member
hai,
I face a strange situation in the Oracle. I use C++ servers for my application where the back end is Oracle database.
Whenever there is some problem in the Connection say an lock applied from any of the C++ servers the databse gets hanged,


I immediately killed the session founding which one is trouble some. But the session eventhough killed it is shown with different serial number.

Is there any way to kill the session than using
sql > Alter system kill session 'sid,serial#'; --- command

Thank U in Advance

Ramesh




Re: How to kill a session Permanently [message #165602 is a reply to message #165299] Fri, 31 March 2006 01:02 Go to previous messageGo to next message
kmsalih
Messages: 197
Registered: March 2006
Senior Member
Hi,

In Unix it is possible.

Find the spid of the user.

select p.spid,s.username,s.program from V$process p , V$session s where p.addr=s.paddr and s.username='&username'; 

Go to Unix Prompt

kill -9 spid


Rgds
SALIH KM Cool

Re: How to kill a session Permanently [message #165838 is a reply to message #165602] Mon, 03 April 2006 00:50 Go to previous message
ramsat
Messages: 49
Registered: November 2005
Member
Hai ,

Thank u for ur reply.
Ima using Windows server, so i was looking for this OS level control over sessions. Well i found that we can do the task using the command
"orakill "
since windows runs the Oracle as single process multi threaded The orakill will be supplied with sid and theread number for the session running,

the spid for the session is the tread number which we can obtain using V$process and v$session.


Thank U
Ramesh
Previous Topic: ORA-12154: TNS:could not resolve service name
Next Topic: Listener/Connectivity issues.
Goto Forum:
  


Current Time: Mon Apr 29 05:23:45 CDT 2024