I am trying to get a better understanding of client side settings,
particularly DB2CODEPAGE.
I have a back-end remote unix db that is UTF-8 (1208). On my remote
clients, I see that my data loads(inserts) behave properly by setting
DB2CODEPAGE=1208 on the cleint side. Prior to setting this, I assumed
that the client machine's 'locale' would dictate behaviour. Apparently
not.
Can someone shed some light on the following -
1. What is the difference in using the "export DB2CODEPAGE=1208"
versus "db2set DB2CODEPAGE=1208", when setting this on the remote
client side ? Is one preferred over the other. Any behavior
differences ?
2. For the remote client, Is there a similar variable for db2cli.ini
file and should I set that as well ?
3. Do I need to set this on the server side as well ?
4. How do apps that use ODBC get this information ? Is it from the
db2cli.ini file ?
Artur - 05 May 2006 10:55 GMT
1. What is the difference in using the "export DB2CODEPAGE=1208"
versus "db2set DB2CODEPAGE=1208", when setting this on the remote
client side ? Is one preferred over the other. Any behavior
differences ?
(AW) Export sets the variable only for your current shell, where the
variable was set. db2set sets the variable for all clients in the
environment where the variable was set. If you set the variable at
both levels shell value will be taken.
2. For the remote client, Is there a similar variable for db2cli.ini
file and should I set that as well ?
(AW) I'm not sure if you can set the variable at this level. To my
knowledge - no.
3. Do I need to set this on the server side as well ?
(AW) DB2CODEPAGE is set only at the client. You can use the variable to
convert data to desired code pages.
4. How do apps that use ODBC get this information ? Is it from the
db2cli.ini file ?
(AW) Through local DB2 client.
-- Artur Wronski
mike_dba - 09 May 2006 15:36 GMT
Thank you for your response.