BLOB

Working with Hibernate and DB2 9, if you have a byte[] member in your entity which is supposed to be mapped to a BLOB column, you'll probably get:

ERROR [org.hibernate.util.JDBCExceptionReporter] - <DB2 SQL Error: SQLCODE=-301, SQLSTATE=07006, SQLERRMC=2, DRIVER=3.61.75>
ERROR [org.hibernate.event.def.AbstractFlushingEventListener] - <Could not synchronize database state with session>
org.hibernate.exception.SQLGrammarException: could not insert...

Which in general means wrong data type!

After throwing lots of hooks into the sea of Google & IBM, I came up with this one - thanks to Steve for his excellent fish

www.badlildog.com/words/

avim 08/02/2011 - 11:47

Guys, I just came back from a customer who has a problem, they are keeping a large BLOB which contains serialized java classes per each subscriber in their system.

Usually Oracle fetches the BLOB fast enough for them to deliver within their performance goals, but once in a while (about 0.5% of the cases) the fetch takes longer times and causing them delays that are unacceptable.

I have two questions for you:

(1) is that right that Oracle is not a "real-time" system, therefore it will not guarantee response time? why does Oracle sometime takes more time than average to process a query, and can this be optimized by configuration??

(2) does it make sense to store the data not in the database (e.g. file-system, LDAP, SAN, gFS, ...) given that all we need is to be able to lock, read and write the data.

What do you think??

udid 06/10/2008 - 17:40
Syndicate content