Please be aware that the SAP SQL Anywhere Forum will be shut down on August 29th, 2024 when all it's content will be migrated to the SAP Community.

Okay, I think I have a very similar problem to, but let me lay it out fully as I have not read anything there that has solved my situation.

We are writing a remote application, the remote client is Windows CE 5.0. Our DB is Oracle 11, we are running a single MobiLink server between the two and using Sybase Central to manage the process. We rolled out our first test device with the app and synced it a few times, worked great.

Now we are ready to roll out our second device. We created a second user using mluser and assigned it to the second device. I pulled the original udb from the remote directory on the server (the file which we installed on the first device) and placed it on the second device. I expected that it would sync and update the udb to the current version of the main DB. Of course this did not happen. I got the [10012] error.

So now I have tried to update the udb file on the server using Sybase Central (Connect to UltraLite 12 | Right click on the file | Select Synchronize | set the user/pass and Finish), but this did not work either, in fact I got the exact same error.

I also tried creating yet another fresh user and syncing on Sybase Central with this user and that did not work either.

So given all of this how do I roll out my second device? This seems like a totally logical sequence of events but it does not work. Have I missed something?

asked 19 Oct '11, 16:41

nbunney's gravatar image

accept rate: 100%

retagged 20 Oct '11, 11:57

Graham%20Hurst's gravatar image

Graham Hurst

Nathan: I wonder if the data is not being subsetted by the mluser, so when you sync the second remote db, the ml server thinks it's still the first one and finds the offset mismatch.

I'm hoping someone here can help diagnose this problem and perhaps suggest some best practices when deploying UltraLite remotes to multiple devices.

(19 Oct '11, 17:25) José Ramos

Okay, just figured it out. I needed to totally rebuild the udb file and sync it for each user. The reason for this is that syncing 31Mb of data for each user from the device takes way too long.

So to rebuild the .udb file for each device do this:

  • If you are connected to the Ultralite DB in Sybase Central disconnect.
  • Delete the existing .udb file from the remote directory on the server.
  • Right click on on the sync model under Mobilink 12 in Sybase Central and click on deploy...
  • Click Finish
  • Right Click on UltraLite 12 and then Connect
  • Right Click on the udb file under UltraLite 12 and click Synchronize Database
  • Enter the username and password for the device you are rolling out.
  • Click Finish
permanent link

answered 20 Oct '11, 11:11

nbunney's gravatar image

accept rate: 100%


After deploying the sync model (which in your case is creating a new UDB file) you could keep that UDB file as the starting point before repeating the subsequent steps for each new device.

Also, if you deployed to file, files were generated to recreate and synchronize the database.

(20 Oct '11, 12:09) Graham Hurst
Replies hidden

Good comment Graham, I will do this.

(20 Oct '11, 12:16) nbunney

If you synchronized your database before deploying it to the first device, it will have acquired a ML remote ID. You need to clear the remote ID from the database before deploying it again.

Clear the remote ID from an UL database with this command:

dbisql -ul -c "DBF=mydatabase.udb" "set option ml_remote_id="

(After clearing the remote ID, you can deploy the database as many times as you like. The remote ID is generated when the database synchronizes. ML relies on each database having a unique remote ID. Normally you don't have to worry about this at all, except that you must ensure that you clear the remote ID before deploying.)

permanent link

answered 19 Oct '11, 17:23

Tim%20McClements's gravatar image

Tim McClements
accept rate: 35%

edited 19 Oct '11, 17:28

This makes sense to me, I will try this tomorrow morning when I get back to the client's office. Thanks for the super fast response!

(19 Oct '11, 19:05) nbunney
Replies hidden

Okay, gave it a shot but got an error: Cannot change the MobiLink remote id when the status of the last upload is unknown. Any help appreciated.

(20 Oct '11, 10:10) nbunney

Is there a way to totally rebuild the udb file?
- Tried ulinfo -c DBF RemoteDBF.udb -rc ( but that just gives an invalid option error.
- When I run ulinfo -c DBF RemoteDBF.udb I get some info then: Failed with error: -794.

(20 Oct '11, 10:11) nbunney

This error indicates that the previous synchronization was interrupted. (Technically, it was interrupted between finishing sending the upload and waiting for a response/download from ML.) You need to have a successful sync before clearing the remote ID. Hopefully this isn't a problem in a development environment ;-)

(20 Oct '11, 12:04) Tim McClements

Is there a way to totally rebuild the udb file?

As I mentioned in an earlier comment to your answer, if you created a new remote database when deploying a project called MyProject, then you can run the generated MyProject_remote.bat file to recreate the UDB file, and MyProject_ulsync.bat to synchronize it.

(20 Oct '11, 13:01) Graham Hurst

The remote sends two pieces of data to the ML server to identify itself during a sync: the user name, which identifies the remote database user and the remote id which identifies the particular database. When tracking which databases have which data, the server uses the remote id. The remote id has to be unique for each database. If this isn't the case, you'll see warnings like you do and all your syncs will fail.

Typically, the remote id is set to a GUID the first time it syncs. It sounds like the remote id from the database you're making copies of has been set to some value. You can confirm this by looking at the

I. 2011-10-10 18:31:52. <3> Request from "UL" for: remote ID: <guid>...

lines in your MobiLink server log. The <guid> portion should be different for your two remotes. If it is not, you can reset the remote id by setting the ml_remote_id option to NULL. If you plan on making more copies of that database, you should reset the remote id there before you copy.

See for more information about remote ids.

permanent link

answered 19 Oct '11, 17:30

Bill%20Somers's gravatar image

Bill Somers
accept rate: 40%

Your answer
toggle preview

Follow this question

By Email:

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



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "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:


question asked: 19 Oct '11, 16:41

question was seen: 3,816 times

last updated: 20 Oct '11, 13:01