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 > Binary data in char column

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-22-09, 05:49
DB2 D-B-A DB2 D-B-A is offline
Registered User
 
Join Date: Sep 2009
Location: Mumbai,India
Posts: 16
Red face Binary data in char column

We are migrating our database from oracle 10g to DB2 9.7 on AIX platform.There are few columns in oracle table which contain clubbed values(alphanumeric and binary values).The data type of these kind of columns is character.All the binary values in such columns got converted into junk values like /,? etc when stored into char type of column.

While migrating data from oracle tables to DB2,we made use of "IBM's data movement tool".Now when I tried loading data into DB2 tables,DB2 is not able to recognize junk values back into same binary values as oracle.Even the "look and feel" of data is quite different as compared with oracle.

I suspect that it might happen because of code page and character set mismatch,but I am not sure.The code page of DB2 database is 1208,code set is UTF-8 whereas character set of oracle database is WE8ISO8859P1.

Please suggest what can be the possible cause of this problem?
Reply With Quote
  #2 (permalink)  
Old 09-22-09, 06:17
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
You should probably look at CHAR FOR BIT DATA, and VARCHAR FOR BIT DATA column data types in DB2. These will not be converted because of code page differences in the DB2 server and DB2 client, but I don't know anything about IBM's data movement tool you are using for the migration.
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
  #3 (permalink)  
Old 09-22-09, 06:22
DB2 D-B-A DB2 D-B-A is offline
Registered User
 
Join Date: Sep 2009
Location: Mumbai,India
Posts: 16
I have already tried using char for bit data,but data gets totally distorted if I use this option.
Reply With Quote
  #4 (permalink)  
Old 09-28-09, 06:22
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
What I don't understand: either you have character data, in which case you have code page conversions in the picture - or you have binary data. Storing binary data in a CHAR or VARCHAR column is not a good idea at all. So could you clarify whether you have binary or character data and what you want to store and how?
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
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