Re: Viewing which sql query is associated to a SPID
Date: Wed, 21 Mar 2001 13:23:35 GMT
Message-ID: <3ab8ab53.0_at_news.cali.co.uk>
The following is some sql that I use to check this out.... I'm not a DBA, but it might help you....
select s.username,
s.sid, s.serial#, p.spid, s.status, s.osuser, s.program, s.machine, s.osuser, s.sql_address from v$process p, v$session s
where p.addr = s.paddr
and s.username = '&WHICH_USER';
select sql_text
from v$sqltext_with_newlines
where address = '&SQL_ADDRESS'
order by piece;
Simon Redmond
Snr Ora Dev
"Sebastien Le Floc'h" <slefloch_at_immostreet.com> wrote:
>Hi
>I'm looking for the way to viey which sqlquerie is executing a SPID :
>(oracle8.i)
>
>select spid, v$session.program, osuser, v$session.username,
>status,to_char(logon_time,'YYYYMMDD HH24:MI') from v$process, v$session
>where v$process.addr=v$session.paddr order by status,
>v$session.username,v$session.program
>
>gives me informations on wich SPID runs an active connection
>I'd like to associate which SQLquery it is executing, but I can't find it
on
>Oracle doc
>
>1664 ? _at_titi.fr (TNS V1-V3) root MYUSER ACTIVE 20010321 12:20 ||||| select
*
>from my1000000linetable |||| <- I will know why my db is out of order !!!
>
>Any DBA can help ?
>
>
Received on Wed Mar 21 2001 - 14:23:35 CET