如何检查客户端的 NLS_LANG?

How do I check the NLS_LANG of the client?(如何检查客户端的 NLS_LANG?)
本文介绍了如何检查客户端的 NLS_LANG?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 Windows 操作系统,我知道此设置存储在注册表中.问题是注册表路径随着版本的不同而变化,浏览那一堆注册表项绝对不是一个好主意.

I'm working on Windows OS, I know that this setting is stored in the registry. The problem is that the registry path changes from version to version, browsing though that bunch of registry keys is definitly not a good idea.

我可以通过 SELECT USERENV ('language') FROM DUAL 获取服务器的 NLS_LANG.

I can get the NLS_LANG of the server with SELECT USERENV ('language') FROM DUAL.

我想将它与客户端设置进行比较,并在它们不匹配时显示警告,就像 Pl/Sql Developer 一样.

I'd like to compare that with the client setting and show a warning when they don't match, just like Pl/Sql Developer does.

推荐答案

根据 Jocke 的回答(感谢 Jocke),我测试了以下查询:

According to Jocke's answer (thanks Jocke), I tested the following query:

SELECT DISTINCT client_charset FROM v$session_connect_info
WHERE sid = sys_context('USERENV','SID');

它完美地完成了这项工作,但我不确定是否有任何用户将拥有必要的权限.

It perfectly does the job, but I'm unsure if any user will have the necessary rights.

这篇关于如何检查客户端的 NLS_LANG?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

SQL to Generate Periodic Snapshots from Transactions Table(用于从事务表生成定期快照的SQL)
MyBatis support for multiple databases(MyBatis支持多个数据库)
Oracle 12c SQL: Missing column Headers in result(Oracle 12c SQL:结果中缺少列标题)
SQL query to find the number of customers who shopped for 3 consecutive days in month of January 2020(查询2020年1月连续购物3天的客户数量)
How to get top 10 data weekly (This week, Previous week, Last month, 2 months ago, 3 month ago)(如何每周获取前十大数据(本周、前一周、上个月、2个月前、3个月前))
Select the latest record for an Id per day - Oracle pl sql(选择每天ID的最新记录-Oracle pl SQL)