Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Issue with Oracle open cursors....

Status
Not open for further replies.

patnim17

Programmer
Jun 19, 2005
111
US
Hi,
I have an problem with the cursors in Oracle that remain open after the connection to the databse is closed.
Let me explain the "cursor" that I am talking about.

In a Stored procedure we can explicitly OPEN a cursor for a select statement, FETCH etc. That is one cursor.

But, even if you execute a simple SQL statement, from say SQL PLUS or TOAD, Oracle basically open a cursor internally to get the data and once it is displayed the cursor gets closed. So in our oracle environment I did try to execute a SQL statement from TOAD and could see oracle openeing cursor and close it immediately after the statement is executed. So it definitely is not a Oracle Issuse.

Now if I execute a SQL statement from the Java application, under Weblogic 8.1 that uses connection pools, the cursors remain open in the oracle and never gets closed..

did someone else encounter similar issues before?

nims
 
An Oracle cursor in JDBC is called a "ResultSet".
If you do not close that ResultSet object, then you will get open/unclosed cursors.

Simple solution is : Close your ResultSets !

--------------------------------------------------
Free Java/J2EE Database Connection Pooling Software
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top