on 2011 Oct 19 5:41 PM
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?
Request clarification before answering.
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:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
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 <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 http://dcx.sybase.com/index.html#1201/en/mlclient/mc-users-s-6422554.html for more information about remote ids.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Is there a way to totally rebuild the udb file?
- Tried ulinfo -c DBF RemoteDBF.udb -rc (http://dcx.sybase.com/1001/en/ulfoen10/fo-ulcs-utilities-s-4378964.html) 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.
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 😉
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.
User | Count |
---|---|
54 | |
6 | |
6 | |
5 | |
5 | |
5 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.