This article delves on the replication of alter table to add, drop or alter indexes.
This is a new functionality added in version 7.0.
Shareplex 7.5 and up replicates ALTER TABLE to add, drop or alter Index when the table is in the active configuration and SP_OCT_REPLICATE_DDL = 3 AND SP_OCT_REPLICATE_ALL_DDL = 0.
Set SP_OCT_REPLICATE_DDL = 3 AND SP_OCT_REPLICATE_ALL_DDL = 0.
**********************
Here is the description of the parameter SP_OCT_REPLICATE_DDL:
**********************
SP_OCT_REPLICATE_DDL
For objects in replication, this parameter enables you to selectively turn on or off the
replication of ALTER TABLE DDL and TRUNCATE TABLE DDL. At the default of 3,
all ALTER TABLE DDL and TRUNCATE TABLE DDL performed against a table is
replicated. Other options constrain replication to ALTER TABLE DDL only or TRUNCATE
TABLE DDL only. You may also disable the replication of both.
The replication of DDL may also be impacted through the use of the
SP_OCT_REPLICATE_ALL_DDL parameter.
Note:Partition object DDL is not replicated when the SP_OCT_REPLICATE_DDL and
SP_OCT_REPLICATE_ALL_DDL parameters are both disabled, i.e., when both are set
to zero (0).
Default: 3 (replicate DDL and TRUNCATE)
Range of valid values:
0 (disable replication of both ALTER and TRUNCATE)
1 (enable ALTER replication only)
2 (enable TRUNCATE replication only)
3 (enable replication of DDL and TRUNCATE)
Takes effect: immediately
**********************
SP_OCT_REPLICATE_ALL_DDL
For objectnotin replication, this parameter enables you to turn on or off the replication
of DDL.
Enabling this parameter requires identical source and target databases in order for DDL
to execute successfully on the target system. SharePlex replicates all supported DDL for
all schema objects and accounts, so those components must exist in the target database
for the operations to succeed. If your environment meets this requirement, you can
enable this parameter.
To configure the Post process to stop for errors encountered when applying replicated
DDL operations to the target database, set the SP_OPO_STOP_ON_DDL_ERR parameter
(seepage 266).
If you are replicating the creation of package or stored procedures, the name of the
objects in the body of the package or stored procedure should be fully qualified since
other users or schemas may execute this package or stored procedure.
For a list of operations supported by SharePlex, see the Release Notes that correspond to
your version of SharePlex.
Default: 0 (off)
Range of valid values: 0 or 1 (flag)
Takes effect: immediately
Note:Partition object DDL is not replicated when the SP_OCT_REPLICATE_DDL and
SP_OCT_REPLICATE_ALL_DDL parameters are both disabled, i.e., when both are set
to zero (0).
There is no option to selectively disable replication of "alter table add constraint" but keep other DDL replication.