One Star

[resolved] Oracle connection : how to modify NLS_LANG ?

Hi,
We are facing the following problem : our Talend job is called from a java program located on a Unix server. NLS_LANG on this server is equal to "American_America.UTF8". We want to be able to modify NLS_LANG dynamically to match user's NLS_LANG value when connecting to Oracle (in order to handle "special" characters properly). We tried to use tSetEnv to modify the environment variable but the modification is not taken into account.
Do you have any of how we could solve this issue ?
Thanks !
Info : We use TOS 4.0.2
1 ACCEPTED SOLUTION

Accepted Solutions
One Star

Re: [resolved] Oracle connection : how to modify NLS_LANG ?

Problem solved using an Oracle API.
Thank you for your help.
3 REPLIES
Community Manager

Re: [resolved] Oracle connection : how to modify NLS_LANG ?

Hello
tSetEnv is used to set a property of the JRE(runtime)system, not the Operating system. Have a try to use the tOracleRow.
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: [resolved] Oracle connection : how to modify NLS_LANG ?

Hi shong and thank you for your reply.
It is impossible to set/modify NLS_LANG while connected to Oracle (ALTER SESSION doesn't work for this parameter). So I don't think tOracleRow will get us through this problem.
Isn't it possible to modify an environment variable at OS level before connecting to Oracle ?
Regards
One Star

Re: [resolved] Oracle connection : how to modify NLS_LANG ?

Problem solved using an Oracle API.
Thank you for your help.