cancel
Showing results for 
Search instead for 
Did you mean: 

10092 NO_UPLOAD_DATA_SCRIPT

Baron
Participant
2,482

Hi all, for some particlaur table, where I want to have a unidirectional dataflow from Consolidated->Remote, so I didn't write any upload scripts on the consolidated database. Situation: The mobilink server doesn't accept this situation and throws an error: [-10092] There is no upload data script defined for table...etc. Question1: is it mandatory to define the upload scripts? Question2: This same combination was working for years w/o the option '-fr ', so what can cause this error to arrise, having that nothing is changed in the options of executing dbmlsync

Accepted Solutions (1)

Accepted Solutions (1)

VolkerBarth
Contributor

I assume you are using SQL Anywhere 10 or below?

See that doc topic for required scripts, and yes, any upload script is required. (*)

If the scripts and options are unchanged and you have not got that error before, it might be due to the fact that the according table has not had updates to process from that table before but now has...


(*) With v11.0.1 and above, you could use the "--{ml_ignore}" prefix to tell the ML server that you explicitly do not want to upload data.

Baron
Participant
0 Kudos

Thanks for the reply, yes I am using SQL Anywhere 10. Can I form a general rule like this? The mobilink server will look for upload scripts only when it receives changes (insert/delete/update) from remote. In all other cases where the changes are carried out only on the consolidated side, then the mobilink server will not care whether upload scripts are existing or not (since it will only download the data to remote).

VolkerBarth
Contributor
0 Kudos

Well, according to the description for the ml_ignore prefix, I would assume that - but I'm not in the position to form a general rule.

Furthermore, it might make a difference whether

  • there are updates for the corresponding table or
  • there is an update stream for that table.

The latter may not be the case when you - between 2 synchronizations - insert, say, 10.000 rows into your remote table, update them and delete them afterwards - then the ML client will merge those modifications and will build an empty update stream because, summed up, nothing has changed.

So, I hope a SQL Anywhere engineer will comment on that and tell the facts.

Baron
Participant
0 Kudos

I will formulate the situation again. I have synchronized pair (mobilink Sybase 10) for which I planned to have unidirectional synchronization (only download), suddenly some insert statement came on the remote side, which in truns sent those changes into consolidated who doesn't have any script for handling upload_insert.

I tried to call ml_add_table_script('default', 'TABLE_1', 'upload_insert', '--comment') So that I have an empty script for upload_insert.

Problem: the mobilink server can detect that the content of this script is a comment and so it stops. Moreover, when I replace the comment with 'select * from dummy' then the mobilink server is again smart and can decide that the returned columns of this inquiry does not match the columns of TABLE_1.

Question: is there any other way for solving this problem w/o -fr option on dbmlsync utility?

VolkerBarth
Contributor

If the remote data is undesired, I would simply delete it...

Otherwise, AFAIK, a SQL upload_insert script must be a valid INSERT statement or a stored procedure call (*) parametrized with the according columns.

I guess I have not tried that myself before, but I think you are free to insert those rows into a dummy table on the cons - or when using a stored procedure, to ignore the supplied arguments and actually do a no-op.

(*) I'm not sure whether upload scripts allow for stored procedure calls at all, as to the docs, they are supported for download events, so my suggestion may be moot w.r.t. procedures...

Baron
Participant
0 Kudos

Thanks for the reply, actually the new rows are requested, and can't delete them. I could find some tricky solution: If I write any another no-op upload script for this table rather than upload_insert (say upload_update), then the mobilink server will stop arguing and will continue to accomplish the synchronization (without inserting the new rows to consol.). according to http://dcx.sap.com/index.html#1001/en/dbmlen10/ml-ml-scripts-s-4180746.html there will be at least one script existed.

This no-op script will cause problem only when the corresponding event occurs (when an update statement is executed on remote), so that I have to remove later the last upload_update. Thanks again

VolkerBarth
Contributor

Yes, tricky, but at least officially documented...:)

You might also try to add an "always false" condition to the UPDATE statement within the update script to turn it into a no-op, such as "... WHERE 0 = 1 AND ...".

Glad you got it working.

Baron
Participant
0 Kudos

Yes sure, this extra always false condition will make the situation safer!! I didn't use it, because I dropped this script after having a successfull synchronization (i.e. I called: ml_add_table_script( , , , NULL).

Now this trick became to me very familiar and I use it a lot.

Answers (1)

Answers (1)

Baron
Participant
0 Kudos

Hi, I want to open the same issue once again. I am using sqlanywhere 10, and just noticed, that a very quick solution for this problem will be using --{ml_ignore}. I tried it but didn't work!!! Could someone please confirm whether this ml_ignore is for sqlanywhere 10 applicable? Could you please write an exact example how should such script look like?

Thanks

chris_keating
Product and Topic Expert
Product and Topic Expert

The --{ml_ignore} was introduced in v11.0.1.

Here is an example of how this works:

CALL ml_add_table_script( 'default', 'RemoteOrders', 'download_delete_cursor', '--{ml_ignore}');

VolkerBarth
Contributor

The --{ml_ignore} was introduced in v11.0.1.

As already stated in the original answer...

Baron
Participant
0 Kudos

Yes, I just noticed that it was already mentioned in the original answer.