• Post Reply Bookmark Topic Watch Topic
  • New Topic

Problems in fetching ref cursor.

 
Sreedhar Sudha
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

I am exeuting a Oracle stored proc which returns ref cursor. I have copule of problems with this.

1. Adter executing the proc..fetching the oupput from cursor is taking more time ..sometimes neary 1.5 hrs. Proc returns bulk data.Is there any way to make it fast.

My code is like this.

rs = ((OracleCallableStatement)cs).getCursor(2);
while(rs.next()){
//statements to get column values.

}

Is the above code causing slow fetch??

2. Before executing the proc, ie; after getting connection to Oracle DB after some time i get java.io.StreamCorruptedException: invalid stream header exception.

Can any one please help on this.
 
Joe Ess
Bartender
Posts: 9370
11
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The java.io.StreamCorruptedException is caused by trying to read data that was not written with an ObjectOutputStream. ObjectInputStream isn't some magical thing that turns ordinary data into Java objects. You have to write an object to read an object. Have a look at The Java Tutorial on Serialization for more. As for your other question, let's move this topic to the JDBC forum.
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!