Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2009
    Location
    Mumbai,India
    Posts
    16

    Red face Unanswered: 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?

  2. #2
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    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

  3. #3
    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.

  4. #4
    Join Date
    Jan 2007
    Location
    Jena, Germany
    Posts
    2,721
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •