Display the open cursor setting in the database SQL>show parameter open SQL> select user_name,count(*) from v$open_cursor group by user_name; SQL>select * from v$sysstat where name like '%opened cursors current%'; TOP SQL opening the CURSOR select user_name,SQL_TEXT,count(*) as cnt from v$open_cursor where user_name='DBAREF' group by user_name,SQL_TEXT order by cnt desc; Another SQL to capture current open cursors by usersSQL> select s.username, max(a.value) from v$sesstat a, v$statname b, v$session s where a.statistic# = b.statistic# and s.sid (+)= a.sid and b.name = 'opened cursors current' group by s.username; select * from v$sysstat where name like '%opened cursors%'; |
DBA's Home Page - A website for Oracle, Greenplum and PostgreSQL DBA's > Database Monitoring and Troubleshooting >