MobiLink Synchronization User's Guide
Adaptive Server Anywhere Clients
Creating a remote database
To deploy Adaptive Server Anywhere remote databases, you need to create the databases and add the appropriate publications and subscriptions. To do this, you customize a prototype remote database.
To deploy MobiLink remote databases by customizing a prototype
Create a prototype remote database.
The prototype database should have all the tables and publications needed, but not the information that is specific to each database. This individual information typically includes the following:
The MobiLink user name.
Synchronization subscriptions.
The GLOBAL_DATABASE_ID option that provides the starting point for global autoincrement key values.
For each remote database, carry out the following operations:
Create a directory to hold the remote database.
Copy the prototype remote database into the directory.
If the transaction log is held in the same directory as the remote database, the log filename does not need to be changed.
Run a SQL script that adds the individual information to the database.
The SQL script can be a parameterized script. For information on parameterized scripts, see PARAMETERS statement [Interactive SQL], and Running SQL command files.
The following SQL script is taken from the Contact sample. It can be found in Samples\MobiLnk\Contact\customize.sql.
PARAMETERS ml_userid, db_id; go SET OPTION PUBLIC.GLOBAL_DATABASE_ID = {db_id} go CREATE SYNCHRONIZATION USER {ml_userid} TYPE 'TCPIP' ADDRESS 'host=localhost;port=2439' OPTION MEM='' go CREATE SYNCHRONIZATION SUBSCRIPTION TO "DBA"."Product" FOR {ml_userid} go CREATE SYNCHRONIZATION SUBSCRIPTION TO "DBA"."Contact" FOR {ml_userid} go commit work go
The following command line executes the script for a remote database with data source dsn_remote_1.
dbisql -c "dsn=dsn_remote_1" read customize.sql [SSinger] [2]