SQL Script to Check the Open Cursors in the Oracle Database

_____________________________________________________________________________________________________________________

SQL 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

_____________________________________________________________________________________________________________________

0 comments:

Post a comment

 

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