Results 1 to 10 of 10
Thread: Plsql cursor jdbc
- 01-11-2010, 11:18 AM #1
Member
- Join Date
- Jan 2010
- Posts
- 13
- Rep Power
- 0
- 01-11-2010, 11:19 AM #2
Member
- Join Date
- Jan 2010
- Posts
- 13
- Rep Power
- 0
Thx in advance
- 01-11-2010, 11:23 AM #3
Senior Member
- Join Date
- Aug 2009
- Posts
- 2,388
- Rep Power
- 6
You can query v$sesstat where name='opened cursors current'.
- 01-11-2010, 12:00 PM #4
Member
- Join Date
- Jan 2010
- Posts
- 13
- Rep Power
- 0
Thx
I am new to this. pls give me some sample code ?
- 01-11-2010, 12:13 PM #5
Senior Member
- Join Date
- Aug 2009
- Posts
- 2,388
- Rep Power
- 6
What code did you try that failed?
- 01-11-2010, 01:24 PM #6
Member
- Join Date
- Jan 2010
- Posts
- 13
- Rep Power
- 0
If I excute above query it is showing
ERROR at line 1:
ORA-00942: table or view does not exist
- 01-11-2010, 01:44 PM #7
Senior Member
- Join Date
- Aug 2009
- Posts
- 2,388
- Rep Power
- 6
You need to be SYS to access those views in the system tablespace.
You should look those up in your oracle documentation. It has nothing to do with Java.
- 01-11-2010, 05:48 PM #8
Moderator
- Join Date
- Apr 2009
- Posts
- 10,476
- Rep Power
- 16
If you're planning on trying to check all the cursors have been closed, you won't succeed. Oracle caches some, so you won't be able to tell if there's a leak that way, as far as I know...
- 01-11-2010, 05:56 PM #9
Senior Member
- Join Date
- Aug 2009
- Posts
- 2,388
- Rep Power
- 6
That's why I didn't suggest that they look in v$open_cursor instead.
They could tell about the leak using these methods if they are very clever and rigorous but the attitude they have shown so far suggests that they will not.
If you want to try it yourself see
Monitoring Open and Cached Cursors | Oracle FAQ
- 01-12-2010, 07:58 AM #10
Moderator
- Join Date
- Apr 2009
- Posts
- 10,476
- Rep Power
- 16
Good article, but it does (sort of) agree with what I said about it being not really doable (at least as an automated thing). I did, however, get my terminology wrong. I thought it was down to the cacheing, but it's simply down to Oracle not closing cursors straight away.
I say automated, since they're talking about unit testing...and I would lay odds on that being JUnit. This is a hands on check and, arguably, doesn't lend itself to the sorts of things JUnit handles.
Similar Threads
-
change the mouse cursor - crosshair cursor
By cassysumandak in forum New To JavaReplies: 1Last Post: 09-28-2009, 01:57 AM -
PLSQL - JAVA Integration
By ttkong in forum JDBCReplies: 0Last Post: 04-09-2008, 08:31 AM -
How to use JDBC Template classes to control basic JDBC processing and error handling
By Java Tip in forum Java TipReplies: 0Last Post: 04-01-2008, 10:17 AM -
Using a cursor
By notnumber6 in forum New To JavaReplies: 3Last Post: 11-26-2007, 10:56 PM -
How to use JDBC Template classes to control basic JDBC processing and error handling
By JavaBean in forum Java TipReplies: 0Last Post: 09-28-2007, 12:56 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks