Lesson 6: Setting up a remote database

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

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

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

    Run the following command:

    dbinit SIS_CarDealer_LP_DBLSN_REM
  2. Start your MobiLink client database using the dbeng12 command line utility.

    Run the following command:

    dbeng12 SIS_CarDealer_LP_DBLSN_REM
  3. Connect to your MobiLink client database using Interactive SQL.

    Run the following command:

    dbisql -c "SERVER=SIS_CarDealer_LP_DBLSN_REM;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 CarDealer(TABLE DEALER WHERE 0=1)
    CREATE SYNCHRONIZATION USER test_mluser OPTION ScriptVersion='CarDealer'
    CREATE SYNCHRONIZATION SUBSCRIPTION TO CarDealer FOR test_mluser
    SET OPTION public.ml_remote_id = remote_id;
    COMMIT;
  6. Proceed to Lesson 7: Configuring the MobiLink Listener.

 See also