Seema,
This will show you all SQL in the SQL area for a certain SID, as well as
showing you the currently executing cursor.. Simply input the SID value you
are interested in where it says (*SID*)..
-------------------------------------------------------------------
select s.sid sid,
c.sql_text sql_text,
c.address address,
ltrim(to_char(c.hash_value, '9999999999'), ' ') hash_value,
substrb(' ', 1, 2) execcur
from v$open_cursor c,
v$session s
where c.saddr = s.saddr
and c.hash_value != s.sql_hash_value
and s.sid in (*SID*)
union
select s.sid sid,
c.sql_text sql_text,
c.address address,
ltrim(to_char(c.hash_value, '9999999999'), ' ') hash_value,
substrb('* ', 1, 2) execcur
from v$open_cursor c,
v$session s
where c.saddr = s.saddr
and c.hash_value = s.sql_hash_value
and s.sid in (*SID*)
-------------------------------------------------------------------
HTH
Mark
===================================================
Mark Leith | T: +44 (0)1905 330 281
Sales & Marketing | F: +44 (0)870 127 5283
Cool Tools UK Ltd | E: [EMAIL PROTECTED]
===================================================
http://www.cool-tools.co.uk
Maximising throughput & performance
-----Original Message-----
Sent: 11 March 2002 15:28
To: Multiple recipients of list ORACLE-L
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: [EMAIL PROTECTED]
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: [EMAIL PROTECTED] (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: Mark Leith
INET: [EMAIL PROTECTED]
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: [EMAIL PROTECTED] (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).