4

I have an error trying to connect to oracle database:

Query execution failed

Reason:
SQL Error [12705] [72000]: ORA-12705: Cannot access NLS data files or invalid environment specified
ORA-02063: preceding line

My platform is a MacOs running obviously over a Mac, try to connect to remote oracle database. How can I fix this problem?

Carlitos Aquino
  • 43
  • 1
  • 1
  • 5
  • https://stackoverflow.com/questions/7700330/ora-12705-cannot-access-nls-data-files-or-invalid-environment – pvy4917 Feb 01 '19 at 17:51

4 Answers4

25

If you are using SQL Developer you have to follow this steps:

  1. Open SQL Developer package content. Go to Applications, right click on SQL Developer and select "Show Package Contents".
  2. Go to Contents/Resources/sqldeveloper/sqldeveloper/bin/
  3. Open sqldeveloper.conf using a text editor.
  4. Add the following lines:
# Options to avoid "ORA-12705: Cannot access NLS data files or invalid environment specified."
AddVMOption -Duser.language=en
AddVMOption -Duser.region=US
AddVMOption -Duser.country=en
  1. Restart SQL Developer
rubenlop88
  • 4,171
  • 2
  • 28
  • 32
8

If you are here and using any on the Jetbrain Products (Pycharm/IntellJ IDEA/DataGrip)

  1. Open the properties of the connection
  2. Under Advanced, add the line below in the VM Options (without any quotes)

-Duser.language=en -Duser.country=US

Screen shot of the settings path

John Kitonyo
  • 2,109
  • 1
  • 14
  • 17
1

With Maven try to add parameters:

-Duser.language=en -Duser.country=US
stakahop
  • 921
  • 9
  • 18
0

If you're using oracle instant client for windows then remove the NSL variable from the windows environment, your issue will be resolved.

Henry Ecker
  • 34,399
  • 18
  • 41
  • 57
Rajesh
  • 562
  • 1
  • 10
  • 26