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

SQL Anywhere 11.0.1 » MobiLink - Server-Initiated Synchronization » Server-initiated synchronization tutorials » Tutorial: Server-initiated synchronization using gateways


Lesson 7: Set up a remote database

In this lesson, you create a SQL Anywhere remote database, create a synchronization publication, a user, and a subscription. You also create the command file for the Listener, and then start the Listener.

To create and start a new SQL Anywhere remote database
  1. At a command prompt, navigate to the directory where you want to create the database.

  2. Type the following command to create the database:

    dbinit c:\MLsis\rem1.db
  3. Type the following command to start the database:

    dbeng11 c:\MLsis\rem1.db
  4. Generate the remote database schema.

    1. Click Start » Programs » SQL Anywhere 11 » Sybase Central.

    2. In the left pane, click SQL Anywhere 11.

    3. Click File » Connect.

    4. Click the Identification tab.

    5. In the User ID field, type DBA.

    6. In the Password field, type sql.

    7. Click the Database tab.

    8. In the Server Name field, type rem1.

    9. Click OK.

    10. Click File » Open Interactive SQL.

    11. Execute the following command to create the Dealer table:

      CREATE TABLE Dealer (
          name VARCHAR(10) NOT NULL PRIMARY KEY,
          rating VARCHAR(5),
          last_modified TIMESTAMP DEFAULT TIMESTAMP
  5. Execute the following commands to create a synchronization publication, user, and subscription:

    CREATE PUBLICATION car_dealer_pub (table Dealer);
        TO car_dealer_pub 
        FOR sis_user1 
        OPTION scriptversion='sis_ver1';
See also