Product Documentation

User-Defined Extensions for Replication

Previous Topic

Next Topic

rxEVENT

Replication Agent event structure (rxEVENT):

typedef struct _rxevent {

LONG versn; /* [IN] version of this structure */

LONG errcod; /* [IN] Error code */

pctCNXH psrccnxhnd; /* [IN] Source server connection handle */

pctCNXH ptgtcnxhnd; /* [IN] Target server connection handle */

pVOID pusrctx; /* [OUT] User context pointer */

RXACT action; /* [OUT] Set to action to take */

union {

rxVEROP verop; /* [IN] Parameters for version check */

rxFILOP filop; /* [IN] Parameters for file events */

rxTRNOP trnop; /* [IN] Parameters for transaction events */

rxDATOP datop; /* [IN] Parameters for data events */

rxEXCOP excop; /* [IN] Parameters for exceptions */

} ev;

  • Input: Structure version
  • Input: Error code for the current event
  • Input: Source server connection handle - Can be used to call Replication API functions such as ctReplOpenFile() on the source server.
  • Input: Target server connection handle - Can be used to call Replication API functions such as ctReplOpenFile() on the target server.
  • Input: Replication Agent unique ID.
  • Input: Source server name.
  • Input: Target server name.
  • Input: Source server node ID.
  • Input: Target server node ID.
  • Input: One of the following structures (described following this section), depending on the type of event:
    • rxVEROP - For the Start agent callback
    • rxFILOP - For file operation callbacks
    • rxTRNOP - For transaction operation callbacks
    • rxDATOP - For data operation callbacks
    • rxEXCOP - For exception callbacks
  • Output: Optional user-defined context pointer - Can be used to store a pointer to memory allocated by the external library.
  • Output: Action to take for this event. Supported actions are:
    • RXA_DEFAULT - Perform the default action for this event.
    • RXA_SKIP - Skip the default action for this event. For some events this action has no effect; that is, it is treated as RXA_DEFAULT. In the table of events below.
    • RXA_SHUTDOWN - Shut down the Replication Agent.

TOCIndex