Oracle:使用 sqlplus 设置 NLS_PARAMETERS

发布于 2024-08-02 13:44:25 字数 192 浏览 2 评论 0原文

我发现运行 Oracle 10g 的服务器在使用 sqlplus 二进制文件时没有使用相同的 NLS_SORT 值进行初始化。

有没有办法为 sqlplus 的每个实例设置默认的 NLS_SESSION_PARAMETERS ?

PS:这个想法是在每个sql脚本的开头执行ALTER SESSION。

I found out my servers, running Oracle 10g, were not initializing with the same NLS_SORT value when using the sqlplus binary.

Is there a way to set the default NLS_SESSION_PARAMETERS for every instance of sqlplus?

PS: The idea is not to do an ALTER SESSION at the beginning of every sql script.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

夏了南城 2024-08-09 13:44:25

NLS 参数由客户端应用程序指定。 Windows 上的 SQL*Plus 将在注册表中定义其参数(与其安装位置的 ORACLE_HOME 相同)。在 *nix 系统上,参数被定义为环境变量。

您可以在 文档

the NLS parameters are specified by the client application. SQL*Plus on windows will have its parameters defined in the registry (same as the ORACLE_HOME where it is installed). On *nix systems the paremeters are defined as environment variable.

You can find additionnal information in the documentation.

夏见 2024-08-09 13:44:25

使用 ON LOGON 触发器来执行 ALTER SESSION?

然后您可以在一个地方完成此操作,而不必更改每个客户。

Use an ON LOGON trigger to do the ALTER SESSION?

Then you can do it in one place and won't have have to change every client.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文