Simulation Steps 1:
SQL> ALTER SYSTEM KILL SESSION '205,32449' IMMEDIATE;
ALTER SYSTEM KILL SESSION '205,32449' IMMEDIATE
*
ERROR at line 1:
ORA-00031: session marked for kill
SQL>
SELECT s.sid,
s.serial#,
s.osuser,
s.program
FROM v$session s;
Select from query your desire sid and serial# no from query
Steps 2:
Find out the your desire thread id (needed to be os level kill session)
SQL>select
spid,
osuser,
s.program
from v$process p,
v$session s
where p.addr=s.paddr
For Windows
Operating System
C:> orakill ORACLE_SID spid
note: ORACLE_SID means oracle unique database name
like>
C:> orakill test 1236
Finally your database session and OS child level session has been killed.
For UNIX Operating System
Check the SPID from UNIX Process
Test# % ps -ef | grep ora
Then Run following:
Test#
% kill -9 spid
thanks dulal vai,
ReplyDeletenow tell me what is the necessity or benifits of kill session
pavel(speiil)
If your concurrent application or db users session are locked or "ORA-00031" error raised.
ReplyDeleteThanks a lot.............
ReplyDeleteHi how to run the orakill in Toad
ReplyDeletehi.
ReplyDeleteit's OS commands so, you didn't run in TOAD.
Thank you!
ReplyDelete