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

SQL Anywhere 17 » UltraLite - Database Management and Developer Guide » UltraLite SQL reference » UltraLite SQL statements

ALTER SYNCHRONIZATION PROFILE statement [UltraLite]

Alters an UltraLite synchronization profile.

Syntax
ALTER SYNCHRONIZATION PROFILE sync-profile-name
MERGE  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.

  • MERGE clause

    Use this clause to change existing, or add new, options to a 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

Synchronization profiles define how an UltraLite database synchronizes with the MobiLink server.

You can use the MERGE clause to make changes to an existing synchronization profile. When using this clause, only the synchronization options that are specified in the MERGE clause are changed. To remove a synchronization 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{}.

Side effects

None.

Example

The following is an example of the ALTER SYNCHRONIZATION PROFILE...REPLACE statement:

CREATE SYNCHRONIZATION PROFILE myProfile1;
ALTER SYNCHRONIZATION PROFILE myProfile1
   REPLACE 'publications=p1;uploadonly=on';

The following is an example of the ALTER SYNCHRONIZATION PROFILE...MERGE statement.

CREATE SYNCHRONIZATION PROFILE myProfile2 'publications=p1;
ALTER SYNCHRONIZATION PROFILE myProfile2 
   MERGE 'publications=p2;uploadonly=on';

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