Okay, I think I have a very similar problem to http://sqlanywhere-forum.sap.com/questions/7448/synchronization-complete-but-no-update-take-effect, 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? |
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:
1
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.) 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?
(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
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
(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 11.0.1.2538" for: remote ID: <guid>... lines in your MobiLink server log. The See http://dcx.sybase.com/index.html#1201/en/mlclient/mc-users-s-6422554.html for more information about remote ids. |
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.