SQL> select userenv('language') from dual;
USERENV('LANGUAGE')
--------------------------------------------------------------------------------
AMERICAN_AMERICA.AL32UTF8
select name,value$from props$ where name='NLS_CHARACTERSET';
SQL> select name,value$from props$ where name=‘NLS_CHARACTERSET’;
NAME value$
NLS_CHARACTERSET ZHS16GBK
SQL> select * from sys.props$;
NAME value$
DICT.BASE 2
DBTIMEZONE 0:000
NLS_LANGUAGE AMERICAN
NLS_TERRITORY AMERICA
NLS_CURRENCY $
NLS_ISO_CURRENCY AMERICA
NLS_NUMERIC_CHARACTERS .,
NLS_CHARACTERSET ZHS16GBK
NLS_CALENDAR GREGORIAN
NLS_DATE_FORMAT DD-MON-RR
NLS_DATE_LANGUAGE AMERICAN
NLS_SORT BINARY
NLS_TIME_FORMAT HH.MI. SSXFF AM
NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFFAM
NLS_TIME_TZ_FORMAT HH.MI.
SSXFF AM TZH:TZM
NLS_TIMESTAMP_TZ_FORMAT DD-MON- RR HH.MI.SSXFF AM TZH:TZM
NLS_DUAL_CURRENCY $
NLS_COMP BINARY
NLS_NCHAR_CHARACTERSET ZHS16GBK
NLS_RDBMS_VERSION 8.1.6.0.0
NAME value$
GLOBAL_DB_NAME SCPDB1
EXPORT_VIEWS_VERSION 8
22 rows selected
SQL>
从结果可以看出:
NLS_LANG = AMERICAN _ AMERICA. ZHS16GBK
#NLS_LANG=SIMPLIFIEDChinese_CHINA.ZHS16GBK
#export NLS_LANG
NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
#NLS_LANG=AMERICAN_AMERICA.AL32UTF8
export NLS_LANG
ORACLE_BASE=/home/oracle/oracle
ORACLE_HOME=$ORACLE_BASE/product/11.1.0/db_1
ORACLE_SID=mdsp
PATH=$ORACLE_HOME/bin:$PATH
export ORACLE_BASEORACLE_HOME ORACLE_SID PATH
DISPLAY=10.40.71.33:0.0
export DISPLAY
xhost +
oracle@mdsps1:~>echo $LANG
zh_CN
oracle@mdsps1:~>echo $NLS_LANG
AMERICAN_AMERICA.ZHS16GBK
oracle@mdsps1:~>
oracle@mdsps1:~>cat .profile
# Sample .profilefor SuSE Linux
# rewritten byChristian Steinruecken <cstein@suse.de>
#
# This file is readeach time a login shell is started.
# All otherinteractive shells will only read .bashrc; this is particularly
# important forlanguage settings, see below.
test -z"$PROFILEREAD" && . /etc/profile
# Most applicationssupport several languages for their output.
# To make use ofthis feature, simply uncomment one of the lines below or
# add your own one(see /usr/share/locale/locale.alias for more codes)
#
#exportLANG=de_DE.UTF-8 # uncomment thisline for German output
#exportLANG=fr_FR.UTF-8 # uncomment thisline for French output
#exportLANG=es_ES.UTF-8 # uncomment thisline for Spanish output
# Some people don'tlike fortune. If you uncomment the following lines,
# you will have afortune each time you log in ;-)
#if [ -x/usr/bin/fortune ] ; then
# echo
# /usr/bin/fortune
# echo
#fi
#NLS_LANG=SIMPLIFIEDChinese_CHINA.ZHS16GBK
#export NLS_LANG
NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
#NLS_LANG=AMERICAN_AMERICA.AL32UTF8
export NLS_LANG
ORACLE_BASE=/home/oracle/oracle
ORACLE_HOME=$ORACLE_BASE/product/11.1.0/db_1
ORACLE_SID=mdsp
PATH=$ORACLE_HOME/bin:$PATH
export ORACLE_BASEORACLE_HOME ORACLE_SID PATH
DISPLAY=10.40.71.33:0.0
export DISPLAY
xhost +
oracle@mdsps1:~>
-----设置调试过程。
select name,value$from props$ where name='NLS_CHARACTERSET';
select * from sys.props$ WHERE NAME='NLS_LANGUAGE';
select * from nls_database_parameters
select * from nls_instance_parameters,
NLS_LANG=SIMPLIFIEDChinese_CHINA.ZHS16GBK
NLS_LANG = AMERICAN_ AMERICA. ZHS16GBK
export NLS_LANG
AMERICAN_AMERICA.AL32UTF8