Linux环境解决Oracle 中文乱码
2011-12-01 17:55
441 查看
Linux环境解决Oracle 中文乱码1)查看数据库字符集
[oracle@oraserv ~]$ pwd
/home/oracle
[oracle@oraserv ~]$ ls -a
[oracle@oraserv ~]$ vi .bashrc
3)注销oracle用户,重新登录
注意:解决问题的原则,客户端的字符集和oracle 数据库的字符集保持一致。
本文出自 “天涯客的blog” 博客,请务必保留此出处http://tiany.blog.51cto.com/513694/730998
03:12:58 SQL> select userenv('language') from dual; USERENV('LANGUAGE') ---------------------------------------------------- AMERICAN_AMERICA.ZHS16GBK2)编辑linux 的NLS_LANG变量
[oracle@oraserv ~]$ pwd
/home/oracle
[oracle@oraserv ~]$ ls -a
. cr_dbprod.sql .gconfd .ICEauthority .rman_history .Xauthority .. cr_db.sql .gnome logmnr sel.sql .xsession-errors .bash_history cr_dict.sql .gnome2 .metacity sql.log 中国 .bash_logout Desktop .gnome2_private .mozilla sqlnet.log .bash_profile .dmrc .gstreamer-0.10 .nautilus .sqlplus_history .bashrc .eggcups .gtkrc-1.2-gnome2 ora.sh s.sh close_bak_command.sql ftp.msg hot_bak_cmd.sql ora.txt start.sh cold_bak.sql .gconf hot_bak.sql .redhat .Trash
[oracle@oraserv ~]$ vi .bashrc
# .bashrc # Source global definitions if [ -f /etc/bashrc ]; then . /etc/bashrc fi # User specific aliases and functions export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK ".bashrc" 10L, 167C written
3)注销oracle用户,重新登录
[oracle@oraserv ~]$ su - oracle [oracle@oraserv ~]$ env |grep LANG NLS_LANG=AMERICAN_AMERICA.ZHS16GBK LANG=en_US.UTF-8 [oracle@oraserv ~]$ export ORACLE_SID=prod [oracle@oraserv ~]$ env |grep LANG NLS_LANG=AMERICAN_AMERICA.ZHS16GBK LANG=en_US.UTF-8 通过sqlplus验证: [oracle@oraserv ~]$sqlplus '/as sysdba'; SQL*Plus: Release 10.2.0.1.0 - Production on Fri Apr 8 03:15:59 2011 Copyright (c) 1982, 2005, Oracle. All rights reserved. Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production With the Partitioning, OLAP and Data Mining options 03:16:02 SQL> conn scott/tiger Connected. 03:16:08 SQL> select * from tab; TNAME TABTYPE CLUSTERID ------------------------------ ------- ---------- DEPT TABLE EMP TABLE BONUS TABLE SALGRADE TABLE 03:16:16 SQL> update dept set dname='财务' where deptno=10; 1 row updated. 03:16:47 SQL> select * from dept; DEPTNO DNAME LOC ---------- -------------- ------------- 10 财务 NEW YORK 20 RESEARCH DALLAS 30 SALES CHICAGO 40 OPERATIONS BOSTON
注意:解决问题的原则,客户端的字符集和oracle 数据库的字符集保持一致。
本文出自 “天涯客的blog” 博客,请务必保留此出处http://tiany.blog.51cto.com/513694/730998
相关文章推荐
- Linux环境解决Oracle 中文乱码
- Linux环境解决Oracle 中文乱码
- 解决linux环境tomcat下载文件404的问题(路径中文乱码)
- Linux环境下的JFreeChart中文乱码问题解决办法
- [转]解决linux下sqldeveloper 中文环境显示乱码的问题
- 解决SecureCRT中文乱码解决方法--字符集设置(Linux环境)
- Oracle在中文环境下出现乱码解决办法
- oracle enterprise linux 5.5 中文乱码问题解决
- Linux环境下BufferedImage Graphics drawString 中文乱码解决方法
- linux下oracle EM中文乱码问题解决
- Linux环境下邮件主题、发件人中文乱码解决
- linux下修改oracle字符集 解决中文乱码
- Linux环境编译安装Mysql以及PHP中文乱码解决
- Linux下oracle安装界面中文乱码解决方法
- 解决Linux下Oracle 10g数据库em,dbca中文方块乱码问题
- 在Ubuntu/Linux环境下使用MySQL:解决在Linux环境下MySQL中文乱码的问题
- CenotOS6中文环境下安装Oracle 11g 中文乱码 解决办法
- 解决在Linux下安装Oracle时的中文乱码问题
- linux oracle 乱码 Linux环境Oracle显示乱码解决犯法
- 解决linux下oracle中文乱码的问题