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

SQL Anywhere 10.0.1 » SQL Anywhere Server - SQL Reference » SQL Statements

CREATE SUBSCRIPTION statement [SQL Remote] Next Page

CREATE SYNCHRONIZATION SUBSCRIPTION statement [MobiLink]


Use this statement in a SQL Anywhere remote database to create a subscription between a MobiLink user and a publication.

Syntax

CREATE SYNCHRONIZATION SUBSCRIPTION
TO publication-name
[ FOR ml_username, ... ]
[ TYPE network-protocol ]
[ ADDRESS protocol-options]
[ OPTION option=value, ... ]

ml_username: identifier

network-protocol: http | https | tls | tcpip

protocol-options: string

value: string | integer

Parameters

TO clause    Specify the name of a publication.

FOR clause    Specify one or more MobiLink user names. If you specify more than one user name, a separate subscription is created for each user.

ml_username is a user who is authorized to synchronize with the MobiLink server.

For more information about synchronization user names, see Introduction to MobiLink users.

Omit the FOR clause to set the protocol type, protocol options, and extended options for a publication.

For information about how dbmlsync processes options that are specified in different locations, see Priority order.

TYPE clause    This clause specifies the network protocol to use for synchronization. The default protocol is tcpip.

For more information about network protocols, see CommunicationType (ctp) extended option.

ADDRESS clause    This clause specifies network protocol options such as the location of the MobiLink server. Multiple options must be separated with semi-colons.

For a complete list of protocol options, see MobiLink client network protocol options.

OPTION clause    This clause allows you to set extended options for the subscription. If no FOR clause is provided, the extended options act as default settings for the publication.

For information about how dbmlsync processes options that are specified in different locations, see Priority order.

For a complete list of options, see MobiLink SQL Anywhere Client Extended Options.

Remarks

The network-protocol, protocol-options, and options can be set in several places.

For information about how dbmlsync processes options that are specified in different locations, see Priority order.

This statement causes options and other information to be stored in the SQL Anywhere ISYSSYNC system table. Anyone with DBA authority for the database can view the information, which could include passwords and encryption certificates. To avoid this potential security issue, you can specify the information on the dbmlsync command line.

See dbmlsync syntax.

Permissions

Must have DBA authority. Requires exclusive access to all tables referred to in the publication.

Side effects

Automatic commit.

See also
Standards and compatibility
Examples

The following example creates a subscription between the MobiLink user ml_user1 and the publication called sales_publication and sets the memory to 3 MB:

CREATE SYNCHRONIZATION SUBSCRIPTION
   TO sales_publication
   FOR ml_user1
   OPTION memory='3m';

The following example omits the FOR clause, and so stores settings for the publication called sales_publication:

CREATE SYNCHRONIZATION SUBSCRIPTION
   TO sales_publication
   ADDRESS 'host=test.internal;port=2439;
      security=ecc_tls'
   OPTION memory='2m';