Thursday, September 10, 2015

Get Oracle Version and NLS_LANG via SQL

For one of the applications I support, we have to pull the appropriate Oracle client. So I need the Oracle version. Second, we have to set the Oracle Client NLS_LANG value to match the database's settings. So here is a simple query to get that information.

select DECODE(parameter, 'NLS_CHARACTERSET', 'CHARACTER SET',
'NLS_LANGUAGE', 'LANGUAGE',
'NLS_TERRITORY', 'TERRITORY') name,
value from v$nls_parameters
WHERE parameter IN ( 'NLS_CHARACTERSET', 'NLS_LANGUAGE', 'NLS_TERRITORY')
NAMEVALUE
LANGUAGEAMERICAN
TERRITORYAMERICA
CHARACTER SETUTF8
VERSION11.2.0.4.0

1 comment:

mgsu ba 2nd year result 2021-22 said...

Hi, their colleagues, nice paragraph and nice arguments commented here, I am really enjoying by these.