Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Enterprisemanager and Session Details -> Open Cursers: are they really open?

Re: Enterprisemanager and Session Details -> Open Cursers: are they really open?

From: Lars Tetzlaff <lars.tetzlaff_at_gmx.net>
Date: Mon, 11 Sep 2006 10:46:10 +0200
Message-ID: <ee37r6$vl7$01$1@news.t-online.com>


DA Morgan wrote:

> Lars Tetzlaff wrote:
>> DA Morgan wrote:

>>> Lars Tetzlaff wrote:
>>>> Hi
>>>>
>>>> I am not sure if i have a problem with the number of open cursors :(
>>>>
>>>> The Open Cursors Tab shows ~40 open cursors, but if the program
>>>> works correct there shouldn't be any open cursor. Since we are using
>>>> QT for db access, i don't know if i have to look for a bug in QT or
>>>> if OEM shows some 'cached' cursors.
>>>>
>>>> Any hints?
>>>>
>>>> We are using 10.2.0.2.
>>>>
>>>> Lars
>>>
>>> The following is on a single-user system
>>>
>>> * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
>>> SQL*Plus: Release 10.2.0.2.0 - Production on Fri Sep 8 06:02:46 2006
>>>
>>> Copyright (c) 1982, 2005, Oracle. All Rights Reserved.
>>>
>>> Connected to:
>>> Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production
>>> With the Partitioning, OLAP and Data Mining options
>>>
>>> SQL> shutdown immediate;
>>> Database closed.
>>> Database dismounted.
>>> ORACLE instance shut down.
>>> SQL> startup
>>> ORACLE instance started.
>>>
>>> Total System Global Area 612368384 bytes
>>> Fixed Size 1290916 bytes
>>> Variable Size 218107228 bytes
>>> Database Buffers 390070272 bytes
>>> Redo Buffers 2899968 bytes
>>> Database mounted.
>>> Database opened.
>>> SQL> SELECT COUNT(*)
>>> 2 FROM gv$open_cursor;
>>>
>>> COUNT(*)
>>> ----------
>>> 115
>>>
>>> SQL>
>>> * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
>>> What are you counting? The open cursors tab of what with what
>>> version of Oracle?
>>
>> I am using the "Oracle Enterprise Manager 10g Database Control" web 
>> interface.
>> There i am looking at the Session Details (Database Instance: db1  > 
>> Top Activity  >  Session Details ) of one single session. There exits 
>> a page open cursors. These open cursors belong to the chosen session ( 
>> as i believe ).
>> The version is 10.2.0.2.0 (windows XP).
>>
>> Does this answer your questions? Don't know how to describe it better.
>>
>> Lars
> 
> Are these cursors opened explicitly by code as in an OPEN CURSOR
> statement or, as I would guess, implicit cursors opened by Oracle
> that are available for reuse?

Since we are using QT i don't know exactly what statements are executed. QT uses OCI. To fetch data they use OCIStmtExecute and OCIStmtFetch or OCIStmtFetch2. The statement handle is released witch OCIHandleFree.

I can see my SQL statement in the list of open cursors after OCIHandleFree is executed. This happens even i a simple test program with "select * from t1".

Lars Received on Mon Sep 11 2006 - 03:46:10 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US