In Windows we have
several utilities, the
Oracle-centric "orakill"
utility and the Windows
"taskkill" program.
The Windows command to
kill this session would
be as follows.
C:\oracle9i\bin>orakill
ORCL92 768
In this example, the
windows thread
corresponding to the
Oracle session can be
killed in the operating
system without ever
logging into the
database. For another
example, the Windows command to
kill a session would
be:
C:\oracle9i\bin>orakill
ORCL92 768
In this example, the
thread (Oracle session)
was killed in the
operating system without
ever logging into the
database. Before killing
the session, the DBA may
decide to view the SQL
being executed by the
session. This can be
obtained by using the
TID above (300) in the
following SQL statement:
select
b.username, a.sql_text
from
v$sqltext_with_newlines
a, v$session b,
v$process c
where
c.spid = to_number('300', 'xxx')
and
c.addr = b.paddr
and
b.sql_address = a.address;
Tips for using
orakill
• The orakill utility
should be used as a last
resort only. If the
session cannot be killed
more gracefully (via
alter system kill
session), or the
instance is inaccessible
via SQL, then orakill
should be used to
terminate the offending
session.
• Access to the Windows
machine containing the
database must be secure
to use orakill. Any user
with access to the box
could access orakill or
the Windows Task Manager
and damage database
processes.
See complete directions
here:
This is an excerpt from
the book "Oracle
Utilities", and you
an get it directly from
the publisher for
30%-off at the link.