Disables or enables the Distributor thread for a logical connection, changes attributes of a logical connection, and enables or disables replication of truncate table to the standby database.
alter logical connection to logical_ds.logical_db { set distribution {on | off} | set logical_database_param to 'value' }
The data server name for the logical connection.
The database name for the logical connection.
Enables the Distributor thread for the logical connection.
Disables the Distributor thread for the logical connection.
The name of a configuration parameter that affects logical connections. Table 3-15 describes the parameters you can set with alter logical connection.
A setting for a configuration parameter that matches the parameter. value is a character string.
logical_database_param |
value |
---|---|
dist_stop_unsupported_cmd |
Use dist_stop_unsupported_cmd to set DIST to suspend itself or to continue running when it encounters commands not supported by downstream Replication Server. When dist_stop_unsupported_cmd is on, DIST suspends itself if a command is not supported by downstream Replication Server. If it is off, DIST ignores the unsupported command. Regardless of dist_stop_unsupported_cmd parameter’s setting, Replication Server always logs an error message when it sees the first instance of a higher version command that cannot be sent over to a lower version Replication Server. Default: off |
materialization_save_interval |
Materialization queue save interval. This parameter is only used for standby databases in a warm standby application. Default: “strict” for standby databases |
replicate_minimal_columns |
Specifies whether Replication Server should send all replication definition columns for all transactions or only those needed to perform update or delete operations at the standby database. Values are “on” and “off.” Replication Server uses this value in standby situations only when a replication definition does not contain a “send standby” option with any parameter. Otherwise, Replication Server uses the value of the “replicate minimal columns” or “replicate all columns” parameter in the replication definition. Default: on |
save_interval |
The number of minutes that the Replication Server saves messages after they have been successfully passed to the destination data server. See the Replication Server Administration Guide Volume 2 for details. Default: 0 minutes |
send_standby_repdef_cols |
Specifies which columns Replication Server should send to the standby database for a logical connection. Overrides “send standby” options in the replication definition that tell Replication Server which table columns to send to the standby database. Values are:
Default: check_repdef |
send_truncate_table |
Specifies whether to enable or disable replication of truncate table to standby database. Values are:
|
Disables the distributor thread for the LDS.pubs2 logical connection:
alter logical connection to LDS.pubs2 set distribution off
Changes the save interval for the LDS.pubs2 logical connection to “0,” allowing messages in the DSI queue for the logical connection to be deleted:
alter logical connection to LDS.pubs2 set save_interval to '0'
Enables the replication of truncate table to the standby database:
alter logical connection to LDS.pubs2 set send_truncate_table to 'on'
To copy truncate table to a warm standby database, set the send_truncate_table option to “on.”
Set the send_truncate_table option to “on” only when both the active and warm standby databases are at Adaptive Server version 11.5 or later.
If you specify the send_truncate_table to on clause, Replication Server copies the execution of truncate table to the warm standby database for all tables marked for replication.
If the warm standby database was created before you installed or upgraded to Replication Server version 11.5 or 12.0, send_truncate_table is set to “off” by default. Make “off” the default for send_truncate_table to preserve compatibility with existing warm standby applications. You must set send_truncate_table to “on” for Replication Server to copy truncate_table to the warm standby database.
Use the alter logical connection command to disable the Distributor thread after you set up a warm standby application. When you add a database to the replication system, Replication Server creates a Distributor thread to process subscriptions for the data.
Use the set distribution off clause to disable the Distributor thread for a logical connection. Use this option when you have set up a warm standby for a database but there are no subscriptions for the data in the database, and if the database is not a source of replicated stored procedure execution. Such a logical database may be a warm standby application that does not involve normal replication, or it may be a logical replicate database.
Use set distribution on to start the Distributor thread for a logical connection after you disable it with set distribution off. Do this to create replication definitions and subscriptions for the data in the logical database, or to initiate replicated stored procedures in the logical database.
You can suspend or resume a Distributor thread for a physical or logical database connection using the suspend distributor and resume distributor commands.
See the Replication Server Administration Guide Volume 1 and Volume 2 for more information about setting up and managing warm standby applications.
You can set parameters that affect all logical connections originating at the current Replication Server with the configure replication server command.
The save_interval parameter for a logical connection is set to 'strict,’ by default, when the logical connection is created. This ensures that messages are not deleted from DSI queues before they are applied to the standby database.
If the standby database is not available for a long period of time, Replication Server’s queues may fill. To avoid this, change save_interval from 'strict' to “0” (minutes). This allows Replication Server to delete the queues.
WARNING! The save_interval parameter affects only the DSI queue. The materialization_save_interval parameter affects only currently existing materialization queues. They should only be reset under serious conditions caused by a lack of stable queue space. Resetting it (from 'strict' to a given number of minutes) may lead to message loss at the standby database. Replication Server cannot detect this type of loss; you must verify the integrity of the standby database yourself.
The materialization_save_interval parameter for a logical connection is set to 'strict,’ by default, when the logical connection is created. This ensures that messages are not deleted from materialization queues before they are applied to the standby database.
If the standby database is not available for a long period of time, Replication Server’s queues may fill. To avoid this, change materialization_save_interval from 'strict' to “0” (minutes). This allows Replication Server to delete the queues.
admin logical_status, configure replication server, create logical connection, resume distributor, suspend distributor