Highlighted
Absent Member.
Absent Member.
692 views

jdbc driver specify language on connect


Hi,

I've tried to find documentaion on this but failed.

we have a global database and multiple drivers that connect to the same
DB.

Due to how the DB view is configured some values appear differently
depending on the NLS_LANG setting (e.g. in SQL Developer) when viewing
the database. for example when set to AMERICAN i shows 1 value, when set
as FRENCH it shows as another, and when set at ENGLISH it shows as
(null).

I was hoping to be able to put a language parameter in the connection
details.
e.g. in the: jdbc:oracle:thin:@x.x.x.x:1537:Database1 paremeters.

Is it possible to have the drivers specify which language they use when
they query/sync with the database?

Thanks in advance


--
Jevans78
------------------------------------------------------------------------
Jevans78's Profile: https://forums.netiq.com/member.php?userid=7684
View this thread: https://forums.netiq.com/showthread.php?t=54307

Labels (1)
0 Likes
3 Replies
Highlighted
Knowledge Partner
Knowledge Partner

Re: jdbc driver specify language on connect

Jevans78 wrote:

>
> Hi,
>
> I've tried to find documentaion on this but failed.
>
> we have a global database and multiple drivers that connect to the same
> DB.
>
> Due to how the DB view is configured some values appear differently
> depending on the NLS_LANG setting (e.g. in SQL Developer) when viewing
> the database. for example when set to AMERICAN i shows 1 value, when set
> as FRENCH it shows as another, and when set at ENGLISH it shows as
> (null).
>
> I was hoping to be able to put a language parameter in the connection
> details.
> e.g. in the: jdbc:oracle:thin:@x.x.x.x:1537:Database1 paremeters.
>
> Is it possible to have the drivers specify which language they use when
> they query/sync with the database?
>
> Thanks in advance


Did you try setting NLS_LANG as a "connection-properties" driver parameter
mentioned in
https://www.netiq.com/documentation/idm45drivers/jdbc/data/b1pu3ie.html ?
______________________________________________
https://www.is4it.de/identity-access-management
0 Likes
Highlighted
Absent Member.
Absent Member.

Re: jdbc driver specify language on connect


Thanks lhaeger,

I looked at adding the parameters here, but couldn't get the driver to
start as I was getting "invalid arguments in call" when trying the
NLS_LANG=American, I also tried american_america.al32utf8 &
American_America.UTF8 but the same error in the driver and it won't
start.

I'm guessing I have the wrong format here, but I couldn't find a
specific doc online for how to set this.


--
Jevans78
------------------------------------------------------------------------
Jevans78's Profile: https://forums.netiq.com/member.php?userid=7684
View this thread: https://forums.netiq.com/showthread.php?t=54307

0 Likes
Highlighted
Knowledge Partner
Knowledge Partner

Re: jdbc driver specify language on connect

Jevans78 wrote:

> I'm guessing I have the wrong format here, but I couldn't find a
> specific doc online for how to set this.


I've been digging a bit deeper and found
http://docs.oracle.com/cd/E11882_01/appdev.112/e13995/oracle/jdbc/OracleDriver.h
tml which lists the supported connection properties for the Oracle JDBC
drivers. No language setting listed, unfortunaltely.

Another route to research might be the connection-init drv parameter (-->
https://www.netiq.com/documentation/idm45drivers/jdbc/data/b1pu3ie.html#b1pu3lc)
.. Oracle docs at
http://docs.oracle.com/cd/E17781_01/appdev.112/e18147/tdddg_globalization.htm#TD
DDG62310 kind of suggest that an init statement like

ALTER SESSION SET NLS_LANGUAGE=ITALIAN;

should switch the session language on an already established connection.
______________________________________________
https://www.is4it.de/identity-access-management
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.