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

The other day I got this annoying oracle error: ORA-12705: Cannot access NLS data files or invalid environment specified. Funny thing I wasn't trying to access NLS data files


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.

Fix:

Unset the NLS_LANG environment variable

Windows - The NLS_LANG must be unset in the Windows registry (re-named is best). 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"


I have Oracle 10g XE and Windows 7. I resolved this as follows:

Go to Control panel > Regional and language options > Format and set your language.


Follow this procedure to set the NLS_LANG environment variable for Oracle databases. To set the NLS_LANG environment variable for Oracle databases Determine the NLS_LANG value. In the data warehouse database, run the command SELECT * FROM V$NLS_PARAMETERS

Make a note of the NLS_LANG value, which is in the format [NLS_LANGUAGE]_[NLS_TERRITORY].[NLS_CHARACTERSET]. For example: American_America.UTF8 For Windows: Navigate to Control Panel > System and click the Advanced tab. Click Environment Variables. In System variables section, click New. In the Variable Name field, enter NLS_LANG. In the Variable Value field, enter the NLS_LANG value that was returned in Step 1. The format for the NLS_LANG value should be [NLS_LANGUAGE]_[NLS_TERRITORY].[NLS_CHARACTERSET]. For example: American_America.UTF8. For UNIX, set the variable as shown below: setenv NLS_LANG

For example: setenv NLS_LANG American_America.UTF8. If your data is 7-bit or 8-bit ASCII and the Informatica Server is running on UNIX, then set NLS_LANG _.WE8ISO8859P1 CAUTION: Make sure you set the NLS_LANG variable correctly, as stated in this procedure, or your data will not display correctly.

Reboot the machine after creating the variable.


In my case, I was creating a database adapter in the oracle weblogic console, solve the problem by doing the following configuration. Windows -> control panel -> region: 1. Change the format to English (United States) date format M / d / yy and 2. Change my address to the United States. Perform this configuration because my machine was configured with the Spanish language, then restart the computer and I worked without problems.