oracle oracle中如何修改NLS_LANGUAGE等参数
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/23129204/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
how to change the NLS_LANGUAGE and other parameters in oracle
提问by Muhammad
i have NLS_LANGUAGE American, I want to change to ITALIAN, The database is oracle 11g.
我有NLS_LANGUAGE美式,我想改成意大利语,数据库是oracle 11g。
I am trying the following
我正在尝试以下
ALTER DATABASE CHARACTER SET ITALIAN
but this gives error.
但这会导致错误。
回答by Wernfried Domscheit
I don't think you like to modify the NLS_LANGUAGE of the entire database, just on your local session.
我不认为你喜欢修改整个数据库的 NLS_LANGUAGE,只是在你的本地会话中。
Run ALTER SESSION SET NLS_LANGUAGE="ITALIAN";
跑 ALTER SESSION SET NLS_LANGUAGE="ITALIAN";
Do you like to modify the NLS_LANGUAGE or the CHARACTER Set? These are two completely different things.
你喜欢修改 NLS_LANGUAGE 还是 CHARACTER 集?这是完全不同的两件事。
回答by nightfox79
The default value of NLS_LANGUAGE may be operating system-specific. You can alter the NLS_LANGUAGE parameter by changing the value in the initialization file and then restarting the instance. This setting is in the init.ora or spfile.ora.
NLS_LANGUAGE 的默认值可能是特定于操作系统的。您可以通过更改初始化文件中的值然后重新启动实例来更改 NLS_LANGUAGE 参数。这个设置在 init.ora 或 spfile.ora 中。
If you just want to change your session info for example to change the date format, but without changing server messages you can use alter session as follows:
如果您只想更改会话信息,例如更改日期格式,但不更改服务器消息,您可以使用如下更改会话:
SQL> ALTER SESSION SET NLS_LANGUAGE=Italian;
SQL> SELECT ename, hiredate, ROUND(sal/12,2) sal FROM emp;
ENAME HIREDATE SAL
----- -------- ---
Clark 09-Dic-88 4195.83
Miller 23-Mar-87 4366.67
Strau? 01-Apr-95 3795.87
SQL> ALTER SESSION SET NLS_LANGUAGE=German;
SQL> SELECT ename, hiredate, ROUND(sal/12,2) sal FROM emp;
ENAME HIREDATE SAL
----- -------- ---
Clark 09-DEZ-88 4195.83
Miller 23-M?R-87 4366.67
Strau? 01-APR-95 3795.87