在使用exp工具进行导出导入操作时,非常重要的是客户端的字符集设置,也就是客户端的 NLS_LANG 设置
NLS_LANG 的参数由以下几个部分组成:
NLS_LANG = _.
Language :指定oracle使用的语言,日期中月份和日常显示
Territory:指定货币和数字格式,地区和计算星期、日期的习惯
Characterset:控制客户端应用程序的字符集,这个字符集用于对数据库传输过来的数据进行解码
C:\>set NLS_LANG=SIMPLIFIED CHINESE_CHINA.ZHS16GBK
C:\>sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on 星期四 7月 26 15:19:35 2012
Copyright (c) 1982, 2005, Oracle. All rights reserved.
连接到:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> select sysdate from dual;
SYSDATE
--------------
26-7月 -12
SQL>
C:\>set NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
C:\>sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Thu Jul 26 15:20:39 2012
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
SQL> select sysdate from dual;
SYSDATE
------------
26-JUL-12
SQL>
查看数据库端使用的字符集
SQL> select * from nls_database_parameters where parameter='NLS_CHARACTERSET' ;
PARAMETER VALUE
------------------------------ -----------------
NLS_CHARACTERSET ZHS16GBK
客户端设置的 NLS_LANG可以从如下获取
1:windows平台 : 直接在 “运行” 中输入 regedit ,然后直接 control + f 搜索 NLS_LANG 即可
2:unix/linux平台 : 在命令行输入 env |grep NLS
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/24862808/viewspace-740527/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/24862808/viewspace-740527/