select * from sys.props$ where name='NLS_CHARACTERSET';
select userenv('language') from dual
服务器上
[******
racle] /u01/app/oracle/product/10.2.0/network/admin> sqlplus / as sysdba
SQL*Plus: Release 10.2.0.2.0 - Production on Mon Oct 8 13:31:30 2007
Copyright (c) 1982, 2005, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - 64bit Production
With the Partitioning and Data Mining options
SQL> SELECT USERENV('LANGUAGE') "Language" FROM DUAL;
Language
----------------------------------------------------
AMERICAN_AMERICA.UTF8
SQL> show parameter nls
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
nls_calendar string
nls_comp string
nls_currency string
nls_date_format string
nls_date_language string
nls_dual_currency string
nls_iso_currency string
nls_language string AMERICAN
nls_length_semantics string BYTE
nls_nchar_conv_excp string FALSE
nls_numeric_characters string
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
nls_sort string
nls_territory string AMERICA
nls_time_format string
nls_time_tz_format string
nls_timestamp_format string
nls_timestamp_tz_format string
windows客户端:
C:\Documents and Settings\Administrator>sqlplus system/manager@*****
SQL*Plus: Release 10.2.0.1.0 - Production on 星期一 10月 8 13:28:42 2007
Copyright (c) 1982, 2005, Oracle. All rights reserved.
连接到:
Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - 64bit Production
With the Partitioning and Data Mining options
SQL> SELECT USERENV('LANGUAGE') "Language" FROM DUAL;
Language
--------------------------------------------------------------------------------
SIMPLIFIED CHINESE_CHINA.UTF8
服务器字符集select * from nls_database_parameters,其来源于props$,是表示数据库的字符集。
客户端字符集环境select * from nls_instance_parameters,其来源于v$parameter,
表示客户端的字符集的设置,可能是参数文件,环境变量或者是注册表
会话字符集环境 select * from nls_session_parameters,其来源于v$nls_parameters,表示会话自己的设置,可能是会话的环境变量或者是alter session完成,如果会话没有特殊的设置,将与nls_instance_parameters一致。
客户端的字符集要求与服务器一致,才能正确显示数据库的非Ascii字符。如果多个设置存在的时候,alter session>环境变量>注册表>参数文件
字符集要求一致,但是语言设置却可以不同,语言设置建议用英文。如字符集是zhs16gbk,则nls_lang可以是American_America.zhs16gbk。
鸡蛋里挑些骨头~
客户端字符集环境select * from nls_instance_parameters,其来源于v$parameter--应该是源自于X$parameter
还有nls_instance_parameters中好像看不到NLS_CHARACTERSET这个~
***********************************************
客户端字符集由于客户端的操作系统不同分为
1.windows
察看注册表
9i
HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\HOMExx\NLS_LANG
10g
HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\KEY_OraHomexx\NLS_LANG
2.Unix/Linux
env|grep NLS_LANG
阅读(749) | 评论(0) | 转发(0) |