Win NT/2000 is a thread based Operating System and not process based Operating System like Unix. Oracle user and background processes are not multiple processes but, threads with in oracle.exe process. 'orakill' is oracle provided utility to kill a particular resource intensive thread under oracle.exe process. For help type in at the DOS prompt C:\>orakill /?
The following query can be used to get the sid, thread id of a particular resource intensive thread.
SQL> select sid, spid as thread, osuser, s.program
2 from sys.v_$process p, sys.v_$session s
3 where p.addr = s.paddr;
well alter system command sometimes takes time to kill a session, it\'s not immediate (sometimes yes depends how the resources are hold up I guess)
Orakill kills the OS thread straight away
Answer to your Q for my tip on how to kill NT process :
Diffrenece is :
If you kill from sqlplus it kills your connection from database and releases Database resources and its not going to release OS resources and all you are going to get is a message saying your session has been killed when you tried to access database.
If you kill using \'orakill\' it kills the OS process and relaeses OS resources.
Note the SID used as a parameter for orakill is the system identifier and not session identifier. Hence to kill a session use orakill test 406 where \'test\' is the instance to target, and \'406\' is the thread as derived from the query submitted in the tip.
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?
I have tried by ORAKILL, but I got the following error. and unable to kill the process.
Firstly I have query for the process by the following query.
1 select sid, spid as thread, osuser, s.program
2 from sys.v_$process p, sys.v_$session s
3* where p.addr = s.paddr
SQL>/
1 193 SYSTEM ORACLE.EXE
2 263 SYSTEM ORACLE.EXE
3 267 SYSTEM ORACLE.EXE
4 216 SYSTEM ORACLE.EXE
5 254 SYSTEM ORACLE.EXE
6 259 SYSTEM ORACLE.EXE
7 233
8 250
9 257
10 290
13 113 DOMAIN\Administrator SQLPLUSW.EXE
Then I have tried to kill the process 13 and thread 113 by the following commands -
Microsoft(R) Windows NT(TM)
(C) Copyright 1985-1996 Microsoft Corp.
C:\>orakill 13 113
Could not attach to Oracle instance 13: err = 2
C:\>
and got the above error "Could not attach to Oracle instance 13: err = 2 "
Bookmarks