Oracle 8i -- Cursor count increased even after closing resultset/statement/connection
Posted on 2005-04-11
We are running a single database query with different variables each time. Everytime we run the query with a different set of variables, the cursor count increases. If we run the same query again later, the cursor count does not increase.
To count the cursors, we're using:
select count(*) from v$open_cursor;
We are closing the resultset, statement and connection after each execute.
My questions are:
Does Oracle remove the closed cursors right away or is the increasing count a sign that we're doing something wrong?
The select statement to count the cursors is checking for open cursors, so I don't understand how the cursor can still be open even after closing the rs, stmt and conn.
(I keep reading about the java garbage collection with regards to this issue, so I'm wondering if Oracle has a similar issue)
(Could caching be an issue?)
If this is a sign that there is a problem with something that we are doing, what are some possible fixes/references that I can look into? Again, people keep referring to changes that should be made to the init.ora file, but I'm not sure exactly what I should be looking for.
Sorry to say, I don't understand too much about dealing with databases, so any tips would be great.
If you have any questions, I should be able to fill you in with any information you need tomorrow (tuesday).