Detect/Kill hung sessions in NT
Hi, as a follow up of this thread I want to ask a question to a problem I was looking for solution:
We noticed that INACTIVE sessions that hung up ( i.e. because the user turn off his PC), in Oracle under Unix are eliminated in a few minutes, but in Oracle under NT this do not happens, and they dissapear just when they get the Idle_Time limit.
We think that is an OS (or maybe SqlNet) issue, which don't realise that isn't a connection between the oracle session and the remote user.
Any ideas? Some parameter to setup? Any script to check 'real' connections?
TIA.
Gus!
signalled but process not killed
Well i tried
orakill "instance_name" thread
it says
kill of thread id instance successfully signalled.
I did this for a user using sqlplus, but even after receining this message the user continued to use sqlplus and access the database without any hinderance for the same session !!!!!
WHY ?
Change the 1st parameter as database Instance name.
That's true. The orakill does not works and it shows the error like "could not attach ......"
The command should be
orakill ;
i.e., if sidname (name of the database(instance name)) is INS and spid is 2576 then the command should be,
orakill INS 2576
I have tested it on Oracle 8.1.5 and that works.
Building the ORAKILL from SQL Plus
Give this a try:
SET BUFFER 300
SET linesize 300
SET PAGESIZE 75
column sid format 999
column serial# format 9999999
column username format A20
column user# format 99999
column osuser format A15
column ORAKILL_DBSID_THREAD format A25
column MACHINE format a25
Prompt ****** c:\oracle9i\bin\ORAKILL ORACLE_DATABASE_SID THREAD_NUMBER
SELECT 'ORAKILL '||(SELECT instance_name FROM v$instance)||' '||SPID||'' "ORAKILL_DBSID_THREAD",
s.sid, s.serial#, STATUS, s.username, OSUSER, MACHINE, s.TERMINAL
FROM v$session s, v$session_wait w, V$PROCESS p
WHERE s.SERIAL# <> 1
AND s.sid = w.sid
AND s.paddr = p.addr;