Add uncataloged tables - connect_cdc_sqdata - Latest

Connect CDC (SQData) Change Data Capture

Product type
Software
Portfolio
Integrate
Product family
Connect
Product
Connect > Connect CDC (SQData)
Version
Latest
Language
English
Product name
Connect CDC (SQData)
Title
Connect CDC (SQData) Change Data Capture
Copyright
2024
First publish date
2000
Last updated
2024-11-25
Published on
2024-11-25T15:05:48.570404

Occasionally it may be convenient to add a table to the Capture Agent Configuration (.cab) file before it is present in the Db2 Catalog. This scenario might occur when a new Db2 Business application is being implemented. The tables will have been created in the test environment for the new application and because a downstream application will requires that data to be captured, the capture configuration in the test environment has also been updated so the downstream application can also be tested.

While the normal capture configuration maintenance process supports adding tables and marking them Inactive and then subsequently changing them to Active, they must be in the Db2 Catalog even when they are marked Inactive. Because the scale of implementation is large it would be desirable to create or more likely update the production capture configuration in advance. That can be accomplished by adding the table with a Pending status (--pending) rather than Inactive, which would cause the capture to immediately fail because the production catalog did not yet contain those tables.

The SQDCONF Utility will be used to add the Pending tables and later to modify the configuration when it is time for them to be activated.

Syntax
sqdconf add <cab_file_name>
--schema=<name> --table=<name> | --key=<name>
--datastore=<url>
[--pending]
Keyword and Parameter Descriptions
Keyword Description
<cab_file_name>= Must be specified and must match the name specified in a previous create command.
--schema=<name> Schema name, owner, or qualifier of a table. Different databases use different semantics, but a table is usually uniquely identified as S.T where S is referenced here as schema. This parameter cannot be specified with --key.

--table=<name>

A qualified table name in the form of schema.name that identifies the source. This may be used in place of two parameters, --schema and --table. Both cannot be specified. In our example the first table is SQDATA.EMP
--key=<name>

Same as --table

--datastore=<url> | -d <url>
While most references to the term datastore describe physical entities, a datastore URL represents a target subscription and takes the form: cdc://[localhost]/<agent_alias>/<target_name> where:
  • <host_name> - Optional, typically specified as either cdc:///... or cdc://[localhost | localhost IP]... since we are describing the server side of the socket connection.
  • <agent_alias> The alias name assigned to the Capture/Publisher agent and must match the <agent_name> defined in the Controller Daemon sqdagents.cfg configuration file. Engine scripts will use the <agent_alias> when specifying the source "URL" and also on sqdmon <agent_name> display commands.
  • <target_name> The subscriber name presented by a requesting target agent. Also referred to as the Engine name, the name provided here does not need to match the one specified in a local Controller Daemon sqdagents.cfg configuration file. In our example we have used DB2TODB2.
[--pending]

This parameter allows a table to be added to the configuration before it exists in the database catalog.

Note: Like any table being added, if there are multiple target datastores (Engines), an add command must be processed for each individual table/datastore pair.

Finally, when it is time to begin to capture the new tables, use the modify command to change the status of the tables from Pending to Active (or Inactive).

Syntax
sqdconf modify <cab_file_name>
--schema=<name> --table=<name> | --key=<name>
[--active | --inactive]
Keyword and Parameter Descriptions
Keyword Description
<cab_file_name>=

Must be specified and must match the name specified in a previous create command.

--schema=<name>

Schema name, owner, or qualifier of a table. Different databases use different semantics, but a table is usually uniquely identified as S.T where S is referenced here as schema. This parameter cannot be specified with --key.

--table=<name>

A qualified table name in the form of schema.name that identifies the source. This may be used in place of two parameters, --schema and --table. Both cannot be specified. In our example the first table is SQDATA.EMP

--key=<name>

Same as --table

[--active | --inactive]

This parameter marks the added source active for capture when the change is applied and the agent is (re)started. If this parameter is not specified the default is --inactive.

Notes:

  • The sqdconf modify command only needs to be run once for each Pending table regardless of the number of datastores (Engines) subscribed.
  • Like all modifications to the Capture Agent Configuration (.cab) file the must be activated, see Applying the Configuration File changes.