Use this statement to create or replace an UltraLite or UltraLiteJ synchronization profile. Synchronization profiles define how an UltraLite database synchronizes with the MobiLink server.
CREATE [OR REPLACE] SYNCHRONIZATION PROFILEsync-profile-name sync-option [;...]
sync-option :
sync-option-name = sync-option-value
sync-option-name : string
sync-option-value : string
OR REPLACE clause If the named synchronization profile already exists, then it will be replaced. If the profile does not exist, it will be created.
sync-profile-name The name of the synchronization profile.
sync-option
A string of one or more synchronization option value pairs, separated by semicolons. For example, 'option1=value1;option2=value2'
.
sync-option-name The name of the synchronization profile option.
sync-option-value The value for the synchronization profile option.
There are two possible ways to make changes to an existing synchronization profile. The first is to use the REPLACE clause. This will replace the contents of the synchronization profile with whatever is contained in the new sync-option string. This is the same as dropping the synchronization profile and then creating one with the same name but using the new string. Note, therefore, that a synchronization profile does not need to contain a full synchronization definition because parameters can be merged in (or overridden) at synchronization time.
The second way to modify a synchronization profile is to use the MERGE clause. When using this clause, only the sync options
that are specified in the MERGE clause are changed. To remove a sync option from a synchronization profile, the sync-option
string should look like 'option1=;'
(to set the option to an empty value).
The STREAM synchronization profile option is different from the other options because its value contains a sub-list. For example:
'STREAM=TCPIP{host=192.168.1.1;port=1234}'
. In this case 'host=192.168.1.1;port=1234'
is the sub-list. To add or remove a sub-list value, use a period between the STREAM sync-option-name and the sub-option-name.
For example, MERGE 'stream.port=5678;stream.host=;compression=zlib'
results in a synchronization profile of: stream=TCPIP{port=5678;compression=zlib}
. Attempting to set the stream to a new value will replace the entire stream value. For example: MERGE 'stream=HTTPS'
results in a synchronization profile of: stream=HTTPS{}.
The following table lists the synchronization profile options supported by UltraLite and UltraLiteJ.
Synchronization profile option | Valid values | Description |
---|---|---|
AllowDownloadDupRows (UltraLite only) | Boolean | This option prevents errors from being raised when multiple rows are downloaded that have the same primary key. This can be used to allow inconsistent data to be synchronized without causing the synchronisation to fail. The default value is "no." See Additional Parameters synchronization parameter. |
AuthParms (UltraLite and UltraLiteJ) | String (comma separated) | Specifies the list of authentication parameters sent to the MobiLink server. You can use authentication parameters to perform custom authentication in MobiLink scripts. See Authentication Parameters synchronization parameter. |
CheckpointStore (UltraLite only) | Boolean | Adds additional checkpoints of the database during synchronization to limit database growth during the synchronization process. See Additional Parameters synchronization parameter. |
ContinueDownload (UltraLite only) | Boolean | Restarts a previously failed download. When continuing a download, only the changes that were selected to be downloaded with the failed synchronization are received. By default, UltraLite does not continue downloads. See Resuming failed downloads. |
DisableConcurrency (UltraLite only) | Boolean | Disallow database access from other threads during synchronization. See Additional Parameters synchronization parameter. |
DownloadOnly (UltraLite and UltraLiteJ) | Boolean | Performs a download-only synchronization. See Download Only synchronization parameter. |
KeepPartialDownload (UltraLite only) | Boolean | Controls whether UltraLite keeps a partial download if a communication error occurs. By default, UltraLite does not roll back partially downloaded changes. See Keep Partial Download synchronization parameter. |
MobiLinkPwd (UltraLite and UltraLiteJ) | String | Specifies the existing MobiLink password associated with the user name. See MobiLinkPwd (mp) extended option. |
MobiLinkUid (UltraLite and UltraLiteJ) | String | Specifies the MobiLink user name. See -u dbmlsync option (deprecated). See -mn dbmlsync option. |
NewMobiLinkPwd (UltraLite and UltraLiteJ) | String | Supplies a new password for the MobiLink user. Use this option when you want to change an existing password. See -mn dbmlsync option. |
Ping (UltraLite and UltraLiteJ) | Boolean | Confirms communications with the server only; no synchronization is performed. See Ping synchronization parameter. |
Publications (UltraLite and UltraLiteJ) | String (comma separated) | Specifies the publications(s) to synchronize. The publications determine the tables on the remote that are involved in synchronization. If this parameter is blank (the default) then all tables are synchronized. If the parameter is an asterisk (*) then all publications are synchronized. See Publications in UltraLite. |
ScriptVersion (UltraLite and UltraLiteJ) | String | Specifies the MobiLink script version. The script version determines which scripts are run by MobiLink on the consolidated database during synchronization. If you do not specify a script version, 'default' is used. See ScriptVersion (sv) extended option. |
SendColumnNames (UltraLite and UltraLiteJ) | String | Specifies that column names should be sent to the MobiLink server as part of the upload file when synchronizing. By default, column names are not sent. See Send Column Names synchronization parameter. |
SendDownloadACK (UltraLite and UltraLiteJ) | Boolean | Specifies that a download acknowledgement should be sent from the client to the server. By default, the MobiLink server does not provide a download acknowledgement. See Send Download Acknowledgement synchronization parameter. |
Stream (UltraLite and UltraLiteJ) | String (with sub-list) | Specifies the MobiLink network synchronization protocol. See Stream Type synchronization parameter. |
TableOrder (UltraLite and UltraLiteJ) | String (comma separated) | Specifies the order of tables in the upload. By default, UltraLite and UltraLiteJ select an order based on foreign key relationships. See Additional Parameters synchronization parameter. |
UploadOnly (UltraLite and UltraLiteJ) | String | Specifies that synchronization will only include an upload, and no download will occur. See Upload Only synchronization parameter. |
The Boolean values can be specified as Yes/No, 1/0, True/False, On/Off. In all the Boolean cases, the default is "No". For all other values, the default is simply unspecified.
None.
The following creates a synchronization profile called Test1.
CREATE SYNCHRONIZATION PROFILE Test1 'MobiLinkUid=mary;Stream=TCPIP{host=192.168.1.1;port=1234}' |
The following examples illustrate the changes that occur after executing a sequence of ALTER SYNCHRONIZATION PROFILE commands with different options.
Suppose myProfile1='MobiLinkUID=mary;ScriptVersion=default'
.
After executing ALTER SYNCHRONIZATION PROFILE myProfile1 REPLACE 'MobiLinkPwd=sql;ScriptVersion=1'
, myProfile1 is 'MobiLinkPwd=sql;ScriptVersion=1'
.
After executing ALTER SYNCHRONIZATION PROFILE myProfile1 MERGE 'MobiLinkUID=mary;STREAM=tcpip'
, myProfile1 is 'MobiLinkPwd=sql;ScriptVersion=1;MobiLinkUID=mary;STREAM=tcpip'
.
After executing ALTER SYNCHRONIZATION PROFILE myProfile1 MERGE 'MobiLinkUID=;STREAM.host=192.168.1.1;STREAM.port=1234;ScriptVersion=;'
, myProfile1 is 'MobiLinkPwd=sql;STREAM=tcpip{192.168.1.1;port=1234}'
.
After executing ALTER SYNCHRONIZATION PROFILE myProfile1 MERGE 'MobiLinkPwd=;Ping=yes;STREAM =HTTP'
, myProfile1 is 'Ping=yes;STREAM=HTTP'
.
After executing ALTER SYNCHRONIZATION PROFILE myProfile1 MERGE 'STREAM=HTTP{host=192.168.1.1}'
, myProfile1 is 'Ping=yes;STREAM=HTTP{host=192.168.1.1}'
.
Discuss this page in DocCommentXchange.
|
Copyright © 2010, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.0 |