Change Client Session Language In SQL Plus

Recently I encountered an issue when running SQL in SQL plus client: it cannot return results in SQL Plus while in SQL Developer it works fine using the same SQL statement.

After checking the Oracle’s National Language Support (NLS) in SQL Developer and SQL Plus, I found that they have different client session language.

To check the language:

SELECT USERENV ('language'FROM DUAL;

In SQL Developer, we can also check the language by clicking Tools → Preference → Database → NLS → Language.


Below are the test results:

  • In SQL developer:

    •  
  • In SQL plus:

 

The inconsistency of the query results using the 2 tools is due to we have set the language as "AMERICAN" in SQL Developer but don't have that setup for SQL Plus via the registry and Oracle Home Client settings.

To change the client session language:

SQL> ALTER SESSION SET NLS_LANGUAGE=AMERICAN;

Session altered.

After the language is changed, it gives the same results in SQL Plus and SQL developer in our case.

 

 

Ref:

https://community.oracle.com/thread/2428916

https://cinhtau.net/2016/11/15/change-client-session-language-in-sqlplus/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值