on 2012 Oct 04 7:52 AM
Testing a synchronization setup for a customer.
On the first synchronization I notice that everything, including old data, is downloaded to the remote database. It is as if the timestamp has been reset to the client thinks that everything on the consolidated database is updated 😞 As an example I now get a syncrhonization error from a row last updated 2010-09-30 11:27:49.476000.
When connecting to the Mobilink server I see that each remote database is registered with 15 subscriptions for the same publication and user. Probably there has been created a new one for each time the synchronization is redeployed (that has been done now and then). Is it possible to delete the unused subscriptions ? (The list in DBA.ml_subscription)
EDIT: Came across something in the documentation http://dcx.sybase.com/index.html#1201/en/mlserver/ml-synchtech-s-3939388.html:
The MobiLink server sends this TIMESTAMP value as part of the download, and the client stores it.
This might be my problem. As I copied a setup from another server I might not have copied the client timestamp. Docs state that it is stored in the Sys.SYSSYNC view, but this view is empty on my remote database. That brings me to the question; Where does the Mobilink client store its timestamp and how can I add it to my test setup ?
Request clarification before answering.
Well, I must say that these internet forums are one of the things I praise Sybase for when discussing database engines with other people 😃
So if I understood this correctly (I want to alter the timestamp only once and only for a given user), lets say I have a mobilink user names mluser and on 13 October 12:00 I knew that the databases were in sync;
Then I can make my ModifyDownloadTimestamp script to do something like this ?
CREATE PROCEDURE ModifyDownloadTimestamp( @download_timestamp DATETIME OUTPUT, @user_name VARCHAR( 128 )) AS BEGIN IF (@download_timestamp < '2012-10-03 12:00') AND (@user_name = 'mluser') THEN SELECT @download_timestamp = '2012-10-03 12:00'; RETURN; END IF; --Default handling goes here SELECT @download_timestamp = @download_timestamp; END
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Then I can make my ModifyDownloadTimestamp script to do something like this ?
You can code anything you want to really -- which is the great part about MobiLink! -- and yes, this logic looks to be closer to what you were looking for originally.
This way you'll only be going back a few days in your initial data sync rather than looking for all historic data. Once the user has initially caught up, they can then go back to the normal timestamp increment behaviour.
Another (though obviously undocumented) method might be to simply adjust the values in the ml_subscription ML system table in the consolidated database. From ML's point of view, that's a system table, but from a DBA' point of view it's just another user-defined table.
That's what stored procedures like ml_delete_sync_state_before do, as well, as Russ has pointed towards. However, whereas they generally drop/reset state information, you apparently would need to "correct" values here like the "progress" counter to make them fit those of the remote.
A BIG CAVEAT: Unless you are really aware of the meaning of those values, modifying them is expected to lead to problems.
Note: I've never done that with v12 but had to do so with older versions (v8 in particular).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I don't know, and my BIG CAVEAT still goes.
FWIW, in v8, there are no "last_upload_time" or "last_download_time" columns in the ml_subscription table so "progress" was all that was to modify, generally to make it fit to the remote's values in system view syssync (or vice versa). - If consolidated and remote have different values for the offset value, then the sync process by default gives the consolidated's value a higher priority unless you use switches like -ra or -rb.
As stated, these are just some details from older versions. This is by no means an invitation to do so. I guess newer versions are smarter when handling differences with progress offsets and the like. USE AT YOUR OWN RISK.
If you know the date after which only new remotes have synchronized, ie. before this date only old, unused remote IDs and subscriptions were used, see the ml_delete_sync_state_before stored procedure. The doc is here.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
75 | |
30 | |
9 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.