Site icon IT Tutorial

ORA-12705: Cannot access NLS data files or invalid environment specified

I got ” ORA-12705: Cannot access NLS data files or invalid environment specified”  error in Oracle database.

 

ORA-12705: Cannot access NLS data files or invalid environment specified

 

Details of error are as follows.

ORA-12705: "invalid or unknown NLS parameter value specified"

Cause: There are two possible causes:

- An attempt was made to issue an ALTER SESSION statement with an invalid NLS parameter or value.

- The NLS_LANG environment variable contains an invalid language, territory, or character set.

Action: Check the syntax of the ALTER SESSION command and the NLS parameter, correct the 
syntax and retry the statement, or specify correct values in the NLS_LANG environment variable.




 

 

invalid or unknown NLS parameter value specified

This ORA-12705 errors are related with two possible causes:

– An attempt was made to issue an ALTER SESSION statement with an invalid NLS parameter or value.

– The NLS_LANG environment variable contains an invalid language, territory, or character set.

Action: Check the syntax of the ALTER SESSION command and the NLS parameter, correct the syntax and retry the statement, or specify correct values in the NLS_LANG environment variable.

 

Firstly Unset the NLS_LANG environment variable,

Windows – The NLS_LANG must be unset in the Windows registry. Look for the NLS_LANG subkey in the registry at \HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE and rename it.

Linux/UNIX – Here you simply issue the Linux command “unset NLS_LANG”

 

You can set it as follows.

[MSDB]/home/oracle $ export NLS_LANG=AMERICAN_AMERICA.WE8ISO8859P9
[MSDB]/home/oracle $ 
[MSDB]/home/oracle $ echo $NLS_LANG
AMERICAN_AMERICA.WE8ISO8859P9

 

And you can set the nls_date_language parameter as follows. ( you can set the value according to your language )

SQL> alter session set nls_date_language = 'AMERICAN';

Session altered.

SQL> show parameter NLS_DATE_LANGUAGE

NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
nls_date_language string AMERICAN
SQL>

 

 

 

 

Do you want to learn Oracle Database for Beginners, then read the following articles.

Oracle Tutorial | Oracle Database Tutorials for Beginners ( Junior Oracle DBA )

 

Exit mobile version