Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.
变更 UltraLite 同步配置文件。
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
sync-profile-name 同步配置文件的名称。
MERGE 子句 此子句用于更改同步配置文件的现有选项或向其中添加新选项。
sync-option 一个或多个同步选项值对的字符串用分号分隔。例如,'option1=value1;option2=value2'。
'option1=value1;option2=value2'
sync-option-name 同步配置文件选项的名称。
sync-option-value 同步配置文件选项的值。
同步配置文件定义 UltraLite 数据库如何与 MobiLink 服务器同步。
可使用 MERGE 子句更改现有同步配置文件。使用此子句时,仅更改在 MERGE 子句中指定的同步选项。要从同步配置文件中删除同步选项,sync-option 字符串应与 'option1=;' 类似(为了将该选项设置为空值)。
'option1=;'
STREAM 同步配置文件选项与其它选项不同,因为它的值包含 sub-list。例如:'STREAM=TCPIP{host=192.168.1.1;port=1234}'。这种情况下 'host=192.168.1.1;port=1234' 是 sub-list。添加或删除 sub-list 值,请使用在 STREAM sync-option-name 和 sub-option-name 之间的句点。例如,MERGE 'stream.port=5678;stream.host=;compression=zlib' 生成了如下同步配置文件:stream=TCPIP{port=5678;compression=zlib}。尝试将此流设置为新值将替换整个流的值。例如:MERGE 'stream=HTTPS' 生成了如下同步配置文件:stream=HTTPS{}。
'STREAM=TCPIP{host=192.168.1.1;port=1234}'
'host=192.168.1.1;port=1234'
MERGE 'stream.port=5678;stream.host=;compression=zlib'
stream=TCPIP{port=5678;compression=zlib}
MERGE 'stream=HTTPS'
无。
下面是 ALTER SYNCHRONIZATION PROFILE...REPLACE 语句的示例:
CREATE SYNCHRONIZATION PROFILE myProfile1; ALTER SYNCHRONIZATION PROFILE myProfile1 REPLACE 'publications=p1;uploadonly=on';
下面是 ALTER SYNCHRONIZATION PROFILE...MERGE 语句的示例。
CREATE SYNCHRONIZATION PROFILE myProfile2 'publications=p1; ALTER SYNCHRONIZATION PROFILE myProfile2 MERGE 'publications=p2;uploadonly=on';
以下示例说明了在使用不同的选项执行 ALTER SYNCHRONIZATION PROFILE 命令序列后所发生的变化。
假设 myProfile1='MobiLinkUID=mary;ScriptVersion=default'。
myProfile1='MobiLinkUID=mary;ScriptVersion=default'
执行 ALTER SYNCHRONIZATION PROFILE myProfile1 REPLACE 'MobiLinkPwd=sql;ScriptVersion=1' 后,myProfile1 为 'MobiLinkPwd=sql;ScriptVersion=1'。
ALTER SYNCHRONIZATION PROFILE myProfile1 REPLACE 'MobiLinkPwd=sql;ScriptVersion=1'
'MobiLinkPwd=sql;ScriptVersion=1'
执行 ALTER SYNCHRONIZATION PROFILE myProfile1 MERGE 'MobiLinkUID=mary;STREAM=tcpip' 后,myProfile1 为 'MobiLinkPwd=sql;ScriptVersion=1;MobiLinkUID=mary;STREAM=tcpip'。
ALTER SYNCHRONIZATION PROFILE myProfile1 MERGE 'MobiLinkUID=mary;STREAM=tcpip'
'MobiLinkPwd=sql;ScriptVersion=1;MobiLinkUID=mary;STREAM=tcpip'
执行 ALTER SYNCHRONIZATION PROFILE myProfile1 MERGE 'MobiLinkUID=;STREAM.host=192.168.1.1;STREAM.port=1234;ScriptVersion=;' 后,myProfile1 为 'MobiLinkPwd=sql;STREAM=tcpip{192.168.1.1;port=1234}'。
ALTER SYNCHRONIZATION PROFILE myProfile1 MERGE 'MobiLinkUID=;STREAM.host=192.168.1.1;STREAM.port=1234;ScriptVersion=;'
'MobiLinkPwd=sql;STREAM=tcpip{192.168.1.1;port=1234}'
执行 ALTER SYNCHRONIZATION PROFILE myProfile1 MERGE 'MobiLinkPwd=;Ping=yes;STREAM =HTTP' 后,myProfile1 为 'Ping=yes;STREAM=HTTP'。
ALTER SYNCHRONIZATION PROFILE myProfile1 MERGE 'MobiLinkPwd=;Ping=yes;STREAM =HTTP'
'Ping=yes;STREAM=HTTP'
执行 ALTER SYNCHRONIZATION PROFILE myProfile1 MERGE 'STREAM=HTTP{host=192.168.1.1}' 后,myProfile1 为 'Ping=yes;STREAM=HTTP{host=192.168.1.1}'。
ALTER SYNCHRONIZATION PROFILE myProfile1 MERGE 'STREAM=HTTP{host=192.168.1.1}'
'Ping=yes;STREAM=HTTP{host=192.168.1.1}'