Page 1 of 1

Handling special characters with Oracle OCI

Posted: Fri Dec 15, 2006 7:58 am
by Soumyabrata
Hi,
I am trying to load data from a sequential file to a staging table in Datastage using ORacle OCI coneector.The file contains special characters.After load is done in the staging table,I am finding that the special characters have been replaced by junk characters in the table.I am using UTF8 as NLS and have also tries out MS1252 as NLS but without success.Can you pls. tell if DataStage supports Oracle OCI for special characters.If so how?If not so why,because logically OCI connector should not be a problem even if special characters are present in the data.

Thanks,
Soumyabrata

Posted: Fri Dec 15, 2006 8:04 am
by chulett
See if this post helps or any of the other posts you can find by searching for NLS_LANG.

If not, come back with more details, like what NLS_LANG setting your target database is and some examples of these 'special' characters. Some are more special than others, from what I recall.

Posted: Fri Dec 22, 2006 4:03 am
by Soumyabrata
Hi,

We have tried inserting the data using OCI, by setting the load mode of OCI to manual which would create the above files.
In the control.ldr file add the parameter CHARACTERSET utf8.
Now log on to the unix session set NLS_LANG= AMERICAN_AMERICA.WE8ISO8859P1. If we run sqlldr the characters are loaded correctly.

sqlldr userid=<username>/<password> control=control.ldr

So it seems that the datastage is missing some NLS mapping. Please try to add the WE8ISO8859P1 NLS map in data stage, by default it is not present it might need to downloaded and installed.I am not sure about this, needs to be checked.Can some one help me how to download and install the NLS map?

Thanks,
Soumyabrata

Posted: Fri Dec 22, 2006 4:04 am
by Soumyabrata
Hi,

We can try inserting the data using OCI, by setting the load mode of OCI to manual which would create the above files.
In the control.ldr file add the parameter CHARACTERSET utf8.
Now log on to the unix session set NLS_LANG= AMERICAN_AMERICA.WE8ISO8859P1. If we run sqlldr the characters are loaded correctly.

sqlldr userid=<username>/<password> control=control.ldr

So it seems that the datastage is missing some NLS mapping. Please try to add the WE8ISO8859P1 NLS map in data stage, by default it is not present it might need to downloaded and installed.I am not sure about this, needs to be checked.Can some one help me how to download and install the NLS map?

Thanks,
Soumyabrata

Posted: Fri Dec 22, 2006 8:35 am
by chulett
Did you read the post I linked to? The blue letters there can be clicked on and will explain what you need to do. Short answer is modify your dsenv file.

DataStage isn't missing anything because it's not the one that needs that mapping - Oracle does. So nothing to download or install, just a little configuration change or two needed.

Posted: Sat Apr 14, 2007 12:29 am
by dwuser
Chulett,

Can you please provide the link for this topic.

Posted: Sat Apr 14, 2007 6:24 am
by chulett
I did - as noted, it is in my first reply in this thread. And as noted, two words there should appear different - blue - they are the link to the topic in question.

Or simply search for NLS_LANG and you'll find a plethora of topics.