ORA-29275: partial multibyte character


ORA-29275: partial multibyte character

1 錯誤信息

.........
.. exporting table                      user         20 rows exported
......
EXP-00056: ORACLE ERROR 29275 encountered
ORA-29275: partial multibyte character
EXP-00000: Export terminated unsuccessfully

2 原因

查看一下Oracle本身的提示信息:

[oracle@halberd ~]$ oerr ora 29275
29275, 00000, "partial multibyte character"
// *Cause:  The requested read operation could not complete because a partial
//          multibyte character was found at the end of the input.
// *Action: Ensure that the complete multibyte character is sent from the
//          remote server and retry the operation. Or read the partial
//          multibyte character as RAW.

從提示上來看,看到是multibyte character 引起的,說明與字符集相關。那么可以想象一下,exp 命令是操作系統命令, 從數據庫中導出數據,那么數據庫中的字符集變量應與操作系統環境變量所對應的字符集是一致的。

控制操作系統字符集與Oracle數據庫字符集的是環境變量NLS_LANG。

3 解決方法

  • 查看操作系統用戶字符集

    SQL> select userenv('language') from dual;
    
    USERENV('LANGUAGE')
    ----------------------------------------------------
    AMERICAN_AMERICA.ZHS16GBK
    
  • 設置操作系統環境變量

    export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK
    

環境變量設置后,再次操作,已正常。

Author: halberd.lee

Created: 2019-12-25 Wed 23:39

Validate


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM