on 2011 Jul 11 12:09 PM
We are trying to adapt our sync model to be generic as each of our remote servers have a different name, i.e. STR0002, STR0003, STR0004, etc. We tried using @@servername, but it isn't working. If we enter the servername to connect to and update, we are going to have to have a separate model for each. Any ideas on what parameters to use??
Ah! It's the remote database you want to identify so your download_cursor script can send the right data to it! That's very easy.
In your synchronization model, that's called a download subset. The model supports downloading by the user name that the remote database uses to connect to MobiLink, which is frequently used for what you want. Eg. when your remote database STR003 connects to the ML server, have it use STR003 as the ML user name, then your scripts (or those generated by the model) can use {ml s.username} which will be substituted by STR003 when STR003 is synchronizing.
For more info, see http://dcx.sybase.com/index.html#1101/en/mlstart_en11/mg-about-s-6040094.html
BTW, it's better to use the ML username or an authentication parameter (via Custom download subset in a sync model) than to use the remote database ID.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The MobiLink server can only connect to a single consolidated database at a given time. (See: mlsrv12 -c).
You will need to set up an individual MobiLink server for each database instance (ensuring that each MobiLink server is listening on a separate port and is named uniquely on the system), and then have dbmlsync/UltraLite clients connect to the appropriate TCP/HTTP MobiLink port that corresponds to the required consolidated database server.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
We have one consolidated DB and the sync model used to push down to store level (remote db) all have the same tables (data) being pushed, with the appropriate where clauses in the SQL to push data applicable to that user. Are you telling me we have to create a specific model for each user on the mobilink server? Previously we used SQL remote with publications and remote users (each remote user was a remote DB) So if I read your answer correctly, the config is done when setting up the server and not the model? Is that right. Also if you know what the parameters are or can point me to some documents to help, that would be great.
Sorry - if I didn't mention before we use SQL Anywhere 11 - Also - we use @@servername extensively in our SQL, and I realise we cannot use it in Mobilink, but isn't there something which is equivilent to this then? That will pick up the servername on the remote db without having to specify a dsn name (as I mentioned previously, they are all differnt)
User | Count |
---|---|
68 | |
8 | |
8 | |
7 | |
7 | |
6 | |
6 | |
6 | |
6 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.