Starts a MobiLink synchronization schema change.
SyntaxSTART SYNCHRONIZATION SCHEMA CHANGE FOR TABLES table-list [ set-script-version | set-script-version-on-subscription [ ... ] ]
set-script-version :
SET SCRIPT VERSION = script-versionset-script-version-on-subscription : SET SCRIPT VERSION = script-version ON SUBSCRIPTION subscription_name
script-version : string
subscription-name : identifier
ParametersFOR TABLES clause This clause specifies the tables that are affected by the schema change.
SET SCRIPT VERSION clause Specifies the new script version for all subscriptions that contain any table specified in the FOR TABLES clause. The new script version may be the same as the existing script version.
Cloud note: You can specify NULL for the script-version value for cloud tenant databases.
ON SUBSCRIPTION clause Specifies the new script version for specified subscription. When used, this clause must be repeated for each subscription that contains any table specified in the FOR TABLES clause. The new script version may be the same as the existing script version.
RemarksAll tables to which you want to apply a schema change must be listed in table-list. A table cannot be listed more than once. An error message is reported if there is an existing lock on any of the tables in table-list.
Only one synchronization schema change can be executed on a database at a time. The START SYNCHRONIZATION SCHEMA CHANGE statement fails when another schema change is in progress.
The database server obtains locks on all tables specified in table-list. The database server ignores the setting of the blocking option when attempting to obtain locks. If a lock cannot be obtained, all previously acquired locks are released and an error message is reported.
During a synchronization schema change:
You cannot execute a data manipulation statement.
You cannot execute additional START SYNCHRONIZATION SCHEMA CHANGE statements.
You can alter a publication to change the column subsetting of any table in table-list.
You can alter a publication to drop any table in table-list.
You can alter any of the tables listed in table-list.
An implicit commit is performed both before and after the START SYNCHRONIZATION SCHEMA CHANGE statement is executed. A synchronization schema change ends with the execution of a STOP SYNCHRONIZATION SCHEMA CHANGE statement. When the STOP SYNCHRONIZATION SCHEMA CHANGE statement is executed, all table locks are released.
PermissionsDBA authority
Side effectsNone.
See also
Standards and compatibilitySQL/2008 Vendor extension.
ExampleThe following sequence of SQL statements illustrates how to use START SYNCHRONIZATION SCHEMA CHANGE and STOP SYNCHRONIZATION SCHEMA CHANGE:
START SYNCHRONIZATION SCHEMA CHANGE FOR TABLES DBA.Sales, DBA.Products SET SCRIPT VERSION = 'version_2'; ALTER TABLE DBA.Sales ADD SUBTOTAL NUMERIC (10,2); ALTER TABLE DBA.Products ALTER QUANTITY BIGINT; STOP SYNCHRONIZATION SCHEMA CHANGE; |
![]() |
Discuss this page in DocCommentXchange.
|
Copyright © 2012, iAnywhere Solutions, Inc. - SQL Anywhere 12.0.1 |
