The MobiLink server supports MySQL Community and Enterprise servers 5.1.3 or later. QAnywhere does not support MySQL.
Before running the setup script, you should be aware of the following requirements:
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.
To set up MySQL 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 two ways you can do this:
Using the MySQL command line tool or the MySQL Query Browser, run the syncmys.sql setup script, located in %SQLANY12%\MobiLink\Setup. Make sure that your MySQL user ID has privileges to create triggers.
In the MobiLink 12 plug-in for Sybase Central, choose Folders from the View menu. Open your MobiLink project and expand Consolidated Databases. Right-click the database name and click Check MobiLink System Setup. If your database requires setup, you are prompted to continue. Note that if you want to use an existing MobiLink system setup, then your default_schema should be the schema of the MobiLink system setup.
You must set up an ODBC DSN for your MySQL consolidated database using the ODBC driver that is provided on the MySQL web site. The MobiLink server supports MySQL ODBC driver 5.1.3 or later. See:
To specify your ODBC configuration file in Unix, do one of the following,
Data type mappings The types of columns must map correctly between your consolidated and remote databases. For details, see MySQL data mapping.
Storage Engine The MobiLink server requires the default storage engine to be ACID compliant. If the default storage engine is not ACID compliant, make sure that all MobiLink server tables are created using an ACID compliant storage engine, such as InnoDB and Falcon.
Stored Procedures You cannot use INOUT or OUT parameters in stored procedure calls. Procedures that require these parameters must be implemented as functions that return an OUT value.
Server events that require INOUT parameters, such as authenticate_user and modify_user, must be implemented as functions and run using a SELECT statement instead of a CALL statement.
Named parameters User-defined named parameters are not supported.
Cursor Scripts The events upload_fetch, download_cursor, and download_delete_cursor must be called using a SELECT statement, which the MobiLink server runs using a read-committed isolation level. A bug in the MySQL ODBC driver causes the server to read uncommitted operations, such as INSERT, UPDATE, and DELETE statements, which results in inconsistent data between the consolidated database and the remote database.
To work around this problem, affix a LOCK IN SHARE MODE clause to your SELECT statements. For example:
SELECT column1 FROM table1 WHERE id > 0 LOCK IN SHARE MODE
This clause protects the SELECT statement from uncommitted operations.
Bulk upload The MySQL ODBC driver does not currently support bulk upload.
MLSD The MySQL ODBC driver does not currently support MSDTC, so a separate MLSD is not supported.
SQLLEN Datatypes on the 64-bit MobiLink server for Unix The MySQL ODBC driver defines SQLLEN as a 32-bit integer, causing a discrepancy with the 64-bit MobiLink server, which defines SQLLEN as a 64-bit integer by default. If you are running MobiLink on a 64-bit Unix environment, you must add the following to your ODBC configuration file,
This entry forces the server to read SQLLEN as a 32-bit integer. Your configuration should look similar to the following example,
[a_mysql_dsn] Driver=full_path/libmyodbc5.so SERVER=host_name UID=user_name PWD=user_password DATABASE=database_name length32=1
MySQL Server Configuration The MobiLink synchronization scripts are stored in the ml_script table as TEXT and are retrieved when needed. You may need to set max_allowed_packet equal to 16m or greater in the my.ini file.
Conflict detection The scripts generated for conflict resolution with a MySQL consolidated database have multiple statements. If you are using conflict detection, you must enable the Allow Multiple Statements checkbox on the Flags 3 page of the MySQL Connector/ODBC Data Source Configuration window when you configure a DSN for the MobiLink server to make connections to your MySQL database.
Multiple statements If any of your synchronization scripts contain batched SQL commands separated by semicolons, you may need to select the Allow Multiple Statements checkbox on the Flags 3 page of the MySQL Connector/ODBC Data Source Configuration window when you configure a DSN for the MobiLink server to make connections to your MySQL database.
Discuter à propos de cette page dans DocCommentXchange.
|Copyright © 2012, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.1|