ALLSTARS_ORACLE 发表于 2013-11-6 22:27:39

goldengate 中文字节数问题

goldengate 中文字节数问题


错误信息:2011-01-19 22:58:30  WARNING OGG-00869  OCI Error ORA-12899: value too large for column "SAPR3"."ADRC"."MC_STREET" (actual: 86, maximum: 75) (status = 12899), SQL <INSERT INTO "SAPR3"."ADRC" ("CLIENT","ADDRNUMBER","DATE_FROM","NATION","DATE_TO","TITLE","NAME1","NA
ME2","NAME3","NAME4","NAME_TEXT","NAME_CO","CITY1","CITY2","CITY_CODE","CITYP_CODE","HOME_CITY","CIT>.
2011-01-19 22:58:30  WARNING OGG-01004  Aborted grouped transaction on 'SAPR3.ADRC', Database error 12899 (ORA-12899: value too large for column "SAPR3"."ADRC"."MC_STREET" (actual: 86, maximum: 75)).
2011-01-19 22:58:30  WARNING OGG-01003  Repositioning to rba 15479755 in seqno 11.
2011-01-19 22:58:30  WARNING OGG-01154  SQL error 12899 mapping SAPR3.ADRC to SAPR3.ADRC OCI Error ORA-12899: value too large for column "SAPR3"."ADRC"."MC_STREET" (actual: 86, maximum: 75) (status = 12899), SQL <INSERT INTO "SAPR3"."ADRC" ("CLIENT","ADDRNUMBER","DATE_FROM","NATION","DATE_TO","TITLE","NAME1","NAME2","NAME3","NAME4","NAME_TEXT","NAME_CO","CITY1","CITY2","CITY_CODE","CITYP_CODE","HOME_CITY","CIT>.
2011-01-19 22:58:30  WARNING OGG-01003  Repositioning to rba 15479755 in seqno 11.
原因:中文字符问题,源端每个中文字符占2个字节,目标端每个占3个字节,
处理方法:SR 3-2456706611
首先确认参数文件中的NLS_LANG和数据库设置一致。
1 确认两个数据库的字符语义相同
参考SQL:
SQL> show parameter nls
NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
nls_language                         string      AMERICAN
nls_length_semantics                 string      BYTE
nls_territory                        string      AMERICA

2 确认两端源和目标表的结构相同
参考SQL:
Select dbms_metadata.get_ddl('TABLE','#MyTable','My Owner') from dual;

3 确认两端源和目标表的出错列的字符语义相同。
参考SQL:
select CHAR_USED,CHAR_LENGTH from dba_tab_columns where owner='WHETC' and table_name='CBS_RUNNINGNUMBER_NOBU' and column_name in ('CPSBBZ', 'XCFX');
4确认操作系统环境变量
确保两端操作系统级别,语言环境变量一致,包括:LANG,NLS_LANG等
页: [1]
查看完整版本: goldengate 中文字节数问题