I got the following scenario:
On a vm is the xe 11g installed with apex 4.1
On this vm I get:
env|grep -i nls
NLS_LANG=GERMAN_GERMANY.AL32UTF8
and
SQL>select * from nls_session_parameters;
PARAMETER
--------------------------------------------------------------------------------
VALUE
--------------------------------------------------------------------------------
NLS_LANGUAGE
GERMAN
NLS_TERRITORY
GERMANY
NLS_CURRENCY
\u20ac
NLS_NUMERIC_CHARACTERS
,.
I have now an apex application which when called from a browser (language german) within the vm reports on a page an error ORA-01722: invalid number. The debugging shows:
0.00142 0.00164 S H O W: application="119" page="7" workspace="" request="" session="828314563319401"
0.00305 0.00062 alter session set nls_language="AMERICAN"
0.00367 0.00053 alter session set nls_territory="AMERICA"
0.00420 0.00068 NLS: CSV charset=WE8MSWIN1252
0.00496 0.00057 ...NLS: Set Decimal separator="."
0.00546 0.00071 ...NLS: Set NLS Group separator=","
0.00616 0.00064 ...NLS: Set g_nls_date_format="DD-MON-RR"
0.00681 0.00063 ...NLS: Set g_nls_timestamp_format="DD-MON-RR HH.MI.SSXFF AM"
0.00742 0.00065 ...NLS: Set g_nls_timestamp_tz_format="DD-MON-RR HH.MI.SSXFF AM TZR"
0.00807 0.00062 NLS: Language=en-us
If I call the same app from my desktop Win7-machine there is no error. The debugging page shows:
0.00559 0.00564 S H O W: application="119" page="7" workspace="" request="" session="1389511553686001"
0.01121 0.00173 alter session set nls_language="GERMAN" 4
0.01293 0.00151 alter session set nls_territory="GERMANY" 4
0.01444 0.00187 NLS: CSV charset=WE8MSWIN1252 4
0.01630 0.00223 ...NLS: Set Decimal separator="," 4
0.01853 0.00193 ...NLS: Set NLS Group separator="." 4
0.02046 0.00179 ...NLS: Set g_nls_date_format="DD.MM.RR" 4
0.02225 0.00183 ...NLS: Set g_nls_timestamp_format="DD.MM.RR HH24:MI:SSXFF" 4
0.02409 0.00195 ...NLS: Set g_nls_timestamp_tz_format="DD.MM.RR HH24:MI:SSXFF TZR"
0.02605 0.00198 NLS: Language=de
The applications globalization attributes are:
Application Primary Language: English (en)
Application Language Derived From: Browser (use browser language preference)
Why is the app in the vm running with nls_language="AMERICAN" although the browser language in the vm is german ? How can I change/force the app to run with nls_language="GERMAN" ?