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

原文地址:https://www.cnblogs.com/halberd-lee/p/12099711.html