Show TOC

alter logical connectionLocate this document in the navigation structure

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.

Syntax
alter logical connection
   to <logical_ds>.<logical_db >{
   set distribution {on | off} |
   set <logical_database_param> to '<value>'}
Parameters
logical_ds

The data server name for the logical connection.

logical_db

The database name for the logical connection.

distribution on

Enables the Distributor thread for the logical connection.

distribution off

Disables the Distributor thread for the logical connection.

logical_database_param

The name of a configuration parameter that affects logical connections. Configuration parameters affecting logical connections describes the parameters you can set with alter logical connection.

value

A setting for a configuration parameter that matches the parameter. <value> is a character string.

Table 1: Configuration Parameters Affecting Logical Connections

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 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, or if there is no replication definition at all.

Otherwise, Replication Server uses the value of the “replicate minimal columns” or “replicate all columns” parameter in the replication definition.

Default: on

When you set dsi_compile_enable to ‘on’, Replication Server ignores what you set for replicate_minimal_columns.

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:
  • on – send only the table columns that appear in the matching replication definition. Ignore the “send standby” option in the replication definition.

  • off – send all table columns to the standby. Ignore the “send standby” option in the replication definition.

  • check_repdef – send all table columns to the standby based on “send standby” option.

Default: check_repdef

send_truncate_table

Specifies whether to enable or disable replication of truncate table to standby database. Values are:
  • on – enables replication of truncate table to standby database. This is the default.

  • off – disables replication of truncate table to standby database.

ws_sqldml_replication

Specifies whether to replicate SQL statements to warm standby data servers. Values are:
  • on – replicates SQL statements. The default statements replicated are update, delete, insert select, and select into.

  • off – ignores all SQL statements.

    Note

    ws_sqldml_replication has lower precedence than the table replication definition for SQL replication. If your table replication definition contains send standby clause for a table, this clause determines whether or not to replicate the DML statements, except select into, regardless of the ws_sqldml_replication parameter setting.

Examples
Example 1

Disables the distributor thread for the LDS<.pubs2> logical connection:

alter logical connection to LDS.pubs2
 set distribution off
Example 2

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'
Example 3

Enables the replication of truncate table to the standby database:

alter logical connection to LDS.pubs2
 set send_truncate_table to 'on'
Usage
  • 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.

  • 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.

    Caution

    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.