UltraLite CREATE SYNCHRONIZATION PROFILE statement

Use this statement to create an UltraLite synchronization profile. Synchronization profiles define how an UltraLite database synchronizes with the MobiLink server.

Syntax
CREATE SYNCHRONIZATION PROFILE sync-profile-name sync-option  [;...]
sync-option :
sync-option-name = sync-option-value
sync-option-name : string
sync-option-value : string
Parameters
  • 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.

Remarks

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.

Synchronization profile option Valid values Description
AllowDownloadDupRows 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."
AuthParms 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 Boolean Adds additional checkpoints of the database during synchronization to limit database growth during the synchronization process. See Checkpoint Store synchronization parameter.
ContinueDownload 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 Boolean Disallow database access from other threads during synchronization. See Disable Concurrency synchronization parameter.
DownloadOnly Boolean Performs a download-only synchronization. See Download Only synchronization parameter.
KeepPartialDownload 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 String Specifies the existing MobiLink password associated with the user name. See MobiLinkPwd (mp) extended option.
MobiLinkUid String Specifies the MobiLink user name. See -u option. See -mn option.
NewMobiLinkPwd String Supplies a new password for the MobiLink user. Use this option when you want to change an existing password. See -mn option.
Ping Boolean Confirms communications with the server only; no synchronization is performed. See Ping synchronization parameter.
Publications 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 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 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 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 String (with sub-list) Specifies the MobiLink network synchronization protocol. See Stream Type synchronization parameter.
TableOrder String (comma separated) Specifies the order of tables in the upload. By default, UltraLite selects an order based on foreign key relationships. See Table Order synchronization parameter.
UploadOnly String Specifies that synchronization will only include an upload, and no download will occur. See Upload Only synchronization parameter.

Please note that 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.

Side effects

None.

See also
Example

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}'.