Configuring RepAgent

Enabling RepAgent (using rs_init or sp_config_rep_agent) sets default configuration parameters. You can change the default parameters using sp_config_rep_agent. You must restart RepAgent for the new parameters to take effect.

Table 5-1 describes the configuration parameters that affect RepAgent. These parameters are stored in the sysattributes table of the database for which RepAgent is enabled.

If your system supports network-based security, refer to “Managing network-based security” for a list and description of network security configuration parameters for RepAgent.

Table 5-1: Configuration parameters affecting RepAgent

Configuration parameter

Description

batch ltl

When set to true, sends LTL commands to Replication Server in batches. Otherwise, sends LTL commands to Replication Server one at a time. Default: true

connect database

The name of the database for which RepAgent is configured, or the name of the temporary database RepAgent uses when connecting to Replication Server in recovery mode.

connect dataserver

The name of the RepAgent data server or the name of the temporary data server RepAgent uses when connecting to Replication Server in recovery mode.

data limits filter mode

Specifies how RepAgent handles log records containing column counts greater than 250, column lengths greater than 255 bytes, and parameter lengths greater that 255 bytes before attempting to send them to Replication Server. Values are:

  • off – RepAgent allows all records to pass through. In Replication 12.1 and earlier, this setting can cause undesirable effects.

  • stop – RepAgent shuts down if it encounters log records containing data that exceeds limits of Replication Server 12.1 and earlier.

  • skip – RepAgent skips log records containing data that exceeds limits of Replication Server 12.1 and earlier and posts message to error log.

  • truncate – RepAgent truncates data exceeding 255 bytes per column and 250 columns per table.

Default: off (Replication Server 12.5 and later); stop (Replication Server 12.1 and earlier)

ha failover

Specifies whether, when Sybase Failover has been installed, RepAgent automatically starts after server failover.

Default: true

net password encryption

In Adaptive Server 15.0.2, when this parameter is set to true, RepAgent sets both the CS_SEC_ENCRYPTION and the CS_SEC_EXTENDED_ENCRYPTION connection properties. Otherwise, none of these properties are set.

Default: true

NoteIf unified login or mutual authentication security properties are set, net password encryption parameter will be ignored, since these security properties are using credentials for authentication.

priority

Sets relative priority values for individual RepAgents. Recommended values are 4, 5, and 6, where 6 indicates low priority, 5 indicates medium priority, and 4 indicates high priority.

Default: 5

rs name

The name of the Replication Server to which RepAgent connects and transfers transactions from the transaction log. Use rs name when you have changed the name of the Replication Server.

rs password

The password RepAgent uses to log in to Replication Server. Use rs password when you want to change the RepAgent password.

rs username

The user name RepAgent uses to log in to Replication Server. Use rs_username when you want to change the RepAgent username.

retry timeout

The number of seconds RepAgent remains inactive before attempting to reconnect to Replication Server after a recoverable error or when Replication Server is down.

Default: 60 seconds

scan batch size

The maximum number of log records to send to Replication Server in each batch. When this number of records have been sent, RepAgent asks Replication Server for a new secondary truncation point.

Default: 1000 records

scan timeout

The amount of time RepAgent remains inactive after sending a batch to the Replication Server and before querying the Replication Server for the new secondary truncation point. If there are more records in the log, RepAgent resumes scanning. If there are no more records and the Replication Server has still not acknowledged receipt by sending a secondary truncation point, RepAgent again timeouts for the length of time this parameter is set to. Default: 15 seconds

schema cache growth factor

Controls the duration of time table or stored procedure schema can reside in the RepAgent schema cache before they expire. Larger values require more memory. Range is 1 to 10.

Default: 1

send buffer_size

Controls the size, in kilobytes, of the send buffer RepAgent uses to communicate with Replication Server. Values are 2K, 4K, 8K, and 16K.

Default: 2K

NoteSend-buffer size is not related to database page size.

send maint xacts to replicate

When set to true, RepAgent sends records generated by the maintenance user to the Replication Server for distribution to subscribing sites. Otherwise, RepAgent does not send records from the maintenance user to the Replication Server.

Default: false

send structured oqids

Specifies whether RepAgent sends origin queue IDs (OQIDs) as structured tokens or as binary strings. When set to true, RepAgent sends OQIDS as structured tokens, which saves space in the LTL and improves throughput.

Default: false

send warm standby xacts

Normally schema and system transactions are not sent to a warm standby database. When set to true, RepAgent sends schema, system, and maintenance-user transactions. Otherwise, RepAgent does not send transactions to the standby database.

Default: false

short ltl keywords

Specifies whether RepAgent sends an abbreviated form of LTL to Replication Server. When set to true, RepAgent uses the shortened LTL form that requires less space and reduces the amount of data sent to Replication Server.

Default: true

skip ltl errors

When set to true, RepAgent ignores LTL errors returned by the Replication Server. This option is normally turned on during recovery.

Default: false

skip unsupported features

Instructs RepAgent to skip log records for features unsupported by the Replication Server. This option is normally used if Replication Server is a earlier version than Adaptive Server.

Default: false

startup delay

Controls when a specific RepAgent is started during Adaptive Server start-up. This delays the RepAgent startup by a specified duration to allow Replication Server to run before RepAgent attempts to connect to Replication Server. By default, the RepAgent starts without any delay during automatic start-up. Setting a value in seconds results in a delay in RepAgent start-up by the specified number of seconds.

Default: 0 (zero) seconds.

To configure RepAgent, log in to Adaptive Server and execute sp_config_rep_agent at the isql prompt. For complete syntax and usage information, see the Replication Server Reference Manual.

Execute sp_config_rep_agent once for each parameter you want to configure. For example, to change the maximum number of log records sent to Replication Server in a batch to 2000, perform these steps:

  1. Log in to Adaptive Server and enter:

    use dbname
    
    go
    
    sp_config_rep_agent dbname, ‘scan batch size’,
    ’2000’
    
  2. Restart RepAgent:

    sp_start_rep_agent dbname
    

    The new parameter takes effect after you restart RepAgent.

Refer to “Starting RepAgent” for more information about sp_start_rep_agent.