SQL Script to Check the Open Cursors in the Oracle Database

_____________________________________________________________________________________________________________________

Query
set pages 1000 lines 120
col username for a15
SELECT      OC.inst_id,

            OC.user_name username,
            OC.sid,
            OC.sql_text
FROM    gv$open_cursor OC
ORDER BY 2,3
/
Output
   INST_ID USERNAME                  SID SQL_TEXT
---------- -------------------- ---------- ----------------------------------------------------------
        1 SYS                       390 SELECT /*+ CONNECT_BY_FILTERING */ s.privilege# FROM sys.sys
        1 SYS                       390 select name,intcol#,segcol#,type#,length,nvl(precision#,0),d
        1 SYS                       390 select col#,intcol#,reftyp,stabid,expctoid from refcon$ wher
        1 SYS                       390 select actionsize from trigger$ where obj# = :1
        1 SYS                       390 select timestamp, flags from fixed_obj$ where obj#=:1
        1 SYS                       390 select obj#,type#,ctime,mtime,stime, status, dataobj#, flags
        1 SYS                       390 SELECT /*+ ALL_ROWS */ COUNT(*) FROM SYS.DBA_POLICIES V WHER
        1 SYS                       390 select l.col#, l.intcol#, l.lobj#, l.ind#, l.ts#, l.file#, l

_____________________________________________________________________________________________________________________

0 comments:

Post a Comment

 

acehints.com Copyright 2011-19 All Rights Reserved | Site Map | Contact | Disclaimer | Google