In this lesson, you create a SQL Anywhere remote database, create a synchronization publication, a user, and a subscription.
Prérequis
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 light weight polling.
Create your MobiLink client database using the dbinit command line utility.
From the c:\MLsis directory, run the following command:
dbinit -dba DBA,sql SIS_CarDealer_LP_DBLSN_REM |
Start your MobiLink client database using the dbsrv16 command line utility.
Run the following command:
dbsrv16 SIS_CarDealer_LP_DBLSN_REM |
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" |
Create the Dealer table in the remote database.
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; |
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; |
![]() |
Discuter à propos de cette page dans DocCommentXchange.
|
Copyright © 2013, SAP AG ou société affiliée SAP - SAP Sybase SQL Anywhere 16.0 |