The cdc_activatesess() function

For an open capture session, starts capturing data from the specified log and log position.

The syscdcsess table is updated when the session is activated.

Syntax


1  cdc_activatesess ( session_ID , position )

Function arguments

Table 1. The cdc_activatesess() arguments
Argument Data Type Description
session_ID INTEGER The session ID of the open capture session for which to start capturing data.
position BIGINT Must be 0 or the restart position.

Usage

After you open a session with the cdc_opensess() function, you use the cdc_activatesess() function to start capturing data at the specified log position. If you are starting data capture on a table for the first time, the position must be 0. If you have previously performed data capture, you can restart data capture where it left off by specifying a sequence number of a CDC record returned in the previous capture session.

You must call this function from a client application. You cannot call this function from a user-defined routine that runs within the database server.

Return values

If successful, returns 0.

If unsuccessful, returns an integer corresponding to an error code and updates the syscdcsess table with the error information.