The cdc_startcapture() function

Specifies the data to start capturing from a table.

If the capture session is both open and active (you have run the cdc_activatesess() function), data capture starts immediately on the specified columns in the specified table. Otherwise, data capture starts when you activate the open capture session.

The DB_LOCALE environment variable must be set to the same locale as the database locale when you run this function.

A row is added in the syscdctabs table associated with the specified session ID and table.

Syntax


1  cdc_startcapture ( session_ID , MBZ , "database:owner.table_name","+ , column_name"  , user_data )

Function arguments

Table 1. cdc_startcapture() arguments
Argument Data Type Description
session_ID INTEGER The session ID of an open capture session.
MBZ BIGNIT Must be 0. Reserved.
database:owner.table_name LVARCHAR The qualified name of the table from which to capture data. The qualified name includes the following elements:
database
The name of the database in which the table exists.
owner
The name of the owner of the table.
table
The name of the table.
column_name LVARCHAR A comma-separated list of column names in the specified table, from which to capture data.
user_data INTEGER The table identifier.

Usage

Use the cdc_startcapture() function to specify a table and columns within that table from which to start capturing data. You cannot include columns with simple large objects, user-defined data types, or collection data types.

The table identifier is a number you use in your application to uniquely identify each table that will participate in data capture.

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.