Search notes:

oradebug setorapid

On Windows

select
   prc.spid,   -- Use this number for oradebug setospid
   prc.pid     -- Use this number for oradebug setorapid
from
   v$session     ses                                                   join
   v$process     prc on ses.paddr           = prc.addr
where
   ses.sid = sys_context('userenv', 'sid');
SQL> oradebug setorapid 52
Oracle pid: 52, Windows thread id: 15752, image: ORACLE.EXE (SHAD)
The thread id (here: 15752) corresponds to prc.spid in the query above.

See also

oradebug setospid
oradebug setmypid
oradebug

Index