Skip to content
K M S

SAP Replication TopTips

  • by

Table of Contents

Document Revision 2.0

Introduction & Disclaimer

Repserver Components

Components List

More Detailed Look at the Components

Repserver BASICS

Table Defs Install

 

Warm Standby Install

 

 

 

 

 

Document Revision 2.0

Introduction & Disclaimer

The notes contained in this document are intended as a fast find guide to using SAP Replication server and have been built up over my time using reperver in the real world.  It is not intended to be a complete exploration of all of replication server’s abilities, nor do I claim that all the notes are without error.  If you find errors or would like to submit your own top tip for the next edition of this guide, then please email me at garrett.devine@dbxperts.co.uk

 

Repserver Components

 

Components List

  • SQM (Stable Queue Manager) to manage inserts/deletes and prevent duplicates. One per Queue
  • LTM, Log Transfer Manager. Reads the transaction log.
  • Inbound queue. Holds transactions from LTM. ‘admin who, sqm’ shows these, e.g. 456:1. the ‘:1’ means inbound
  • Outbound queue. Holds trans. to be replicated ‘admin who, sqm’ shows these, e.g. 457:0. the ‘:0’ means outbound. Has 2 types of queue. Data Server Interface (DSI) and Replication Server Interface (RSI), used across routes.
  • Distributor (DIST). Matches repdefs with subscriptions, so messages applied correctly to replicate. One DIST thread per inbound queue.

 

  • SQT (Stable Queue Transaction Manager) ensures queues are accessed in transactional manner. SQT has 4 queues:-
    •  Open queue that holds transactions until commit or rollback is read from LTM
    •  Closed queue holds completed transactions.
    •  Read queue holds data that has been read from the Closed queue and a receipt of the transaction received. Tran is then removed from queue.
    •  Truncation queue holds ‘begin tran’ record. Queue is used to determine which transactions can be deleted.

 

More Detailed Look at the Components

Admin who, sqm.         First Seg.Block – Last Seg.Block = data in queue (Mb).  Next Read is the next segment, block & row to be read from queue.

Admin who, sqt.        First Trans gives queue status. st=status of 1st command, cmds=no of commands in transaction. qid=seg:block:row where tran starts. Full – if non-zero, sqt_max_cache_size too small.

Sqt_max_cache_size        cache available to SQT. Need 1M per queue. (Ensure value of

sqt_max_xcache_size * num. of queues is less than memory_limit)

DIST                        matched repdefs with subs. 3 components. SRE: matched repdefs with

Subs. TD: packages transactions. MD: delivers messages if routes

Involved. ‘admin who, dist’ gives totals of commands processed &

ignored.

DSI                        reads committed commands (in SQT closed queue) and applies them to

replicate DB. Prevents dumplicates. Groups transactions to

replicate. Grouping defined by dsi_zact_group_size &

dsi_cmd_batch_size.

RSI                        Routes between repservers across WANs

 

Examine replication environment

sp_setreptable  –in pdb

admin rssd_name  — in RS

admin who        — in RS

admin logical_status  — in RS

rs_helprep     — in RSSD

rs_helpdbrep     — in RSSD

rs_helpdb      — in RSSD

rs_helproute   — in RSSD

rs_helpsub     — in RSSD, details table subscriptions

rs_helpdbsub     — in RSSD

rs_helppubsub     — in RSSD, if using publications

rs_helpdbpub     — in RSSD, details publication subscriptions, articles and subscibers

rs_helpuser     — in RSSD

 

To look at current connection settings, use ‘admin config’.

admin config [,[{“connection” | logical_connection}, data_server, database] |

[“route”, repserver]] [, configuration_name]

 

Example:-

admin config, “connection”, <servername>, <dbname>, dsi_quoted_identifier

 

 

 

Repserver BASICS

If you use rs_init to configure replication and it fails, you can sometimes get more information out of the rs_init log files. These are located at $SYBASE/$SYBASE_REP/init/logs

General Install

Use rs_init to install repserver & set up the RSSD. Create stable queue files first (using ‘touch’). Once this is complete, you need to add connections to the primary and replicate dataservers and databases.  See the sections below on how to do this.  To use the GUI (rs_init), create a rep maint user in the DB using sp_adduser. Remove this later and add as alias to dbo using sp_addalias.