Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SAP Sybase SQL Anywhere 16.0 » MobiLink - Server-Initiated Synchronization » Server-initiated synchronization tutorials » Tutorial: Configuring server-initiated synchronization using gateways

 

Lesson 8: Setting up a remote database

In this lesson, you create a SQL Anywhere remote database, create a synchronization publication, a user, and a subscription.

Prerequisites

This lesson assumes you have completed all preceding lessons. See Lesson 1: Setting up the consolidated database.

This lesson assumes that you have the roles and privileges listed in the Privileges section at the start of this tutorial: Tutorial: Configuring server-initiated synchronization using gateways.

 Task
  1. Create your MobiLink client database using the dbinit command line utility.

    Run the following command:

    dbinit -dba DBA,sql remote1
  2. Start your MobiLink client database using the dbsrv16 command line utility.

    Run the following command:

    dbsrv16 remote1
  3. Connect to your MobiLink client database using Interactive SQL.

    Run the following command:

    dbisql -c "SERVER=remote1;UID=DBA;PWD=sql"
  4. Create the Dealer table.

    Execute the following SQL statements in Interactive SQL:

    CREATE TABLE Dealer (
        name            VARCHAR(10) NOT NULL PRIMARY KEY,
        rating          VARCHAR(5),
        last_modified   TIMESTAMP DEFAULT TIMESTAMP
    )
    COMMIT;
  5. Create your MobiLink synchronization user, publication, and subscription.

    Execute the following SQL statements in Interactive SQL:

    CREATE PUBLICATION car_dealer_pub (table Dealer);
    CREATE SYNCHRONIZATION USER sis_user1;
    CREATE SYNCHRONIZATION SUBSCRIPTION 
        TO car_dealer_pub 
        FOR sis_user1 
        OPTION scriptversion='sis_ver1';
    COMMIT;

Results

A SQL Anywhere remote database, synchronization publication, user, and subscription are created.

 See also