AIX下 oracle用户显示中文乱码,如何设置用户环境变量,修改

在aix机器上面安装了oracle 11g R2 后,ORACL用户访问时出现乱码


aix版本


使用oracle用户出现


oradb2@oracle-orcl12$ocrcheck


Oracle 闆嗙兢娉ㄥ唽琛ㄧ殑鐘舵€佸涓




                                             鐗堟湰                  :          3
         鎬荤┖闂(KB)     :     262120
         宸茬敤绌洪棿 (KB)      :       3104
         鍙敤绌洪棿 (KB):     259016
         ID                       : 1666967738
         璁惧/鏂囦欢鍚        :      +DATA
                                    璁惧/鏂囦欢瀹屾暣鎬ф鏌ユ垚鍔




                                    璁惧/鏂囦欢灏氭湭閰嶇疆




                                    璁惧/鏂囦欢灏氭湭閰嶇疆




                                    璁惧/鏂囦欢灏氭湭閰嶇疆




                                    璁惧/鏂囦欢灏氭湭閰嶇疆




         闆嗙兢娉ㄥ唽琛ㄥ畬鏁存€ф鏌ユ垚鍔




         鐢变簬鐢ㄦ埛鏈粡鎺堟潈, 鍥犳蹇界暐閫昏緫鎹熷潖妫€鏌


1 如何看到已安装的字符集:
   locale -a
oradb2@oracle-orcl12$locale -a
C
POSIX
en_US.8859-15
en_US.IBM-858
en_US.ISO8859-1
en_US
2 查看当前的语言环境:
  env |grep LANG
oradb2@oracle-orcl12$env |grep LANG
LANG=en_US
NLS_LANG=SIMPLIFIED CHINESE_CHINA.AL32UTF8
3 如果想修改英文环境为中文:
vi /etc/environment 里的LANG=en_US 改为 ZH_CH (具体跟应用要求,oracle用户默认语言包SIMPLIFIED CHINESE_CHINA.AL32UTF8)
oradb2@oracle-orcl12$cat /etc/environment 
# @(#)18      1.26.1.2  src/bos/etc/environment/environment, cmdsh, bos72D, d2015_31A2 7/9/15 02:10:08
# IBM_PROLOG_BEGIN_TAG 
# This is an automatically generated prolog. 
#  
# bos72D src/bos/etc/environment/environment 1.26.1.2 
#  
# Licensed Materials - Property of IBM 
#  
# COPYRIGHT International Business Machines Corp. 1989,1994 
# All Rights Reserved 
#  
# US Government Users Restricted Rights - Use, duplication or 
# disclosure restricted by GSA ADP Schedule Contract with IBM Corp. 
#  
# IBM_PROLOG_END_TAG 
#
# COMPONENT_NAME: (CMDSH) Shell related commands 
#
# ORIGINS: 27
#
# (C) COPYRIGHT International Business Machines Corp. 1989, 1994
# All Rights Reserved
# Licensed Materials - Property of IBM
#
# US Government Users Restricted Rights - Use, duplication or
# disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
#
################################################################
# System wide environment file.  This file should only contain
#     1.  comment lines which have a # in the first column,
#     2.  blank lines, and
#     3.  Lines in the form name=value.
#
# WARNING: This file is only for establishing environment variables.
#          Execution of commands from this file or any lines other
#          than specified above may cause failure of the initialization 
#          process.
#
# Searching the current directory last is usually a BIG time saver.
# If /usr/ucb is at the beginning of the PATH the BSD version of commands will
# be found. 
#
PATH=/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin:/usr/java7_64/jre/bin:/usr/java7_64/bin
TZ=Asia/Shanghai
LANG=en_US
LOCPATH=/usr/lib/nls/loc
NLSPATH=/usr/lib/nls/msg/%L/%N:/usr/lib/nls/msg/%L/%N.cat:/usr/lib/nls/msg/%l.%c/%N:/usr/lib/nls/msg/%l.%c/%N.cat
LC__FASTMSG=true




# ODM routines use ODMDIR to determine which objects to operate on
# the default is /etc/objrepos - this is where the device objects
# reside, which are required for hardware configuration




ODMDIR=/etc/objrepos
CLUSTER_OVERRIDE=yes
oradb2@oracle-orcl12$
4、查看
oradb2@oracle-orcl12$cat .profile
PATH=/usr/bin:/etc:/usr/sbin:/usr/ucb:$HOME/bin:/usr/bin/X11:/sbin:.
export PATH
if [ -s "$MAIL" ]           # This is at Shell startup.  In normal
then echo "$MAILMSG"        # operation, the Shell checks
fi                          # periodically.
umask 022
export ORACLE_BASE=/oracle/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1
export ORACLE_SID=orcl12
export ORACLE_UNQNAME=orcl1
export NLS_DATE_FORMAT="yyyy-mm-dd hh24:mi:ss"
export NLS_LANG="SIMPLIFIED CHINESE_CHINA.AL32UTF8"
export ORA_NLS10=/oracle/app/11.2.0/grid/nls/data
export PATH=.:${PATH}:$HOME/bin:$ORACLE_HOME/bin:/home/oracle/OPatch
export PATH=${PATH}:/usr/bin:/bin:/usr/bin/X11:/usr/local/bin
export PATH=${PATH}:$ORACLE_BASE/common/oracle/bin:/home/oracle/scripts:/oracle/app/11.2.0/grid/bin
export ORACLE_PATH=${PATH}:$ORACLE_BASE/common/oracle/sql:.:$ORACLE_HOME/rdbms/admin
export TNS_ADMIN=$ORACLE_HOME/network/admin
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$ORACLE_HOME/oracm/lib
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/lib:/usr/lib:/usr/local/lib
export CLASSPATH=$ORACLE_HOME/JRE
export CLASSPATH=${CLASSPATH}:$ORACLE_HOME/jlib
export CLASSPATH=${CLASSPATH}:$ORACLE_HOME/rdbms/jlib
export CLASSPATH=${CLASSPATH}:$ORACLE_HOME/network/jlib
export THREADS_FLAG=native
export TEMP=/tmp
export TMPDIR=/tmp
set -o vi
#. /oracle/arch01/tools/bin/.rp4_profile
export PS1=`hostname`"@"`whoami`"-"'${ORACLE_SID}'"$"
 




评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值