Starts a MobiLink synchronization schema change.
START SYNCHRONIZATION SCHEMA CHANGE FOR TABLES table-list set-script-version | set-script-version-on-subscription, ...
set-script-version :
SET SCRIPT VERSION = script-version
set-script-version-on-subscription : SET SCRIPT VERSION = script-version ON SUBSCRIPTION subscription_name
script-version : string | NULL
subscription-name : identifier
This clause specifies the tables that are affected by the schema change.
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.
Specifies the new script version for the specified subscription. When used, this clause must be repeated, separated by commas, 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.
All 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.
You must have the SYS_REPLICATION_ADMIN_ROLE system role.
None.
Not in the standard.
The following sequence of SQL statements illustrates how to use START SYNCHRONIZATION SCHEMA CHANGE and STOP SYNCHRONIZATION SCHEMA CHANGE:
START SYNCHRONIZATION SCHEMA CHANGE FOR TABLES GROUPO.SalesOrders, GROUPO.Products SET SCRIPT VERSION = 'version_2' ON SUBSCRIPTION sub1, SET SCRIPT VERSION = 'version_2' ON SUBSCRIPTION sub2; ALTER TABLE GROUPO.SalesOrders ADD SUBTOTAL NUMERIC (10,2); ALTER TABLE GROUPO.Products ALTER QUANTITY BIGINT; STOP SYNCHRONIZATION SCHEMA CHANGE;