oracle中文乱码的解决方法

前端之家收集整理的这篇文章主要介绍了oracle中文乱码的解决方法前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

解决办法:
修改oracle用户的环境变量 文件。加入NLS_LANG="SIMPLIFIED CHINESE_CHINA.al32utf8"; export NLS_LANG
<div class="codetitle"><a style="CURSOR: pointer" data="96403" class="copybut" id="copybut96403" onclick="doCopy('code96403')"> 代码如下:

<div class="codebody" id="code96403">
[oracle@rhel6r4 ~]$ vi .bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH
# Oracle Settings
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
ORACLE_HOSTNAME=rhel6r4; export ORACLE_HOSTNAME
ORACLE_UNQNAME=mydb; export ORACLE_UNQNAME
ORACLE_BASE=/u01/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/11gr2/db; export ORACLE_HOME
ORACLE_SID=mydb; export ORACLE_SID
PATH=/usr/sbin:$PATH; export PATH
PATH=$ORACLE_HOME/bin:$PATH; export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH
NLS_LANG="SIMPLIFIED CHINESE_CHINA.al32utf8"; export NLS_LANG
[oracle@rhel6r4 ~]$ source .bash_profile

中文可正常显示
<div class="codetitle"><a style="CURSOR: pointer" data="88117" class="copybut" id="copybut88117" onclick="doCopy('code88117')"> 代码如下:
<div class="codebody" id="code88117">
[oracle@rhel6r4 ~]$ env|grep LANG
NLS_LANG=SIMPLIFIED CHINESE_CHINA.al32utf8
LANG=en_US.UTF-8

原文链接:https://www.f2er.com/oracle/65372.html

猜你在找的Oracle相关文章