Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> RV: SQL TEXT SEARCH
Hi,
3 slqs that show you sql text when you enter unix process id or Oracle
SID:
undefine unixpid
select a.USERNAME,a.SPID "unix
pid",b.SID,b.serial#,b.osuser,b.program,a.program
from v$process a, v$session b
where a.spid='&unixpid'
and a.addr=b.paddr
/
undefine unixpid
select a.USERNAME,a.SPID,b.SID,b.serial#,b.osuser,b.terminal,c.sql_text
from v$process a, v$session b, v$sql c
where spid='&&unixpid'
and a.addr=b.paddr and b.sql_address=c.address and b.sql_hash_value=c.hash_value
prompt Otros cursores abiertos...
SELECT /*+ index(c) index(q) use_nl(q) */ q.piece, q.sql_text
FROM v$open_cursor c, v$sqltext_with_newlines q, v$session b, v$process a
where a.spid='&&unixpid' and
a.addr=b.paddr and c.sid = b.sid and c.address = q.address and c.hash_value = q.hash_value
select a.USERNAME,a.SPID "unix
pid",b.SID,b.serial#,b.osuser,b.program,a.program
from v$process a, v$session b
where a.addr=b.paddr
and b.sid=&SID
/
>
> Hi
> Does any one have sql scripts which show us sql text when we enter unix
> process id or oracle SID ?
> Please send if any one have.
> Thx
> -Seema
>
>
> _________________________________________________________________
> Send and receive Hotmail on your mobile device: http://mobile.msn.com
>
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> --
> Author: Seema Singh
> INET: oracledbam_at_hotmail.com
>
> Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> San Diego, California -- Public Internet access / Mailing Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
> also send the HELP command for other information (like subscribing).
-- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Natalia Laracca INET: nlaracca_at_afip.gov.ar Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).Received on Mon Mar 11 2002 - 09:58:57 CST