Changes or displays the configuration parameters for the RepAgent thread for an Adaptive Server database.
sp_config_rep_agent [dbname [, {'enable', 'repserver_name', 'repserver_username', 'repserver_password'} | 'disable'[, 'preserve secondary truncpt'] | 'rs servername'[, 'repserver_name'] | 'rs username'[, 'repserver_username'] | 'rs password'[, 'repserver_password'] | 'scan batch size'[,'no_of_qualifying_log_records'] | 'scan timeout'[, 'scan_timeout_in_seconds'] | 'retry timeout'[, 'retry_timeout_in_seconds'] | 'skip ltl errors'[, 'true' | 'false'] | 'batch ltl'[, 'true' | 'false'] | 'send warm standby xacts'[, 'true' | 'false'] | 'send buffer size’[, ‘2K’ | ‘4K’ |’8K’ | ‘16K’] | 'connect dataserver'[, 'connect_dataserver_name'] | 'connect database'[, 'connect_database_name'] | 'send maint xacts to replicate'[, 'true' | 'false'] | 'send structured oqids’[, ‘true’ | ‘false’] | 'short ltl keywords'[, 'true' | 'false'] | 'security mechanism'[, 'mechanism_name'] | 'unified login'[, 'true' | 'false'] | 'mutual authentication'[, 'true' | 'false'] | 'msg confidentiality'[, 'true' | 'false'] | 'msg integrity'[, 'true' | 'false'] | 'msg replay detection'[, 'true' | 'false'] | 'msg origin check'[, 'true' | 'false'] | 'msg out-of-sequence check'[, 'true' | 'false'] | 'skip unsupported features'[, 'true' | 'false'] | 'schema cache growth factor'[, 'growth_factor_value'] | 'ha failover'[, 'true' |'false'] | 'data limits filter mode'[, 'off' | 'stop' | 'skip' |'truncate'] | 'priority'[, 'priority_value'] | 'startup delay’[, 'delay_value'] | 'net password encryption’[, ‘true’ | ‘false’] | 'cluster instance name'[, 'coordinator' | 'instance_name'] | 'bind to engine'[, engine_number] | 'ltl batch size'[, ltl_batch_size] | 'ltl metadata reduction', {'true' |'false'} 'multithread rep agent', {'true' | 'false'} 'number of send buffers', {'num_of_send_buffers'} | 'max number replication paths', {'max number replication paths value'} 'ddl path for unbound objects', {'all' | 'default'} | 'auto start', {'true' | 'false'}]
This command encodes the Replication Server password and inserts the Replication Server name, Replication Server user, and encoded password into the sysattributes table of the specified database.
If network-based security is enabled and you want to establish unified login, you must specify NULL for repserver_password when enabling RepAgent at the database.
Use disable only when downgrading the Replication Server to an earlier version or changing the primary database to another status. This command truncates all RepAgent entries in the sysattributes table.
RepAgent continues to query Replication Server until Replication Server acknowledges previously sent records either by sending a new secondary truncation point or extending the transaction log.
If Replication Server has acknowledged all records and no new transaction records have arrived at the log, RepAgent sleeps until the transaction log is extended.
The default value is 2K.
off – RepAgent allows all log records to pass through.
stop – RepAgent shuts down if it encounters log records containing wide data.
skip – RepAgent skips log records containing wide data and posts a message to the error log.
truncate – RepAgent truncates wide data to the maximum the Replication Server can handle.
The default value of data limits filter mode depends on the Replication Server version number. For Replication Server versions 12.1 and earlier, the default value is “stop.” For Replication Server versions 12.5 and later, the default value is “off.”
You can improve RepAgent performance by increasing the LTL batch size to a bigger number. At the end of each LTL batch, RepAgent checks for errors in the previous batch. Increasing the LTL batch size, decreases the number of times RepAgent checks for LTL errors.
Set to true to enable table metadata reduction in RepAgent and automatically enable the Executor command cache in Replication Server. The default is false.
Set to true enable multithreaded RepAgent which uses separate threads for the RepAgent scanner and sender activities, and is a prerequisite for building multiple primary replication paths. The default is false.
Sets the maximum number of paths that you allow RepAgent to use to replicate data out of the primary database through multiple replication paths. RepAgent generates one RepAgent sender thread for each RepAgent path.
Range of valid values: 1 to the value of MAXINT which is 2,147,483,647 paths. The default is 1.
If max number replication paths is less than the number of paths with replication objects bound to the paths, RepAgent reports an error and terminates.
To build multiple primary replication paths, enable multithreaded RepAgent with the multithread rep agent RepAgent parameter.
Sets the maximum number of send buffers that the scanner and sender tasks of multithreaded RepAgent can use when you configure for multi-path replication.
Range of valid values: 50 to the value of MAXINT which is 2,147,483,647 buffers. The default is 50 buffers.
To build multiple primary replication paths, enable multithreaded RepAgent with the multithread rep agent RepAgent parameter.
sp_config_rep_agent pubs2, 'enable', 'repsvr1', 'repusr1', 'reppwd1'
sp_config_rep_agent pubs2
Parameter Name Default Config Value Run Value ---------------------- --------- --------------- ------------- priority 5 5 5 trace flags 0 0 0 scan timeout 15 15 15 retry timeout 60 60 60 rs username n/a rs1_user rs1_user batch ltl true true true rs servername n/a rs1 rs1 send buffer size 2k 4k 4k trace log file n/a n/a n/a connect database n/a n/a pdb1 connect dataserver n/a n/a pds1 scan batch size 1000 1000 1000 security mechanism n/a n/a n/a msg integrity false false false unified login false false false schema cache growth factor 1 1 1 skip ltl errors false false false msg origin check false false false short ltl keywords false false false msg confidentiality false false false data limits filter mode stop stop stop msg replay detection false false false mutual authentication false false false send structured oqids false false false send warm standby xacts false false false msg out-of-sequence check false false false skip unsupported features false false false send maint xacts to replicate false false false net password encryption true true true startup delay 0 5 5 cluster instance name coordinator coordinator coordinator bind to engine -1 2 2 ltl batch size 16384 16384 16384
sp_config_rep_agent pubs2, 'scan batch size'
Parameter Name Default Config Value Run Value ---------------------- --------- --------------- ------------- scan batch size 1000 1000 1000
sp_config_rep_agent pubs2, 'scan timeout', '60'
sp_config_rep_agent pubs2, 'startup delay', '50'
1> sp_config_rep_agent pdb, 'cluster instance name','ASE1' 2> go
Parameter Name Default Config Value Run Value ---------------------- ----------- --------------- ------------- cluster instance name coordinator ASE1 ASE1
Use sp_config_rep_agent to configure RepAgent for Adaptive Server databases.
Refer to the Adaptive Server Enterprise Reference Manual for more information about sp_addserver.
After you configure the parameters using sp_config_rep_agent, you must restart RepAgent using sp_start_rep_agent for the new parameters to take effect.
If you execute sp_config_rep_agent without parameters, Adaptive Server displays the default, configured, and runtime values for all databases that are enabled for RepAgent.
If you only enter dbname, Adaptive Server displays the default, configured, and runtime values for the specified database.
Properties specified by sp_config_rep_agent are stored in the sysattributes table of the database and have an attribute class of RA.
Use sp_config_rep_agent to set the RepAgent configuration parameters after you have enabled RepAgent at the data server using sp_configure.
repserver_user must have connect source permission.
Configuring Network-Based Security
A security mechanism may not support all security properties. Verify the properties of a security mechanism by executing admin security_property at the Replication Server. For more information, see admin security_property.
The security mechanism enabled for the RepAgent must be the same as that enabled for the Replication Server. Security settings at the RepAgent and the Replication Server must be compatible.
If unified_login is “true,” you must specify the rs_password parameter as NULL when RepAgent is enabled at the database.
If you specify one or more security settings, but do not specify a security mechanism, Adaptive Server initializes the default mechanism, the first entry in the SECURITY section in $SYBASE/$SYBASE_ASE/config/libtcl.cfg.