cancel
Showing results for 
Search instead for 
Did you mean: 

Charset issue during mobilink synchronization process

Former Member
0 Kudos

In my application, when mobilink synchronize data between consolidate database and remote database, there is an error message as below:

I. 2018-11-02 09:57:16. <2> COMMIT Transaction: Prepare for download E. 2018-11-02 09:58:16. <2> [-10211] A downloaded value for table 'R021_PRD_DESC' (column #3) contains character data that cannot be converted I. 2018-11-02 09:58:16. <2> Error Context: I. 2018-11-02 09:58:16. <2> Remote ID: 354127a9-2003-456c-b08d-d8191428d1f6 I. 2018-11-02 09:58:16. <2> User Name: AY0475 I. 2018-11-02 09:58:16. <2> Modified User Name: AY0475 I. 2018-11-02 09:58:16. <2> Transaction: Download I. 2018-11-02 09:58:16. <2> Table Name: R021_PRD_DESC I. 2018-11-02 09:58:16. <2> Fetch Row: I. 2018-11-02 09:58:16. <2> 379619 I. 2018-11-02 09:58:16. <2> en_AD I. 2018-11-02 09:58:16. <2> KIT VISIBILITAâ SORRISI IN FAMIGLIA I. 2018-11-02 09:58:16. <2> MOBILINK I. 2018-11-02 09:58:16. <2> 2018-11-02 09:58:16.000000 I. 2018-11-02 09:58:16. <2> 2014-06-02 08:18:30.000000

The consolidate database is Oracle 12c and the charset is AL32UTF8

The remote database is SQL Anywhere 17

My question is:

1. should I change the charset of mobilink server or remote database?

2. How to change the charset of mobilink server and remote database?

Accepted Solutions (0)

Answers (3)

Answers (3)

michael_loop
Contributor
0 Kudos

You will need to create a new script version in the consolidated database. You can do this in SQL Central or Interactive SQL. See Script versions and ml_add_property system procedure. You will then connect to the remote database with Interactive SQL and run START SYNCHRONIZATION SCHEMA CHANGE and specify the tables that will be changed, the script version to switch to, and the subscription that is affected.

You will then run ALTER TABLE to change the datatype of your column to nchar, nvarchar or whatever Unicode datatype is closest to your current datatype.

When all changes to the table are successfully made, run STOP SYNCHRONIZATION SCHEMA CHANGE.

All of the above statements against the remote should be done in a single session with no other connections to the database.

michael_loop
Contributor
0 Kudos

In your attempted workaround:

1. Add charset option to the connection string as below:

-c "ENG=MosisQA;DBF=db\mosis.db;UID=XXX;PWD=XXX;CharSet=UTF8"

your syntax is correct but it is not clear whether you are modifying the connection string of Mobilink or dbmlsync. As Koichi mentioned, it is only necessary to modify the remote (dbmlsync).

Did you get a new error when you tried this? If so, try the sample code from the help file against your remote database:

dbisql -c "ENG=MosisQA;DBF=db\mosis.db;UID=XXX;PWD=XXX;CharSet=UTF8" "SELECT connection_property('CharSet')"

you should see:

connection_property('CharSet')
------------------------------
UTF-8

2. You can make schema changes to a replicating table by wrapping the changes in START SYNCHRONIZATION SCHEMA CHANGE / STOP SYNCHRONIZATION SCHEMA CHANGE. Be EXTREMELY careful with this in a production setting, however. Take a backup before beginning, and test the process with a non-production database to be sure you understand how it works.

Former Member
0 Kudos

Hi Michael, Thanks for your response.

1. In our application, we invoke dbmlsync command in java code like this: "dbmlsync @" + masterSyncScript;

masterSyncScript is a configuration file, I changed the connection string in it to -c "ENG=MosisQA;DBF=db\mosis.db;UID=XXX;PWD=XXX;CharSet=UTF8"

when the synchronization start, I got the same error - [-10211] A downloaded value for table 'R021_PRD_DESC' (column #3) contains character data that cannot be converted

I tried dbisql -c command, and get the correct charset, but in our application we don't use dbisql command.

2. Should the script START SYNCHRONIZATION SCHEMA CHANGE and STOP SYNCHRONIZATION SCHEMA CHANGE be put on Mobilink server or remote database or consolidate database? if they should be put on Mobilink server, May I know how to add script to Mobilink server?

0 Kudos

Hi, I have a similar problem, but (unfortunately) I cannot change the connection string. Is there any way to configure the network SqlAnywhere Windows server with a different default chartset?

Thanks

former_member182948
Active Participant
0 Kudos

Please see the following.
2599105 - [Sybase][ODBC Driver]Could not load code page for requested charset

> 1. should I change the charset of mobilink server or remote database?
No.

> 2. How to change the charset of mobilink server and remote database?
Set charset parameter to UTF8 in the ODBC driver (charset=utf8).

For details,
"CharSet (CS) connection parameter"

Former Member
0 Kudos

Hi Ogawa,

Thanks for your quickly reply. I checked the document you mentioned, the workaround is 'Set charset parameter to UTF8 in the ODBC driver (charset=utf8).'

May I know how to set the charset of ODBC driver?


I also tried below workaround but does not work:

1. Add charset option to the connection string as below:

-c "ENG=MosisQA;DBF=db\mosis.db;UID=XXX;PWD=XXX;CharSet=UTF8"

2. Add charset option to mobilink server configuration file as below:

-c "dsn=XXX;uid=XXX;pwd=XXX;CharSet=utf8"

former_member182948
Active Participant
0 Kudos

The connection string seems to be correct.
However, only the remote side needs to specify the character set.

and The influence of the column type can be thought.
2599105 - [Sybase][ODBC Driver]Could not load code page for requested charset
>1.Change the data type of the column #5 in MyTable from varchar to nvarchar in the remote database.
(This column number is an example.)

Former Member
0 Kudos

@Koichi Ogawa

1. May I know how to Set charset parameter to UTF8 in the ODBC driver (charset=utf8)?

2. When I try to change the column type to nvarchar, it show me the message:

The column XXX could not be modified in the database. This operation is only allowed within a synchronization schema change.