|
|
|
|
|
|
|
|
Re: Help: Monitoring open_cursors [message #522703 is a reply to message #522702] |
Tue, 13 September 2011 04:08   |
 |
ntt85
Messages: 34 Registered: July 2011 Location: vietnam
|
Member |

|
|
Michel Cadot wrote on Tue, 13 September 2011 16:58Quote:So I wanna ask why the cursors can not close when we deploy on production server?
On DEV server, everything are good.
It happens the same thing on both, I bet.
Regards
Michel
Hey Michel,
I see open cursors with:
select
a.value
,c.username
,c.machine
,c.sid
,c.serial#
from v$sesstat a
,v$statname b
,v$session c
where a.statistic# = b.statistic#
and c.sid = a.sid
and b.name = 'opened cursors current'
and a.value != 0
and c.username IS NOT NULL
order by 1,2;
On DEV server, open cursor from application is 2. On Production Server it is increasing and now is 570.
I query to v$open_cursor and see the sql_text on Production server have a sql statement make the cursor can not close.
So it doesn't happen the same on the both, I think so.
[Updated on: Tue, 13 September 2011 04:09] Report message to a moderator
|
|
|
Re: Help: Monitoring open_cursors [message #522704 is a reply to message #522703] |
Tue, 13 September 2011 04:13   |
 |
Michel Cadot
Messages: 68737 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
You have to realize that we have ONLY the information you give.
In same environment Oracle behaves the same.
If Oracle behaves differently then the environments are not the same ones.
If cursors are not closed THEN the reason is the application does not close them.
Regards
Michel
[Edit: missing word]
[Updated on: Tue, 13 September 2011 06:46] Report message to a moderator
|
|
|
Re: Help: Monitoring open_cursors [message #522710 is a reply to message #522686] |
Tue, 13 September 2011 05:08   |
cookiemonster
Messages: 13965 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
ntt85 wrote on Tue, 13 September 2011 08:47My application use Java pool to connect Oracle DB, execute the simple query and free pool after result set returned.
And you think that closes cursors?
Two things close cursors:
1) Code that explicitly closes cursors
2) Disconnecting the oracle session that holds the cursors.
The whole point of a connection pool is that it avoids point 2 happening.
So you need to have the application explicitly close the cursors.
|
|
|
|
Re: Help: Monitoring open_cursors [message #522758 is a reply to message #522711] |
Tue, 13 September 2011 09:12   |
ThomasG
Messages: 3212 Registered: April 2005 Location: Heilbronn, Germany
|
Senior Member |
|
|
The FACT is that rs.close() is not called for some reason in the production environment. Probably because the processing loop is running into an exception.
The only way to find out is to look in the logs of the production system.
|
|
|
|
|
|