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

Home -> Community -> Usenet -> c.d.o.server -> Select from V$OPEN_CURSOR chronologically ordered ?

Select from V$OPEN_CURSOR chronologically ordered ?

From: Spendius <spendius_at_muchomail.com>
Date: 4 Mar 2005 03:11:33 -0800
Message-ID: <aba30b75.0503040311.23b0ac9b@posting.google.com>


Hi,
The following SELECT returns me all cursors opened by a session, with the string "current" in front of the statement currently being executed:
select

      st.address||st.hash_value n,
      decode(st.address||st.hash_value, sql_address||sql_hash_value, 'current'),
      st.sql_text
from  v$open_cursor oc,
      v$session s,
      v$sqltext st

where s.sid = &&1
  and oc.sid = &&1
  and oc.address = st.address
order by st.address, st.hash_value, st.piece

Do you think there's a way to get this displayed with a sort on some kind of timestamp stored somewhere in some obscure X$Kxxxx table to get it listed in the chronological sense of cursor openings ? I spent hours trying to figure out whether it's possible but to no avail. (I'm talking about 8i and 9i structures as well)

Thanks. Received on Fri Mar 04 2005 - 05:11:33 CST

Original text of this message

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