Before running the setup script, you should be aware of the following requirements:
The database user that runs the setup script must be able to create tables, triggers, and stored procedures, so must have
the db_owner role.
The database user who runs the setup script is expected to be the same one used to update the MobiLink system tables during
synchronization. This user must be used to start the MobiLink server and to configure MobiLink applications. See Required permissions.
The RDBMS user that the MobiLink server uses to connect to the consolidated database must be able to use the MobiLink system
tables, procedures, and so on, without any qualifiers (for example, SELECT * from ml_user). See MobiLink server system tables.
The MobiLink server login ID must have VIEW SERVER STATE permission. This permission can be granted using the following SQL
statement within the master database of a Microsoft SQL server:
grant view server state to user_name
The MobiLink server login ID must have SELECT permission on sys.databases.
To set up Microsoft SQL Server to work as a MobiLink consolidated database, you must run a setup procedure that adds MobiLink
system tables, stored procedures, triggers, and views that are required for MobiLink synchronization. There are multiple ways
you can do this:
Run the syncmss.sql setup script, located in %SQLANY12%\MobiLink\Setup.
Check and update the MobiLink system setup from Sybase Central. See MobiLink system setup.
Data type mapping
The data types of columns must map correctly between your consolidated and remote database. For details, see Microsoft SQL Server data mapping.
CHAR columns
In Microsoft SQL Server, CHAR data types are fixed length and blank-padded to the full length of the string. In MobiLink
remote databases (SQL Anywhere or UltraLite) CHAR is the same as VARCHAR: values are not blank-padded to a fixed width. It
is recommended that you use VARCHAR in the consolidated database rather than CHAR. If you must use CHAR, the mlsrv12 -b command
line option can be used to remove trailing blanks from strings during synchronization. This option is important for string
comparisons used to detect conflicts.
SET NOCOUNT ON
For Microsoft SQL Server, you should specify SET NOCOUNT ON as the first statement in all stored procedures or SQL batches
executed via ODBC.
Procedure calls
Microsoft SQL Server requires that procedure calls with parameters be written using the ODBC syntax:
Sample database uses computer columns
The SQL Server AdventureWorks sample database contains computed columns. You cannot upload to a computed column. You
can set the column to be download-only, or you can exclude the column from synchronization.
Implementing conflict detection in an upload_update script
For SQL Server, you must perform conflict detection and resolution in the upload_update script. See Conflict resolution with upload_update scripts.