Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Databases / July 2004

Tip: Looking for answers? Try searching our database.

Oracle Blob Issue

Thread view: 
Saleem Ansari - 13 May 2004 17:32 GMT
May be this is a bug in oracle? Here is what I found out.

1. create a table with blob field and insert a empty blob record.
    SQL>create table demo(id number, data blob);
    SQL>insert into demo values(1,empty_blob());

2. Insert a file of size 1 MB into the blob field using JDBC API.
  After inserting the file, try reading and verifying the contents.

3. Now insert another file of size 500kb ( file size should be less
than previouly inserted file) into the same record( id=1) blob field.

  When you read this blob, you'll see that blob size is returning a
size of 1MB. And the worst thing is, the blob stream in addition to
the new file, has old files junk characters in the end.

So once a empty blob is used to store some data, it should not be
modified and used to store another set of data. To resolve this issue,
I delete the record and insert a new record in order to update the
blob field with the new data.

-saM
kirschk - 22 Jul 2004 17:27 GMT
Hi there!
I have the same Problem here but at another context.
-----------
Did you find out if this problem can be solved somehow?
My situation is a little bit more complicated.

I have a table with a blob field.
In the blob field is a record of X kb.
Now I need to get rid of the X kb.
If I use null as value, then I loose the reference.
If I use empty blob, I dont gain free space, which is my goal.

How can I get rid of the blob data, without loosing the structure?

I am talking about 160 Gbyte blob Data, which must be dropped somehow?
and also quick,
so please answer as soon as possible,

Many many thanks,

kostas
D Rolfe - 22 Jul 2004 17:38 GMT
> Hi there!
> I have the same Problem here but at another context.
[quoted text clipped - 9 lines]
>
> How can I get rid of the blob data, without loosing the structure?

Have you tried the truncate method of oracle.sql.BLOB?

David Rolfe
Orinda Software
Dublin, Ireland
Roedy Green - 22 Jul 2004 18:02 GMT
>I am talking about 160 Gbyte blob Data, which must be dropped somehow…
>and also quick,
>so please answer as soon as possible,

something that big probably should be stored in its own file.

Signature

Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.