Frank,
Your query shows the Thread_id of the oracle foreground thread of the oracle.exe
running on your database server.
The 'program' column shows the program name of the client program used on the client
machine
v$session.process would (will) show the NTprocess_id:thread_id pair of the client
program (on the client machine if running c/s) or if the client runs on unix, just the
process_id of the client program.
example:
SID PROGRAM PROCESS
-- -
12 [EMAIL PROTECTED] (TNS V1-V3)615736
...
21 sqlplus.exe 780:1068
The (sid=21) sqlplus.exe is an NT version, the sid=12 sqlplus runs on the unix server.
Both are connected to a unix server, but the process column does show the NT pid:tid
combination, as it does on an NT machine, as I showed in my last mail.
This is 'pstat' output on my NT client:
pid:30c pri: 8 Hnd: 113 Pf: 1724 Ws: 6796K sqlplus.exe
tid pri Ctx Swtch StrtAddrUser Time Kernel Time State
42c 8 484 77E99264 0:00:00.110 0:00:00.360 Wait:LpcReply
6c0 8 4 77E83775 0:00:00.000 0:00:00.000 Wait:UserRequest
5d4 8 2 77E83775 0:00:00.000 0:00:00.000 Wait:DelayExecution
Where pid=30c, tid=42c matches the above v$session.process column.
I hope this clears it up.
regards,
Mario Broodbakker
-Original Message-
Sent: maandag 20 januari 2003 14:50
To: Multiple recipients of list ORACLE-L
Mario
so how comes, that I am not able to find the corresponding SPID to my
NT-processes ???
I tried the following statement :
#
select
substr(a.spid,1,5) pid,
substr(b.sid,1,5) sid,
substr(b.serial#,1,5) ser#,
machine box,
substr(b.username,1,10) username,
-- b.server,
substr(b.osuser,1,8) os_user,
substr(b.program,1,30) program
from v$session b, v$process a
where
b.paddr = a.addr
and type='USER'
order by spid;
## and I got :
PID SID SER# BOX USERNAME
OS_USER PROGRAM
- - - --- --
-
00111 5810121 networkname xx
xxx C:\myexe.exe
###
(beware of wordwrap here)
If find the process myexe.exe on networkname in the taskmanager. It's PID is
: 478 (HEX 1DE). The database is on a separate server in the network.
None of the processes, running on the client could pointed to a SPID on the
server. ???
> Frank <
>-Ursprüngliche Nachricht-
>Von: Broodbakker, Mario [mailto:[EMAIL PROTECTED]]
>Gesendet am: Montag, 20. Januar 2003 13:59
>An: Multiple recipients of list ORACLE-L
>Betreff: RE: 100% CPU utilization, urgent
>
>Frank,
>
>I'm pretty sure they do:
>
>SQL> select spid,program from v$process;
>
>SPID PROGRAM
>- --
> PSEUDO
>892 ORACLE.EXE
>896 ORACLE.EXE
>1044 ORACLE.EXE
>528 ORACLE.EXE
>616 ORACLE.EXE
>792 ORACLE.EXE
>300 ORACLE.EXE
>
>From Pstat:
>
>pid:6a8 pri: 8 Hnd: 206 Pf: 43673 Ws: 17828K oracle.exe
> tid pri Ctx Swtch StrtAddrUser Time Kernel Time State
> 424 8 937 77E99264 0:00:00.020 0:00:01.281 Wait:Executive
> 690 851 77E83775 0:00:00.000 0:00:00.020 Wait:UserRequest
> 6f8 8 2 77E83775 0:00:00.000 0:00:00.000 Wait:UserRequest
> 510 9 7 77E83775 0:00:00.000 0:00:00.000 Wait:UserRequest
> 558 8 4 77E83775 0:00:00.000 0:00:00.010
>Wait:DelayExecution
> 450 971 77E83775 0:00:00.000 0:00:00.000 Wait:EventPairLow
> 37c 8 8158 77E83775 0:00:00.220 0:00:00.861 Wait:UserRequest
> 380 8 926 77E83775 0:00:00.020 0:00:00.090 Wait:UserRequest
> 414 8 1040 77E83775 0:00:00.010 0:00:00.270 Wait:UserRequest
> 210 9 1837 77E83775 0:00:00.040 0:00:00.080 Wait:UserRequest
> 268 8 237 77E83775 0:00:00.420 0:00:00.150 Wait:UserRequest
> 318 965 77E83775 0:00:00.010 0:00:00.040 Wait:UserRequest
> 12c 9 6347 77E83775 0:02:30.826 0:00:00.821 Wait:UserRequest
>
>The last tid (12c hex) equals to 300: that's my thread after
>running Jonathans world famous kill_cpu script.
>You can checkout (after converting to dec) a few of the others too.
>This was the case on NT4 and I just showed this on W2K
>In perfmon you can find the thread_id in the Thread Object
>(don't confuse it with the perfmon's object_id!), and off
>course the cpu usage of the corresponding thread.
>
>regards,
>Mario
>Btw I didn't see