To set up Oracle 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 syncora.sql setup script, located in the MobiLink\setup subdirectory of your SQL Anywhere installation.
In the MobiLink plug-in in Sybase Central, choose Mode > Admin and connect to your server database. Right-click the database name and choose Check MobiLink System Setup. If your database requires setup, you are prompted to continue.
When you use the Create Synchronization Model wizard or Deploy Synchronization Model wizard, system setup is checked when you connect to your server database. If your database requires setup, you are prompted to continue.
The database user who runs the setup script is the only user who will have permission to change the MobiLink system tables, which is required for configuring MobiLink applications. |
You must set up an ODBC DSN for your Oracle consolidated database. See:
Session-wide variables Oracle does not provide session-wide variables. You can store session-wide information in variables within Oracle packages. Oracle packages allow variables to be created, modified and destroyed; these variables may last as long as the Oracle package is current.
Autoincrement methods To maintain primary key uniqueness, you can use an Oracle sequence to generate a list of keys similar to that of an autoincrement field. The CustDB sample database provides coding examples, which can be found in Samples\MobiLink\CustDB\custora.sql. Unlike autoincrement, however, you must explicitly reference the sequence. Autoincrement inserts a column value automatically if the column is not referenced in an INSERT statement.
For an example of using an Oracle sequence, see Tutorial: Using MobiLink with an Oracle 10g Consolidated Database.Oracle does not support empty strings In Oracle, an empty string is treated as NULL. In SQL Anywhere and UltraLite, empty strings have a different meaning from NULL. Therefore, you should avoid using empty strings in your client databases when you have an Oracle consolidated database.
CHAR columns In Oracle, 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 strongly recommended that you use VARCHAR in the consolidated database rather than CHAR. If you must use CHAR, the mlsrv10 -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.
See -b option.Data type mapping The data types of columns must map correctly between your consolidated and remote database. For details, see Oracle data mapping.