Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: How to count CURRENTLY OPENED CURSORS?
I use
select count(*) from v$open_cursor
In my gnumetrics application, I found that the number in V$SYSSTAT gets totally screwed occasionally (8.0.4) as do many of the statistics in the V$ tables. GNUmetrics will track the max# of open cursors across all sessions, total open cursors and average# of open cursors. This way you can be sure you are not hitting the limit for open_cursors in the init.ora file which is a per session limit.
Ethan
http://www.freetechnicaltraining.com/people_1.htm - Homepage http://www.gnumetrics.com - Oracle Performance Monitor http://www.qarbon.com - Create your own tutorials!
In article <8ud33v$bfl$1_at_secondhat.secondhat.com>,
<dominica_at_secondhat.com> wrote:
>
> Hi All,
>
> What is the BEST way to count opened cursors currently?
> (this is talking about Oracle Server 8.1.5 on solaris platform)
> Please email me directly to:
>
> dominica_at_secondhat.com
>
> Thank a lot in advance,
>
> Dominica Leung
> ====
>
> 1) I saw there is a
> V$open_cursor table in the "dict" table.
>
> But it look like it is accumulative.
>
> Since
> I do :
>
> when I do a count(*) from V$open_cursor.
>
> It has 16797.
>
> I know my setting in init_INSTANCENAME.ora
>
> open_cursors = 600
>
> 2) Then I saw another table V$SYSSTAT;
>
> I could do this from V$sysstat:
>
> STATISTIC# SUBSTR(NAME,1,30) CLASS VALUE
> ---------- ------------------------------ ---------- ----------
> 0 logons cumulative 1 1321
> 1 logons current 1 181
> 2 opened cursors cumulative 1 4860899
> 3 opened cursors current 1 16709
>
> 3)
> Or I could run utlbstat.sql and utlestat.sql
> and get the report:
>
> Statistic
> Total
> ----------------------------------------------------------------
> ------------
> Per Transaction Per Logon Per Second
> --------------- ------------ ------------
> no work - consistent read gets
> 1468
> 91.75 1468 146.8
>
> opened cursors
> cumulative 93
> 5.81 93 9.3
>
>
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Thu Nov 09 2000 - 12:51:37 CST