Can somebody tell me what can be the problem in a following situation:

we are synchronizing two SQL Anywhere10 Databases using DBMLSYNC & MLSRV17 (of SQL Anywhere17). Both databases are running on the same machine, both SQL Anywhere10 & SQL Anywhere17 are installed.

For one of my tables I need to ignore the deletes from remote:

call ml_add_table_script('default', 'MYTABLE', 'upload_delete', '--{ml_ignore}');

I get the following Error:

E. 2023-01-10 09:24:09. <1> [-10002] Consolidated database server or ODBC error:  ODBC: [Microsoft][ODBC Driver Manager] Invalid string or buffer length (ODBC State = HY090, Native error code = 0)
E. 2023-01-10 09:24:09. <1> [-10058] Unable to open upload_delete

I tried to delete the script and reoload it, without success!

call ml_add_table_script('default', 'MYTABLE', 'upload_delete', NULL);
call ml_add_table_script('default', 'MYTABLE', 'upload_delete', '--{ml_ignore}');

Of course I restartet both databases in between too!

asked 10 Jan '23, 03:32

Baron's gravatar image

Baron
2.1k134146175
accept rate: 46%

edited 10 Jan '23, 04:12

Noticeable is that the column checksum in table ml_script is set to (NULL)!

Could this be the problem? How is this checksum calculated generally?

(10 Jan '23, 03:42) Baron
Replies hidden
1

AFAIK, "ml_ignore" was introduced with 11.0.1. Could this be the reason when using a v10 database with v17 MobiLink?

(10 Jan '23, 06:09) Volker Barth
Replies hidden
1

We have old applications running on the cons. so that we cant migrate the database on the cons. to SQL17. We still need to synchronize between Remotes (SQL17) and Cons.(SQL10).

dbmlsync (of sql17) doesn't accept to work against older version (i.e. against MLSRV10), and this is the reason why we have this combination.

ml_ignore per se is working in another similar installation (DB of SQL10 with MSLRV17)

(10 Jan '23, 08:14) Baron

Volker is correct. If you have --{ml_ignore} as a script, the version of the MobiLink Server must be v11 or above. That explains why it's working when you have mlsrv17, but not mlsrv10.

(10 Jan '23, 08:46) Reg Domaratzki

The lack of checksum is not the issue.

The checksum is only needed and used when defining scripts through [Sybase|SQL] Central, and possibly only when using a synchronization model, I'm not 100% sure.

(10 Jan '23, 08:50) Reg Domaratzki

but I have mlsrv17

(10 Jan '23, 08:59) Baron

Just to clarify: Have all your separate v10 databases been setup with the same v17 ML syncsa.sql script? (Just very wild guessing on my part again...)

(10 Jan '23, 10:03) Volker Barth

Yes sure, otherwise could not run the solution below too!

(10 Jan '23, 10:13) Baron
1

but I have mlsrv17

I'm confused. 2 hours ago, you indicated that your ML Server returned an error saying :

Server error: Message: There is no upload data script defined for table:  MYTABLE.  If you want to be able to synchronize anyway, with the risk of potentially losing upload data, use the -fr command line option.  Table Name: MYTABLE

That is not an error that exists in the v17 MobiLink Server.

Given the error being reported by your MobiLink Server and the fact that you are having problems using --{ml_ignore}, I suspect your ML Server is NOT v17.

(10 Jan '23, 11:58) Reg Domaratzki

I am sorry. You have right, it is MLSRV10!

Because we have lot of databases running on the sam machine, I was confused, and caused also a confusion for you.

Excuse please.

(16 Jan '23, 07:18) Baron
showing 2 of 10 show all flat view

The problem could only be solved in this way :

call ml_add_table_script('default', 'MYTABLE', 'upload_delete', 'call mydumy(?,?,?)');

create procedure mydumy(var1 varchar(4),var2 varchar(4),var3 varchar(4)) begin message ('dummy'); end;

permanent link

answered 10 Jan '23, 04:01

Baron's gravatar image

Baron
2.1k134146175
accept rate: 46%

edited 10 Jan '23, 04:16

Prior to v12 of the MobiLink Server, there were no requirements to define the five main synchronization scripts (upload_insert, upload_update, upload_delete, download_cursor, download_delete_cursor).

If the MobiLink Server version is 10, I suspect you can simply delete the event to ignore it, and there should be no need for the no-op stored procedure, which will add a very minimal amount of extra processing to your upload.

call ml_add_table_script('default', 'MYTABLE', 'upload_delete', NULL);
(10 Jan '23, 08:47) Reg Domaratzki
Replies hidden

No, this is not enough. If a script for upload_delete is missed, then I get an error.

Server error: Message: There is no upload data script defined for table:  MYTABLE.  If you want to be able to synchronize anyway, with the risk of potentially losing upload data, use the -fr command line option.  Table Name: MYTABLE

At least one of the upload scripts must exist.

(10 Jan '23, 09:07) Baron
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×371

question asked: 10 Jan '23, 03:32

question was seen: 578 times

last updated: 16 Jan '23, 07:18