Replication Agent

Replication Agent products

Replication Agent products extend the capabilities of Replication Server by supporting non-Sybase data servers as primary data servers in a Sybase replication system.

Sybase offers the following Replication Agent products for non-Sybase databases:

Replication Agent for DB2 UDB

Replication Agent for DB2 UDB fits into a replication system as follows:

The DB2 data server logs any changes to rows in DB2 tables as they occur. The information written to the transaction log includes copies of the data before and after the changes. In DB2, these records are known as “undo” and “redo” records. Control records are written for commits and aborts. These records are translated to commit and rollback operations.

The DB2 log consists of a series of data sets, which Sybase Log Extract uses to identify DB2 data changes. Because DB2 writes change records to the active log as they occur, Sybase Log Extract can process the log records immediately after they are entered.

Replication Agent

Replication Agent is the component that captures data-changing transactions in DB2 Universal Database, Microsoft SQL Server, or Oracle primary databases on Linux, UNIX, and Microsoft Windows platforms by reading the database transaction log.

Replication Agent is implemented in the Java programming language. During Replication Agent installation a Java Runtime Environment (JRE) is installed on the computer that will act as the Replication Agent host machine.

Replication Agent uses the Java Database Connectivity (JDBC) protocol for all of its communications. It uses a single instance of the Sybase JDBC driver (jConnect™ for JDBC™) to manage all of its connections to Open Client and Open Server applications, including the primary Replication Server. In the case of the primary data server, Replication Agent connects to the primary database using the appropriate JDBC driver for that database.

How Replication Agent works

A Replication Agent is a Replication Server client that retrieves information from the transaction log for a primary database and formats it for the primary Replication Server.

After the desired primary tables and stored procedures are marked in the Replication Agent, it detects changes to primary data and, using Log Transfer Language (LTL), which is a subset of Replication Control Language (RCL), sends changes in primary data to the primary Replication Server.

A Replication Agent performs the following steps:

  1. Logs in to the Replication Server.

  2. Sends a connect source command to identify the session as a log transfer source and to specify the database for which transaction information will be transferred.

  3. Retrieves the name of the Maintenance User for the database from the Replication Server.

  4. Requests the secondary truncation point for the database from the Replication Server.

    This request returns a value, called the origin queue ID, that the Replication Agent uses to find the location in the transaction log, where it will begin transferring transaction operations. The Replication Server has already received operations up to this location.

  5. Retrieves records from the transaction log, beginning at the record following the secondary truncation point, and formats the information into LTL commands.