各位,我这有个goldengate 使用时乱码的问题,请大家帮忙看下。
1.环境:win2003 + oracle11g+ goldengate
2. A,B 两台物理机,操作系统,oracle数据库软件及goldengate完全相同。A中抽取的队列文件,B库通过复制进程到B库内。
3.源端及目标端数据库的字符集如下图。
select * from nls_database_parameters;
1 NLS_LANGUAGE AMERICAN
2 NLS_TERRITORY AMERICA
3 NLS_CURRENCY $
4 NLS_ISO_CURRENCY AMERICA
5 NLS_NUMERIC_CHARACTERS .,
6 NLS_CHARACTERSET ZHS16GBK
7 NLS_CALENDAR GREGORIAN
8 NLS_DATE_FORMAT DD-MON-RR
9 NLS_DATE_LANGUAGE AMERICAN
10 NLS_SORT BINARY
11 NLS_TIME_FORMAT HH.MI.SSXFF AM
12 NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM
13 NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZR
14 NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZR
15 NLS_DUAL_CURRENCY $
16 NLS_COMP BINARY
17 NLS_LENGTH_SEMANTICS BYTE
18 NLS_NCHAR_CONV_EXCP FALSE
19 NLS_NCHAR_CHARACTERSET AL16UTF16
20 NLS_RDBMS_VERSION 11.2.0.1.0
在抽取端以及复制端 参数配置中,即使添加指定了字符集。仍然出现汉字乱码
抽取端
extract extl
setenv (NLS_LANG = AMERICAN_AMERICA.ZHS16GBK)
userid oggs, password aaaaaa
EXTTRAIL ./dirdat/ra
dynamicresolution
gettruncates
table oggs.*;
复制端
replicat repl
userid oggt, password aaaaaa
setenv (NLS_LANG = AMERICAN_AMERICA.ZHS16GBK)
assumetargetdefs
reperror default, discard
discardfile ./dirrpt/repl.dsc, append, megabytes 100
gettruncates
map oggs.test01, target oggt.test01;
复制进程提示如下警告:
2014-05-06 15:27:38 INFO OGG-03501 WARNING: NLS_LANG environment variable is invalid or not set. Using operating system character set value of US7ASCII.setenv (NLS_LANG = AMERICAN_AMERICA.US7ASCII)
Set environment variable (NLS_LANG=AMERICAN_AMERICA.US7ASCII)
assumetargetdefs
|
|