All MobiLink clients synchronize through the MobiLink server. None connect directly to a database server. You must start the MobiLink server before a MobiLink client synchronizes.
For a list of mlsrv10 command line options, see MobiLink Server Options.
The MobiLink server opens connections, via ODBC, with your consolidated database server. It then accepts connections from remote applications and controls the synchronization process.
Run mlsrv10. Use the -c option to specify the ODBC connection parameters for your consolidated database.
For information about connection parameters, see -c option.
You must specify connection parameters. Other options are available, but are optional. These options allow you to specify how the server works. For example, you can specify a cache size and logging options.
For more information about mlsrv10 options, see mlsrv10 syntax.
The mlsrv10 options allow you to specify how the MobiLink server works. To control what the server does, you define scripts that are invoked at synchronization events. See Synchronization Events.
The following command starts the MobiLink server using the ODBC data source SQL Anywhere 10 CustDB to identify the consolidated database. Enter the entire command on one line.
mlsrv10 -c "dsn=SQL Anywhere 10 CustDB;uid=DBA;pwd=sql" -zs MyServer -o mlsrv.log -vcr -x tcpip -xo tcpip
In this example, the -c option provides a connection string that contains an ODBC data source name (DSN) as well as authentication. The -zs option provides a server name. The -o option specifies that the log file should be named mlsrv.log. The contents of mlsrv.log are verbose because of the -vcr option. The -x option opens a port for version 10 clients, and the -xo option opens a port for version 8 and 9 clients.
You can also start the MobiLink server as a Windows service or Unix daemon. See Running the MobiLink server outside the current session.
You must specify a database user to connect to the MobiLink server. You specify the database user with the mlsrv10 -c option or in the DSN.
This database user must have full select, insert, update, and delete permissions on the MobiLink system tables, and must also have execute permissions on the MobiLink system procedures. By default, the database user who runs the MobiLink setup script has these permissions. If you want to use another database user to run the MobiLink server, you must grant permissions for that user on the ml_* tables and the ml_add_*_script system procedures.
For example, in a SQL Anywhere consolidated database you can grant the required permissions as follows:
GRANT CONNECT to DBUser IDENTIFIED BY SQL; GRANT ALL ON dbo.ml_user to DBUser; ... GRANT EXECUTE ON dbo.ml_add_table_script TO DBUser; ...
You must grant permission for each MobiLink system table and system procedure. For a list of all MobiLink system tables and system procedures, see MobiLink Server System Tables and MobiLink Server System Procedures.
The database user also needs the appropriate permission on all tables referenced in the MobiLink scripts, as well as execute permissions on any procedures referenced in the MobiLink scripts.
For more information about setting permission, see GRANT statement.
For more information about setup scripts, see Setting up a consolidated database.