If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > blob image issue

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-26-03, 23:37
lina37 lina37 is offline
Registered User
 
Join Date: Nov 2003
Location: singapore
Posts: 7
Question blob image issue

hello

OS: WIN2K
DB2 version: 7.2.7(enterprise) and 8.1.3(workgroup)

i need to export a table with a blob image to another database. I have used the IXF format and realised that after the import, the image has some blacklines on top of it.

The problem persists though I have tried both from 7.2.7 to 7.2.7 and from 8.1.3 to 8.1.3.

below is the table structure, the image is inserted into the database thru streaming (JAVA).

CREATE TABLE myblobtable
(
ID INTEGER NOT NULL,
SSTEXT VARCHAR(500) NOT NULL,
SSIMAGE BLOB(100K) LOGGED NOT COMPACT ,
NUMIMAGE SMALLINT NOT NULL DEFAULT 0,
NUMCONTENT SMALLINT NOT NULL DEFAULT 0,
NUMPDF SMALLINT NOT NULL DEFAULT 0,
constraint myblobtable_PK primary key (ID)
)
in MYAPPSPACE1;

At the moment, the only workaround is to use the Java application to stream the data in to the new database.

Btw, I tried to import thru del but encounter error SQLSTATE = 42601

db2> export to myfile.del of del lobs to mylobs/lobfile lobs1, lobs2 modified by lobsfile select * from myblobtable


Any assistance greatly appreciated.
Reply With Quote
  #2 (permalink)  
Old 11-27-03, 01:52
RKrick RKrick is offline
Registered User
 
Join Date: Feb 2002
Location: Germany
Posts: 141
Lina,

I'm not sure if this is your problem, but you have a typo on the command:
modified by lobsfile sould be modified by lobsinfile
Without this modifier, DB2 will put your lobs in the export file (myfile.del), and truncate them to 32K.
HTH,
__________________
Rodney Krick
Reply With Quote
  #3 (permalink)  
Old 11-27-03, 05:05
lina37 lina37 is offline
Registered User
 
Join Date: Nov 2003
Location: singapore
Posts: 7
hello Rodney

The typo error is my error when i post the issue.

Anyway,I realised that I cannot use del since the SSText is a multi line stylesheet codes so when importing it seems to treat each line as each row even when i set the coldel"" chardel,

Anyway, i manage to get it right by using the following:

export to c:\myfile.IXF of ixf lobs to c:\mylobpath lobfile lobs1, lobs2 modified by lobsinfile select * from myblobtable

import from c:\myfile.IXF of ixf lobs from c:\mylobpath modified by lobsinfile insert into myblobtable


thanks rodney for your prompt response. Btw, any tips on how to import del format of multiline data.

extracted from datafile:

99,"<?xml version='1.0' encoding='ISO-8859-1'?>
<xsl:stylesheet xmlns:xsl='http://www.w3.org/1999/XSL/Transform' version='1.0'>
<xslutput method='html'/></tr>...
</table>
</xsl:template>
</xsl:stylesheet>","lobs1.001.0.35190/",1,1,2,1,"bmp","Image On Top"

best regards,
lina
Singapore
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On