首先用env查看环境变量,发现关于nls-lang的设置为:
NLS_LANG=AMERICAN_AMERICA.ZHS16GBK;
查看props$表:
NLS_LANGUAGE
AMERICAN
NLS_TERRITORY
AMERICA
NLS_CHARACTERSET
ZHS16GBK
于是,直接使用imp导入数据,提示如下:
Import: Release 8.1.6.1.0 - Production on Tue Jun 15 22:39:19 2004
(c) Copyright 1999 Oracle Corporation.All rights reserved.
Connected to: Oracle8i Release 8.1.6.1.0 - Production
JServer Release 8.1.6.0.0 - Production
Export file created by EXPORT:V08.01.06 via conventional path
import done in US7ASCII character set and US7ASCII NCHAR character set
import server uses ZHS16GBK character set (possible charset conversion)
. importing GREATEST's objects into GREATEST
. . importing table
"CITY" 35 rows imported
Import terminated successfully without warnings.
数据导入,但是中文乱码,
于是修改客户端:
export NLS_LANG=AMERICAN_AMERICA.us7ascii
然后imp数据,包错:
Connected to: Oracle8i Release 8.1.6.1.0 - Production
JServer Release 8.1.6.0.0 - Production
IMP-00016: required character set conversion (type 1 to 852) not supported
IMP-00000: Import terminated unsuccessfully
请问是怎么回事啊??
看下面提示:
import done in US7ASCII character set and US7ASCII NCHAR character set
import server uses ZHS16GBK character set (possible charset conversion)
存在US7ASCII到ZHS16GBK的转换,但我记得我曾经这样转过,没有问题的,你把客户端的字符集更改为Simplified Chinese_China.ZHS16GBK再试试吧。