Open cursor number increases after each open in NET-mode 5.80.0.41 on Delphi 5

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
ziper
Posts: 2
Joined: Tue 08 May 2007 08:42

Open cursor number increases after each open in NET-mode 5.80.0.41 on Delphi 5

Post by ziper » Tue 08 May 2007 09:04

ODAC 5.80.0.41, Delphi 5, NET-mode, Oracle 10.1, Oracle InstantClient 10.2

Problem description:
1. Create a simple test application with TOraStoredProc component.
2. Define oracle procedure, that returns cursor.
3. Call
TOraStoredProc.Open;
TOraStoredProc.Close;
SELECT v.VALUE AS numopencursors, s.machine, s.osuser, s.username, s.program
FROM V$SESSTAT v, V$SESSION s
WHERE v.statistic# = 3 AND v.SID = s.SID;
4. numopencursors = 8
5. Call
TOraStoredProc.Open;
TOraStoredProc.Close;
SELECT v.VALUE AS numopencursors, s.machine, s.osuser, s.username, s.program
FROM V$SESSTAT v, V$SESSION s
WHERE v.statistic# = 3 AND v.SID = s.SID;
6. numopencursors = 9

When it reaches open_cursor limit I get error "maximum open cursors" exceeded.

There is no problem with non-NET mode.

Our research shows, that OraClasses.pas Line 7905 can be a problem

if not FCommand.NativeCursor then begin
if FCommand.GetCursorState csInactive then
FCommand.Finish;
FFetchCursor.InternalFreeCursor; // ignore ref count
FCommand.SetCursor(nil);
end;

NativeCursor is true, and Cursor is not freed.

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Tue 08 May 2007 10:57

We could not reproduce the problem. Please send to odac*crlab*com a complete small sample that demonstrates the problem, including script to create server objects.

ziper
Posts: 2
Joined: Tue 08 May 2007 08:42

Post by ziper » Tue 08 May 2007 12:46

Now I can describe the problem

If returned rows OraStoredProc.FetchRows - OK

Plash
Devart Team
Posts: 2844
Joined: Wed 10 May 2006 07:09

Post by Plash » Thu 10 May 2007 10:51

We could not reproduce the problem with any number of returned rows. In the code of OraClasses.pas that you have provided, the NativeCursor function returns False, and the cursor is freed, when we tested it.

Please send to odac*crlab*com a complete small sample that demonstrates the problem, including script to create server objects.

Post Reply