11g sqlplus 乱码

69 篇文章 0 订阅
5 篇文章 0 订阅

字符集乱码,如下:
C:\Users\Administrator>sqlplus "/as sysdba"

SQL*Plus: Release 11.2.0.1.0 Production on 鏄熸湡浜?7鏈?13 11:30:45 2012

Copyright (c) 1982, 2010, Oracle.  All rights reserved.


杩炴帴鍒?
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL>

SIMPLIFIED CHINESE_CHINA.AL32UTF8

检查:
SQL> select tab1.aa||'_'||tab2.bb||'.'||tab3.cc from
  2   (select VALUE$ aa from sys.props$ where name='NLS_LANGUAGE')tab1,
  3    (select VALUE$ bb from sys.props$ where name='NLS_ISO_CURRENCY')tab2,
  4  (select VALUE$ cc from sys.props$ where name='NLS_CHARACTERSET')tab3;

TAB1.AA||'_'||TAB2.BB||'.'||TAB3.CC
--------------------------------------------------------------------------------
SIMPLIFIED CHINESE_CHINA.AL32UTF8

将客户端和服务端设置一样,仍然有乱码:

C:\Users\Administrator>set NLS_LANG=SIMPLIFIED CHINESE_CHINA.AL32UTF8

C:\Users\Administrator>sqlplus "/as sysdba"

SQL*Plus: Release 11.2.0.1.0 Production on 鏄熸湡浜?7鏈?13 13:35:54 2012

Copyright (c) 1982, 2010, Oracle.  All rights reserved.


杩炴帴鍒?
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options


错误的设置,看看结果:

set NLS_LANG=CHINESE_CHINA.AL32UTF8
C:\Users\Administrator>sqlplus "/as sysdba"

SQL*Plus: Release 11.2.0.1.0 Production on Fri Jul 13 13:39:14 2012

Copyright (c) 1982, 2010, Oracle.  All rights reserved.

ERROR:
ORA-12705: Cannot access NLS data files or invalid environment specified

将客户端字符集设置的与服务端不同,如下:

C:\Users\Administrator>set NLS_LANG=SIMPLIFIED CHINESE_CHINA.ZHS16GBK

C:\Users\Administrator>sqlplus "/as sysdba"

SQL*Plus: Release 11.2.0.1.0 Production on 星期五 7月 13 14:15:55 2012

Copyright (c) 1982, 2010, Oracle.  All rights reserved.


连接到:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL>

此时发现没有了乱码,这和我以前认识的内容有出入,比较困惑。

 

 

 

 

 

 

 

 

 

 

 


 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值