English 中文(简体)
如何修复 ORA-112705: 无法访问 NLS 数据文件或指定无效环境
原标题:How to fix ORA-12705: Cannot access NLS data files or invalid environment specified
我试图连接到 oracle 数据库有错误: 查询执行失败 原因: SQL 错误 [12705]: SQL 错误 [1275]: ORA-12705: 无法访问 NLS 数据文件或指定 ORA-02063 的无效环境: 前一行 我的平台是一个显然在 Mac 上运行的 MacOs, 尝试连接到远程 Ocle 数据库 。 我如何解决这个问题?
最佳回答
If you are using SQL Developer you have to follow this steps: Open SQL Developer package content. Go to Applications, right click on SQL Developer and select "Show Package Contents". Go to Contents/Resources/sqldeveloper/sqldeveloper/bin/ Open sqldeveloper.conf using a text editor. 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 Restart SQL Developer
问题回答
If you are here and using any on the Jetbrain Products (Pycharm/IntellJ IDEA/DataGrip) Open the properties of the connection Under Advanced, add the line below in the VM Options (without any quotes) -Duser.language=en -Duser.country=US
With Maven try to add parameters: -Duser.language=en -Duser.country=US
If you re using oracle instant client for windows then remove the NSL variable from the windows environment, your issue will be resolved.
The answers suggested works just fine, but if you are running SQL Developer standalone, SQL Developer VSCode extension, Jetbrain Products (Pycharm/IntellJ IDEA/DataGrip). The value must be at the environment level. In my case: Linux add this line to this file .bash_profile or .bashrc export JAVA_TOOL_OPTIONS="-Duser.country=US -Duser.language=en -Duser.region=US" MacOS add this line to this file .zprofile export JAVA_TOOL_OPTIONS="-Duser.country=US -Duser.language=en -Duser.region=US" Windows User Environmment setx JAVA_TOOL_OPTIONS "-Duser.country=US -Duser.language=en -Duser.region=US" JAVA_TOOL_OPTIONS Windows Environment Variable




相关问题
Use tnsnames.ora in Oracle SQL Developer

I am evaluating Oracle SQL Developer. My tnsnames.ora is populated, and a tnsping to a connection defined in tnsnames.ora works fine. Still, SQL Developer does not display any connections. Oracle ...

Trying to establish a connection

I have just downloaded and extracted the Oracle SQLDeveloper in MAC OS X. Until then, when I am establishing a connection using the HR (default) as the username and password, ORCL for the SID... the ...

Oracle performance via SQLDeveloper vs application

I am trying to understand the performance of a query that I ve written in Oracle. At this time I only have access to SQLDeveloper and its execution timer. I can run SHOW PLAN but cannot use the auto ...

Oracle SQL Developer multiple table views

In Oracle SQL Developer, one can list the data in a table using the Data tab when viewing a table. there where can add, delete, edit or just viewing records of table currently viewd the problem is ...

Issues Connecting to SQLExpress using Oracle SQL Developer

I m trying to create a connection inside Oracle SQL Developer to a SQLExpress database I have Everything I have resides on the same machine so there isn t any network issues I should have to deal ...

export utf-8 data to text file with oracle sql developer

I need to export urf-8 data to a text file in form of insert statement. I ve tried Oracle SQL developer s export data tool. But it use ansi encoding to export data to txt file so utf-8 characters turn ...

Insert if not exists Oracle

I need to be able to run an Oracle query which goes to insert a number of rows, but it also checks to see if a primary key exists and if it does, then it skips that insert. Something like: INSERT ALL ...

热门标签