ORACLE匯入匯出後發生中文亂碼的原因及解決辦法

來源:互聯網
上載者:User

從資料庫伺服器上使用exp匯出時顯示如下:

[oracle@kf15-1]:/users/oracle>$ exp username/passwd@kf15-1/i1000 tables=table_name file=table_name_unix.dmp satistics=none buffer=1000000 Export: Release 10.2.0.4.0 - Production on 星期四 8月 26 16:37:08 2010 Copyright (c) 1982, 2007, Oracle. All rights reserved. 串連到: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production With the Partitioning, OLAP, Data Mining and Real Application Testing options 已匯出 ZHS16CGB231280 字元集和 AL16UTF16 NCHAR 字元集 即將匯出指定的表通過常規路徑... . . 正在匯出表 TABLE_NAME匯出了 11174 行 成功終止匯出, 沒有出現警告。

 

=================================================================

 

 從資料庫用戶端上使用exp匯出時顯示如下:

C:/Documents and Settings/user>exp username/passwd@kf15-1/i1000 tables=table_name file=table_name_win.dmp statistics=none buffer=1000000 Export: Release 10.2.0.1.0 - Production on 星期四 8月 26 16:40:31 2010 Copyright (c) 1982, 2005, Oracle. All rights reserved. 串連到: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production With the Partitioning, OLAP, Data Mining and Real Application Testing options 已匯出 ZHS16GBK 字元集和 AL16UTF16 NCHAR 字元集 伺服器使用 ZHS16CGB231280 字元集 (可能的字元集轉換) 即將匯出指定的表通過常規路徑... . . 正在匯出表 TABLE_NAME匯出了 11174 行 成功終止匯出, 沒有出現警告。

 

=================================================================

 

 其中有一段“可能的字元集轉換”,原因在於資料庫軟體安裝時使用預設字元集ZHS16GBK,而伺服器端在建庫的時候將字元集改成了非預設的ZHS16CGB231280,用戶端沒有艱苦的步驟,所以仍使用ZHS16GBK。

在Windows下修改oracle使用字元集 的方法為:

開啟註冊表;選擇HKEY_LOCAL_MACHINE —> ORACLE —> KEY_OraClient10g_home1中的NLS_LANG,將其索引值“SIMPLIFIED CHINESE_CHINA.ZHS16GBK”改為“SIMPLIFIED CHINESE_CHINA.ZHS16CGB231280”。

 

=================================================================

 

修改過用戶端字元集以後,從資料庫用戶端上使用exp匯出時顯示如下:

C:/Documents and Settings/user>exp username/passwd@kf15-1/i1000 tables=table_name file=table_name_win.dmp statistics=none buffer=1000000 Export: Release 10.2.0.1.0 - Production on 星期四 8月 26 17:15:15 2010 Copyright (c) 1982, 2005, Oracle. All rights reserved. 串連到: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production With the Partitioning, OLAP, Data Mining and Real Application Testing options 已匯出 ZHS16CGB231280 字元集和 AL16UTF16 NCHAR 字元集 即將匯出指定的表通過常規路徑... . . 正在匯出表 TABLE_NAME匯出了 11174 行 成功終止匯出, 沒有出現警告。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.