SELECT * FROM V$SESSION;  

 

SELECT SID, COUNT(SID) "cursor" FROM V$OPEN_CURSOR GROUP BY SID;

 

SELECT SQL_TEXT FROM V$SQLAREA A, V$SESSION B WHERE A.ADDRESS = B.SQL_ADDRESS

AND B.SID = 'xx';

 

SELECT * FROM  V$OPEN_CURSOR;

 

SELECT sql_text, count(sid) cnt 
  FROM v$OPEN_CURSOR 
  GROUP BY sql_text 
  ORDER BY cnt DESC

 

 

 SELECT   /*+ rule */
         s.status "Status", s.serial# "Serial#", s.TYPE "Type",
         s.username "DB User", s.osuser "Client User", s.server "Server",
         s.machine "Machine", s.module "Module", s.terminal "Terminal",
         s.program "Program", p.program "O.S. Program",
         s.logon_time "Connect Time", lockwait "Lock Wait",
         si.physical_reads "Physical Reads", si.block_gets "Block Gets",
         si.consistent_gets "Consistent Gets",
         si.block_changes "Block Changes",
         si.consistent_changes "Consistent Changes", s.process "Process",
         p.spid, p.pid, s.serial#, si.sid, s.sql_address "Address",
         s.sql_hash_value "Sql Hash", s.action
FROM v$session s, v$process p, sys.v_$sess_io si
WHERE s.paddr = p.addr(+)
     AND si.sid(+) = s.sid
     AND s.username IS NOT NULL
     AND NVL (s.osuser, 'x') <> 'SYSTEM'
     AND s.TYPE <> 'BACKGROUND'
ORDER BY 3
