JDBC and cursors

JDBC and cursors

Post by rkusene » Thu, 29 Apr 2004 03:04:42



I am debugging memory leak.

IDS 9.21.UC4
Solaris 2.6

Can anyone explain what happens internally at Informix when a JDBC
application does the following:-

ResultSet.Close()
PreparedStatment.Close()

If I am right, ResultSet uses a database cursor internally.
So closing a result set will issue a close cursor command.
PreparedStatment.close() should issue a free prepared statment command.
This way a prepared statement can be reused as long as it is not closed.
In other words every time result set can be closed for a prepared statment
without a memory leak.


Also if onstat -g opn shows growing number of open tables, can it taken
as equivalent of growing open cursors.

TIA.
 
 
 

JDBC and cursors

Post by Bill Dar » Thu, 29 Apr 2004 05:40:05


[Bill Dare]
Try "onstat -g stm SESSION_ID" to view all prepared statements for a
session.

Bill


sending to informix-list

 
 
 

JDBC and cursors

Post by rkusene » Thu, 29 Apr 2004 06:23:21

> Try "onstat -g stm SESSION_ID" to view all prepared statements for a

onstat -g stm is not available with 9.21. I think it is there in 9.3 only.