File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes blob and query heap memory Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "blob and query heap memory" Watch "blob and query heap memory" New topic
Author

blob and query heap memory

Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 29261
    
140

When I try to insert a large blob (10 megs) into a db2 database using JDBC, I get an error about the query heap not having enough memory. When I increase the query heap size to more than 10 megs, the query executes fine.
Interestingly enough, the same blob inserts fine using a CPM.
If I guess a number too low, I could wind up with a large blob that crashes at runtime. Is there any way to stream the byte[] passed so that JDBC doesn't try to load the whole thing in memory at once?


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: blob and query heap memory
 
Similar Threads
java.lang.OutOfMemoryError
Memory Leak with JTextArea
What happens when you read large blob data from Oracle db using jdbc connection?
How to store & retrieve a video file from database?
how to increase heap size with eclipse?