Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: How to watch another connection
In article <b2677297.0107110741.140461b8_at_posting.google.com>,
marcus.kuehl_at_t-online.de says...
>
>Hallo !
>
>I have got the folowing problem:
>
>I want to get the SQL-Statement, another connection is currently
>working on. I tried to do this with the following
>statement:
>
>select
> SID
>, USERNAME
>, LOCKWAIT
>, SQL_ADDRESS
>, SQL_HASH_VALUE
>, SQL_TEXT
>from v$session a
>, V$SQLTEXT b
>where sid = xxx
>and b.ADDRESS = a.SQL_ADDRESS
>and b.HASH_VALUE = a.SQL_HASH_VALUE
>order by b.PIECE
>
>But the statement I get doesn't seem to be the right one !
>
>Can anybody help me ?
>
>Thank You
>
>Marcus
see
http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:767025833873
I have a script there that does this
-- Thomas Kyte (tkyte@us.oracle.com) http://asktom.oracle.com/ Expert one on one Oracle, programming techniques and solutions for Oracle. http://www.amazon.com/exec/obidos/ASIN/1861004826/ Opinions are mine and do not necessarily reflect those of Oracle CorpReceived on Wed Jul 11 2001 - 11:52:46 CDT