oracle exp 乱码 942,Oracle exp/imp字符集相关问题
Exp導出的數據dmp文件中的第2,3字節表示導出數據時的OS字符集ID(NLS_LANG環境變量保存)
下圖中:
①表示目標OS的字符集
②表示目標DB的字符集
③表示目標DB的NCHAR字符集
④表示源OS的字符集
⑤表示源DB的NCHAR字符集
下圖例子中,導出時OS字符集為ZHT16MSWIN950,目標OS字符集US7ASCII,導入后出現亂碼。
將目標OS字符集①改為”AMERICAN_AMERICA.UTF8”或”TRADITIONAL CHINESE_TAIWAN.ZHT16MSWIN950”導入后正常。
此例中導出的數據文件在使用exp導出時,沒有將OS字符集設定為和DB一致(最好在exp時將OS字符集NLS_LANG設定為和DB一致),但” ZHT16MSWIN950”字符集正常解析了該DB中的所有字符,imp導入時要保證目標OS能正確解析數據文件中的所有字符,方法是設定目標OS的字符集與數據文件字符集(源OS字符集)一致,或為其超集。
-------------------------------例子------------------------------------------
[oracle@hi0-ibmsv508 u01]$ imp
Import: Release 10.2.0.1.0 - Production on Mon Apr 7 14:59:45 2008
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Username: kevin
Password:
Connected to: Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, OLAP and Data Mining options
Import file: expdat.dmp > CCIGPM.DMP
Enter insert buffer size (minimum is 8192) 30720>
Export file created by EXPORT:V10.01.00 via conventional path
Warning: the objects were exported by CCIGPM, not by you
import done in ①US7ASCIIcharacter set and③AL16UTF16NCHAR character set
import server uses ②AL32UTF8character set (possible charset conversion)
export client uses ④ZHT16MSWIN950character set (possible charset conversion)
export server uses ⑤UTF8NCHAR character set (possible ncharset conversion)
List contents of import file only (yes/no): no >
Ignore create error due to object existence (yes/no): no >
Import grants (yes/no): yes >
Import table data (yes/no): yes >------------------------------------------------------------------------------------------------------------
總結
以上是生活随笔為你收集整理的oracle exp 乱码 942,Oracle exp/imp字符集相关问题的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: dederss.php美国与,Dede经
- 下一篇: 特异度什么意思