Hi guys.
I am using goldengate to replicate transactions from a DB2 LUW database to a SQLServer 2014 database.
My goal is to use a Replicat file that will call a stored procedure at the target database to do some transformations that can not be done in the replicat process.
The process is all set and almost working perfectly. The only problem is related to an implicit conversion of character set .
Bellow is my replicat process:
REPLICAT REPPER
TARGETDB PMDSN, USERID userid, PASSWORD password
--HANDLECOLLISIONS
--SOURCEDEFS ./dirdef/source.def
DISCARDFILE ./dirrpt/REPPER.DSC, PURGE
ALLOWDUPTARGETMAP
--REPLACEBADCHAR SPACE
MAP ADMIN.SOURCE_TABLE, TARGET DBO.TARGET_TABLE, &
SQLEXEC(
SPNAME DBO.PersonNameSP
,PARAMS(ID =CLIENT_NUMBER,NAME = NAME)), &
COLMAP(
ID = CLIENT_NUMBER,
TypeOfDML = @GETENV('GGHEADER','OPTYPE'),
StatementData = NAME
);
The problem is the "NAME" field.
On the TARGET_TABLE it is inserted normaly as it is on SOURCE_TABLE.
But on the Stored Procedure side, the string, lets assume it is "Andre Ramos", is inserted as a chinese character.
The process states " OGG-03010 Performing implicit conversion of column data from character set UTF-8 to windows-1252"
On the source table, the column is a CHAR(30) column. Value-> "Andre Ramos"
The SP parameter is received as a NVARCHAR(MAX) Value-> chinese character
The target SP column is a NVARCHAR(MAX) Value-> chinese character
The target column of TARGET_TABLE, the colmap table, is NVARCHAR(MAX). Value-> "Andre Ramos"
Can someone please help telling how I can avoid the implicit conversion and/or how to get the correct value at the Stored procedure?
Thanks in advance
Best regards,
Andre