Product Documentation

User-Defined Extensions for Replication

Previous Topic

Next Topic

Replication Events

The Replication Agent calls the corresponding callback function in the external library when the following events occur:

Replication Agent State Change Events:

  • Start agent: The Replication Agent is starting.
  • Connected to source: The Replication Agent successfully connected to the source server.
  • Connected to target: The Replication Agent successfully connected to the target server.
  • Lost connection to source: The Replication Agent has lost its connection to the source server.
  • Lost connection to target: The Replication Agent has lost its connection to the target server.
  • Disconnecting from source: The Replication Agent is disconnecting from the source server.
  • Disconnecting from target: The Replication Agent is disconnecting from the target server.
  • Terminating agent: The Replication Agent is terminating due to an unhandled error.
  • Pause agent: The Replication Agent has been requested to pause its operation.
  • Resume agent: The Replication Agent has been requested to resume its operation.
  • Stop agent: The Replication Agent is shutting down.

File Events:

  • Open file: The Replication Agent is opening a replicated file on the target server.
  • After file open: Replication Agent has successfully opened a replicated file on target server.
  • Close file: The Replication Agent is closing a replicated file on the target server.
  • Alter schema: The Replication Agent is performing an alter schema operation on a replicated file the target server.

Transaction Events:

  • Start transaction: The Replication Agent is starting a transaction on the target server.
  • Commit transaction: The Replication Agent is committing a transaction on the target server.
  • Abort transaction: The Replication Agent is aborting a transaction on the target server.
  • User-defined log entry: Replication Agent is processing a user-defined log entry operation.
  • Checkpoint: The Replication Agent is processing a checkpoint log entry.

Data Events:

  • Add record: The Replication Agent is adding a record to a replicated file on the target server.
  • Update record: Replication Agent is updating a record in a replicated file on the target server.
  • Delete record: Replication Agent is deleting a record from a replicated file on target server.
  • Deferred key: The Replication Agent is processing a deferred key log entry.

Exception Events:

  • Exception: An action performed by the Replication Agent has failed.

The next sections describe the events available in the library.

Note: The external library must provide a function named rxOnStartAgent() for the Start agent event. All other callbacks are all optional: they do not need to exist in your external library.

In This Chapter

Replication Agent State Change Event Details

File Event Details

Transaction Event Details

Data Event Details

Exception Event Details

TOCIndex