Hi,
I am having a problem in updating a blob column in oracle from jdbc if the size of the blob is greater than 2K in size. The space allocated for the blob column in 2G.
Could anyone help in this regard
Thanks
Ajit
-
Update blob in oracle of size > 2k using jdbc (6 messages)
- Posted by: Ajit Kar
- Posted on: November 18 2004 00:57 EST
Threaded Messages (6)
- Update blob in oracle of size > 2k using jdbc by Tracy Hartley on November 18 2004 04:57 EST
- Update blob in oracle of size > 2k using jdbc by Dana Carroll on November 18 2004 17:14 EST
- i like the oracle stored procs for this by bruce goldstein on November 23 2004 11:40 EST
- Update blob in oracle of size > 2k using jdbc by Hanson Char on July 07 2005 03:20 EDT
- Update blob in oracle of size > 2k using jdbc by Sven Pohl on July 19 2005 11:04 EDT
- Re: Update blob in oracle of size > 2k using jdbc by Upeksha Dharma on September 05 2007 09:18 EDT
-
Update blob in oracle of size > 2k using jdbc[ Go to top ]
- Posted by: Tracy Hartley
- Posted on: November 18 2004 04:57 EST
- in response to Ajit Kar
Ajit, I believe this is a known issue with the thin jdbc driver - at least it was for Oracle 8, don't know if it's been fixed in 9+. The oci drivers don't have this problem. -
Update blob in oracle of size > 2k using jdbc[ Go to top ]
- Posted by: Dana Carroll
- Posted on: November 18 2004 17:14 EST
- in response to Ajit Kar
Hi,I am having a problem in updating a blob column in oracle from jdbc if the size of the blob is greater than 2K in size. The space allocated for the blob column in 2G.Could anyone help in this regardThanksAjit
How are you doing your update? I have done this successfully in the past, but you can't just do a "update blah set field = value" query. You need to do a select for update on the column, get the stream, then write to that stream. You can then write any size Java string to the field. -
i like the oracle stored procs for this[ Go to top ]
- Posted by: bruce goldstein
- Posted on: November 23 2004 11:40 EST
- in response to Ajit Kar
I personally like the oracle stored proces for this. Specifically dbms_lob.write (and truncate). You still need a blob but the advantage is that you do not have to use oracles derived implementations of the blob and result set, etc.
Also, a 2k limit sounds like you are writing the data as a string (varchar 4k limit?). Not as a blob.
Regards,
Bruce -
Update blob in oracle of size > 2k using jdbc[ Go to top ]
- Posted by: Hanson Char
- Posted on: July 07 2005 03:20 EDT
- in response to Ajit Kar
One solution to get around this problem is to use the Oracle 10.1.0.4 JDBC thin driver, instead of the Oracle 9.2.0.x thin driver, to work against the Oracle 9.2.0.x database. Apparently it's related a bug in the 9.2.0.x JDBC driver.
Hanson -
Update blob in oracle of size > 2k using jdbc[ Go to top ]
- Posted by: Sven Pohl
- Posted on: July 19 2005 11:04 EDT
- in response to Hanson Char
I also got this problem.
After searching the web for reasons, it turned out that it is a known bug in the driver.
See also:
http://www.koders.com/java/fid9104868B82F5B700A98A7F901815AACB146A7F4F.aspx
(source code of org.apache.ojb.broker.platforms.PlatformOracleImpl).
We are still using Oracle 8.1.7.
Did anybody work arround this bug?
I will next try to use SELECT FOR UPDATE instead.
Could i possibly also use a newer driver?
Thanks for any help,
Sven -
Re: Update blob in oracle of size > 2k using jdbc[ Go to top ]
- Posted by: Upeksha Dharma
- Posted on: September 05 2007 09:18 EDT
- in response to Hanson Char
Hi, I'm having the same proble. I added new JDBC driver jar for Oracle 10.2 version. But Still having the same problem. May be data is currupted before inserting into the database :o( Can any1 help?