Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: SQL TEXT SEARCH

RE: SQL TEXT SEARCH

From: Mark Leith <mark_at_cool-tools.co.uk>
Date: Mon, 11 Mar 2002 08:15:21 -0800
Message-ID: <F001.00424A0D.20020311081521@fatcity.com>


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: mark_at_cool-tools.co.uk
===================================================
           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: 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: Mark Leith INET: mark_at_cool-tools.co.uk 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 - 10:15:21 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US