[转]oracle导入数据失败 ORA-12899: value too long

原文出自:http://acooly.iteye.com/blog/1182303

ORA-12899: value too long for column 原因是因为数据库的字符集编码不对。默认为AL32UTF8. 修改为ZHS16GBK。

修改数据库默认字符集为中文字符集(ZHS16GBK)

查询当前字符集:

# select userenv('language') from dual;    
USERENV('LANGUAGE')    
----------------------------------------------------    
SIMPLIFIED CHINESE_CHINA.AL32UTF8

修改默认字符集:

Sql代码

# sqlplus / as sysdba   
# shutdown  immediate     
# startup  mount     
# alter  system  enable  restricted  session  ;     
# alter  system  set  JOB_QUEUE_PROCESSES=0;     
# alter  system  set  AQ_TM_PROCESSES=0;     
# alter  database  open  ;     
# alter  database  character  set  internal_use  ZHS16GBK;     
# shutdown  immediate     
# startup

查询结果:

# select userenv('language') from dual;    
USERENV('LANGUAGE')    
----------------------------------------------------    
SIMPLIFIED CHINESE_CHINA.ZHS16GBK

 

One thought on “[转]oracle导入数据失败 ORA-12899: value too long”

Leave a Reply

电子邮件地址不会被公开。 必填项已用*标注

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>