Inserting UTF-8 characters into Oracle

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
qt_ky
Premium Member
Premium Member
Posts: 2895
Joined: Wed Aug 03, 2011 6:16 am
Location: USA

Post by qt_ky »

I am not sure if the case matters, but often it does... The extra space after the = sign most likely does make it not work. I have this line in my dsenv file on AIX:

export NLS_LANG=AMERICAN_AMERICA.UTF8
Choose a job you love, and you will never have to work a day in your life. - Confucius
TonyInFrance
Premium Member
Premium Member
Posts: 288
Joined: Tue May 27, 2008 3:42 am
Location: Luxembourg

Post by TonyInFrance »

Nah Eric. The space is not the problem here. In fact there isn't even a space. the I am overriding the NLS parameter set at the project level using the local parameter $NLS_LANG in my job.

What I feel is I need to find a character set which is American but which also accepts UTF-8 characters like the accentuated 'e' and 'o'.
Tony
BI Consultant - Datastage
TonyInFrance
Premium Member
Premium Member
Posts: 288
Joined: Tue May 27, 2008 3:42 am
Location: Luxembourg

Re: Inserting UTF-8 characters into Oracle

Post by TonyInFrance »

thupallireddy wrote:SELECT * FROM V$NLS_PARAMETERS;
NLS_LANG = [NLS_LANGUAGE]_[NLS_TERRITORY].[NLS_CHARACTERSET]
Yes tried that. I use the query:
SELECT * from NLS_DATABASE_PARAMETERS WHERE parameter IN ( 'NLS_LANGUAGE', 'NLS_TERRITORY', 'NLS_CHARACTERSET');

I get:

Code: Select all

PARAMETER                      VALUE                                   
------------------------------ ----------------------------------------
NLS_LANGUAGE                   AMERICAN
NLS_TERRITORY                  AMERICA 
NLS_CHARACTERSET               AL32UTF8
3 rows selected.

So now in datastage (DSAdmin) I define my LANG and NLS_LANG as AMERICAN.AMERICA.AL32UTF8

The Oracle jobs abort with Error message ORA-12705: Cannot access NLS data files or invalid environment specified
Tony
BI Consultant - Datastage
thupallireddy
Participant
Posts: 16
Joined: Wed Apr 30, 2014 1:27 am
Location: Benagaluru

Re: Inserting UTF-8 characters into Oracle

Post by thupallireddy »

Tony,

I have also faced the same issue for trademark symbols as ? instead of TM. After entry in dsenv file, everything is working fine for me. I remember as i read in some forum recently as first we need to modify in server level(dsenv) to make into effect. May be Im wrong
:o But it worked for me with out any issue.
TonyInFrance
Premium Member
Premium Member
Posts: 288
Joined: Tue May 27, 2008 3:42 am
Location: Luxembourg

Re: Inserting UTF-8 characters into Oracle

Post by TonyInFrance »

Probably that will work... but the issue is DSENV is for ALL projects on a particular server and I cannot modify DSENV since its only one project which is accessing an Oracle database whereas all others on that server needs UTF8.
Tony
BI Consultant - Datastage
thupallireddy
Participant
Posts: 16
Joined: Wed Apr 30, 2014 1:27 am
Location: Benagaluru

Re: Inserting UTF-8 characters into Oracle

Post by thupallireddy »

Try without modifying in admin, just pass a parameter in job as

NLS_LANG=AMERICAN_AMERICA.AL32UTF8

Even in jobproperties, NLS ---> projectdefault(UTF8) and default(off).

Im new to this forum not able to paste screenshot of the same what i have used.

:)
TonyInFrance
Premium Member
Premium Member
Posts: 288
Joined: Tue May 27, 2008 3:42 am
Location: Luxembourg

Re: Inserting UTF-8 characters into Oracle

Post by TonyInFrance »

I don't think screenshots are possible on this forum...so you aren't missing anything...:-)

As for your solution I've already tried it. I mean in order to override NLS_LANG at the job level, it has to be defined at the project level as a user defined parameter right? So that's what I've done. At the job level even on defining it as AMERICAN_AMERICA.AL32UTF8 it doesn't work.
Tony
BI Consultant - Datastage
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Re: Inserting UTF-8 characters into Oracle

Post by chulett »

TonyInFrance wrote:I don't think screenshots are possible on this forum...so you aren't missing anything...
They are.

As in most forums, they are just [img] (Image) tags pointing to a file at a hosting site.
-craig

"You can never have too many knives" -- Logan Nine Fingers
Post Reply