Today we are going to have look at a different topic of Oracle Database. As we all are aware that language is the most important and common element which we use in daily life. We can find the different county with different language. For more friendly nature oracle provides a parameter by which we can set language and the territory.

We human being are same but in different territory, we have different language and different lifestyle. As we are working on Oracle RDBMS we find that it works on different langue to make better understanding the users need.

Let’s look on “NLS_LANG Environment” on Oracle.

As we know globalization impacts a lot of technology. To perform coordination between Oracle components and windows we have to set some parameters.

for more information click here

  1. Determine the current NLS_LANG value in the database
SELECT * FROM V$NLS_PARAMETERS;

Parameter                                 Value

--------------------------      ---------------------------------------------

NLS_LANGUAGE                          SWEDISH

NLS_TERRITORY                         SWEDEN

NLS_CURRENCY                           Kr

NLS_ISO_CURRENCY                       SWEDEN

NLS_NUMERIC_CHARACTERS    ,.

NLS_CALENDAR                           GREGORIAN

NLS_DATE_FORMAT                 RRRR-MM-DD

NLS_DATE_LANGUAGE                     SWEDISH

NLS_CHARACTERSET                WE8MSWIN1252

NLS_SORT                        SWEDISH

NLS_TIME_FORMAT                 HH24:MI:SSXFF

NLS_TIMESTAMP_FORMAT                  RRRR-MM-DD HH24:MI:SSXFF

NLS_TIME_TZ_FORMAT                         HH24:MI:SSXFF TZR

NLS_TIMESTAMP_TZ_FORMAT       RRRR-MM-DD HH24:MI:SSXFF TZR

NLS_DUAL_CURRENCY             €

NLS_NCHAR_CHARACTERSET               UTF8

NLS_COMP                                             BINARY

NLS_LENGTH_SEMANTICS                     BYTE

NLS_NCHAR_CONV_EXCP

The format of the NLS_LANG value is [NLS_LANGUAGE]_[NLS_TERRITORY].[NLS_CHARACTERSET]

In the above case value for NLS_LANG is SWEDISH_ SWEDEN. WE8MSWIN1252

  1. Set NLS_LANG Value in client
ALTER SESSION SET NLS_LANGUAGE = '<NLS_LANGUAGE>';

ALTER SESSION SET NLS_TERRITORY = '<NLS_TERRITORY>';

Example:

ALTER SESSION SET NLS_LANGUAGE = 'SWEDISH';

ALTER SESSION SET NLS_TERRITORY = 'SWEDEN';

Check:

SELECT USERENV('LANG') FROM DUAL;

USERENV(‘LANG’)
------------------------------
S
SELECT * FROM V$NLS_PARAMETERS where parameter in('NLS_LANGUAGE','NLS_TERRITORY');

PARAMETER                   VALUE

--------------------------------------------------
NLS_LANGUAGE                SWEDISH
NLS_TERRITORY               SWEDEN

Thank you for giving your valuable time to read the above information.

If you want to be updated with all our articles send us the Invitation or Follow us:

Telegram Channel: https://t.me/helporacle

Skant Gupta’s LinkedIn: www.linkedin.com/in/skantali/

Joel Perez’s LinkedIn: Joel Perez’s Profile

LinkedIn Group: Oracle Cloud DBAAS

Facebook Page: OracleHelp

About The Author

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.