Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: current query being executed
"Lisa Spielman" <lisa.spielman_at_compaq.com> wrote in message
news:8kns45$5cj$1_at_mailint03.im.hou.compaq.com...
> Is there any way to see what the current query being executed is?
>
> We have a process that keeps on getting hung and would like to
> see what query it is processing.
>
> ( In Informix you can do an onstat -g -sql <session id of process >
> and it will show the sql statement )
>
> thanks, Lisa
>
>
sure there is.
If you are capable of isolating the session, you can also isolate the sql.
An generic query for session info is
select sid, serial#, program, terminal
from v$session
where type = 'USER'
The v$session table also contains a column called
sql_address and sql_hash_value.
Those consitute the relationship
with v$sqlarea
and also with v$sqltext_with_newlines.
I currently don't have a working query at hand, but I guess you now have
sufficient info to figure out the rest yourself. If not, mail me, and I will
dig it up for you.
Hth,
Sybrand Bakker, Oracle DBA Received on Fri Jul 14 2000 - 00:00:00 CDT
![]() |
![]() |