In this lesson, you create a publication, a MobiLink user and a subscription.
This lesson assumes you have the roles and privileges listed in the Privileges section at the start of this tutorial: Tutorial: Using scripted upload.
This lesson assumes you have completed all preceding lessons. See Lesson 1: Creating the consolidated database.
Using the instance of Interactive SQL connected to the remote database, run the following SQL statements. The publication called pub1 uses the scripted upload syntax (WITH SCRIPTED UPLOAD). It creates an article for the employee table, and registers the three stored procedures you just created for use in the scripted upload. It creates a MobiLink user called u1, and a subscription between v1 and pub1. The extended option FireTriggers is set to off to prevent triggers from being fired on the remote database when the download is applied, which prevents downloaded changes from being uploaded during the next synchronization.
CREATE PUBLICATION pub1 WITH SCRIPTED UPLOAD ( TABLE employee( id, name, salary ) USING ( PROCEDURE employee_insert FOR UPLOAD INSERT, PROCEDURE employee_update FOR UPLOAD UPDATE, PROCEDURE employee_delete FOR UPLOAD DELETE ) ); CREATE SYNCHRONIZATION USER u1; CREATE SYNCHRONIZATION SUBSCRIPTION TO pub1 FOR u1 TYPE 'tcpip' ADDRESS 'host=localhost' OPTION FireTriggers='off' SCRIPT VERSION 'default';
Discuter à propos de cette page dans DocCommentXchange.
|Copyright © 2013, SAP AG ou société affiliée SAP - SAP Sybase SQL Anywhere 16.0|