C:\Users\mmeerha>orakill
Usage: orakill sid thread
where sid = the Oracle instance to target --- > (sid is not session id it is instance name)
thread = the thread id of the thread to kill
The thread id should be retrieved from the spid column of a query such as:
select spid, osuser, s.program from
v$process p, v$session s where p.addr=s.paddr
C:\Users\mmeerha>orakill 5 8824
Could not attach to Oracle instance 5: err = 203
C:\Users\mmeerha>sqlplus / as sysdba
SQL*Plus: Release 11.2.0.2.0 Production on Mon Aug 26 00:29:55 2013
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select s.username
2 , s.sid
3 , s.serial#
4 , p.spid
5 , last_call_et
6 , status,to_char(logon_time, 'hh24:mi dd/mm/yy') login_time
7 from V$SESSION s
8 , V$PROCESS p
9 where s.PADDR = p.ADDR
10 and s.sid=5
11 /
USERNAME SID SERIAL# SPID
------------------------------ ---------- ---------- ------------------------
LAST_CALL_ET STATUS LOGIN_TIME
------------ -------- --------------
A 5 5 8824
4549 ACTIVE 22:56 25/08/13
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
C:\Users\mmeerha>orakill testdb 8824
Kill of thread id 8824 in instance testdb successfully signalled.
No comments:
Post a Comment