NLS_LANG not taken from selected Oracle_Home

NLS_LANG not taken from selected Oracle_Home

Postby holger.sachs » Fri 25 Aug 2017 13:07

Hi,
we are using dotConnect Universal with Oracle.

Lets assume this: Two Oracle clients installed on a machine "A" and "B".
"A" is the first in the Path

Aplication should use "B" so we add "Oracle_Home = B" to the connection string.
This works perfecly fine, its taking the OCI.dll from the "B" client.

But we have the impression that ist not taking the NLS_Lang setting from the "B" client, but uses the "A" client for that.
Could you please confirm that you not only using the OCI.dll but also all the settings from this special Oracle:home and not taking any defaults from the first client in the path ?

regards
Holger
holger.sachs
 
Posts: 3
Joined: Fri 25 Aug 2017 13:00

Re: NLS_LANG not taken from selected Oracle_Home

Postby Pinturiccio » Tue 29 Aug 2017 12:01

We have reproduced the issue. We will investigate it and post the results here.
Pinturiccio
Devart Team
 
Posts: 2020
Joined: Wed 02 Nov 2011 09:44

Re: NLS_LANG not taken from selected Oracle_Home

Postby holger.sachs » Fri 01 Sep 2017 09:17

Hi, Any news on this, any idea how long investigation will take ?
regards
holger.sachs
 
Posts: 3
Joined: Fri 25 Aug 2017 13:00

Re: NLS_LANG not taken from selected Oracle_Home

Postby Pinturiccio » Tue 05 Sep 2017 14:24

This is the Oracle Client behavior. The same NLS_LANG is used for all Oracle Clients with the same major version. NLS_LANG value is taken from the first loaded Oracle Client. For example, if you have two Oracle Clients 12.x, they both will have the same NLS_LANG. Since default home is loaded at first, its NLS_LANG is used for all Oracle Clients with the same major version.
We will investigate the possibility of affecting this situation from our side, but there is no timeframe.
Pinturiccio
Devart Team
 
Posts: 2020
Joined: Wed 02 Nov 2011 09:44

Re: NLS_LANG not taken from selected Oracle_Home

Postby holger.sachs » Wed 13 Sep 2017 11:00

Hi,

is this answer coming from your own investigation or is this a documented and well known Oracle issue?

Do you have any link to Oracle documentation where this is stated ?
holger.sachs
 
Posts: 3
Joined: Fri 25 Aug 2017 13:00

Re: NLS_LANG not taken from selected Oracle_Home

Postby Pinturiccio » Tue 19 Sep 2017 10:17

It is coming from our investigation. We don't apply any additional Oracle Client settings to an Oracle session because we think that Oracle Client must do it itself. There were no problems with it before.

You can use the "Run Once Command" connection string parameter to set the necessary NLS_LANG value. For example, add the following string to your connection string:
Code: Select all
"Run Once Command=ALTER SESSION SET NLS_LANGUAGE= 'AMERICAN';"


You can replace 'AMERICAN' with any other NLS_LANGUAGE value. For more information, please refer to
https://www.devart.com/dotconnect/oracle/docs/?Devart.Data.Oracle~Devart.Data.Oracle.OracleConnection~ConnectionString.html
https://www.devart.com/dotconnect/oracle/docs/?Devart.Data~Devart.Common.DbConnectionStringBuilder~RunOnceCommand.html
Pinturiccio
Devart Team
 
Posts: 2020
Joined: Wed 02 Nov 2011 09:44


Return to dotConnect for Oracle