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 > Code page issues

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-04-05, 12:28
chavadb2 chavadb2 is offline
Registered User
 
Join Date: Aug 2004
Posts: 138
Code page issues

AIX 5.2
udb v8.1 fp6a

Hi All,

I created the database by mistake in default code page..This database needs UTF-8 code..I know the database need to be dropped and recreated..I need to keep the data and coverted it to utf-8

what are my options now?

how do I keep the data?

There is an option in export to convert the data to required codepage while exporting

db2 'export to 1.ixf of ixf modfied by codepage=1208 select * from tablename'

this is working for tables without lobs..how do I handle lobs in this case?

db2 'export to 1.ixf of ixf lobs to /lobdir lobfile lobs1 modified by lobsinfile modfied by codepage=1208 select * from tablename'

is not working...is there any syntax error with my statement?
Reply With Quote
  #2 (permalink)  
Old 10-05-05, 03:33
przytula przytula is offline
Registered User
 
Join Date: Nov 2004
Posts: 374
codepage

on solaris we had to set the LANG setting
export LANG=en_US.UTF-8
this was related to the locale setting
when using export with ixf we also had problems with lobs not correctly exported
__________________
Best Regards, Guy Przytula
DB2/ORA/SQL Services
DB2 DBA & Advanced DBA Certified
DB2 Dprop Certified
http://users.skynet.be/przytula/dbss.html
Reply With Quote
  #3 (permalink)  
Old 10-05-05, 03:46
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
If you LOBs are less than 32K, then they will be included in the IXF file if you don't specify a separate LOB file on export. Anything over 32K will be truncated.
__________________
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
  #4 (permalink)  
Old 10-05-05, 14:24
chavadb2 chavadb2 is offline
Registered User
 
Join Date: Aug 2004
Posts: 138
Thanks for the replies..I tried every option suggested by IBM

http://www-128.ibm.com/developerwork...u/0210lau.html

1. Set DB2CODEPAGE=1208 and use db2move export & import (or load)

Problems: Data got truncated in most of the tables during export. This casued constraint violations during the import. Lobs & data in some coulumns also got truncated

2. without db2codepage reg variable, use db2move export & then use iconv to convert the data..this also gave the same problems during import

luckily , the application is still in development ..so we are thinking to cleanup the portal & re-install it
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