You can create a Change Data Capture (CDC) policy using the Create CDC policy page.
Note: Before you begin, ensure that the database server is running and Change Data Capture is enabled.
To create a CDC policy:
1. For a new table, perform the following from the OpenEdge Management console menu:
a. Select Database Administration > Go to Database Administration. The Database Administration page appears.
b. From the list of database connections, select a connection for which you want to create a CDC policy. The selected database connection home page appears.
c. In the Storage Management section, either click Create Change Data Capture policy or click Change Data Capture Tables List > ADD CDC POLICY.
The Create Change Data Capture policy page appears, and the name of the selected database connection auto-populates in the Database connection field.
For an existing table, perform the following from the OpenEdge Management console menu:
a. Select Database Administration > Go to Database Administration. The Database Administration page appears.
b. From the list of database connections, select the connection for which you want to create a CDC policy.
c. In the Storage Management section, click Change Data Capture Tables List. The Change Data Capture Tables List page appears.
d. From the list, click any table name to see its details in the Change Data Table summary page, and then click ADD CHANGE DATA CAPTURE POLICY.
The Create Change Data Capture policy page appears, and the names of the selected database connection and the table auto-populates in their respective fields. You can use the Search icon in these fields to select a database and its corresponding table of your choice.
Provide the following information in the Create Change Data Capture policy page:
2. In the Policy name field, provide a unique name for the policy.
The policy name can be up to 32 characters long and must begin with a letter (A to Z). It can contain alphanumeric characters but must not contain blank spaces or special characters, except underscore (“_”) and hyphen (“-“).
3. (Optional) In the Description field, provide a description for the policy.
4. In the Database connection field, type the name of a database connection to which you want to add the new CDC policy or click Search to select a database connection from the Connections list dialog box.
Note: When typing the name of the database connection, follow the format that OpenEdge Management and OpenEdge Explorer use to define a connection: adminserver-name.database-name. A database server must be running to connect to the database.
5. In the Table field, type the name of a table or click Search to select a table from the Table list dialog box.
The dialog box displays a list of tables including the tables that are enabled for Multi-tenancy and Table Partitioning, and their schema names, PUB or non-PUB.
6. To set the level of data you want to capture when a change occurs in the source table, select the policy Level value as:
Minimal (0) — Indicates that a change has occurred but does not record any values.
Minimal with BitMap (1) — Indicates the changed fields but does not record any values.
Medium (2) — Records current values only.
Maximum (3) — Records both previous and current values.
Note: When creating a CDC policy with a policy level value greater than Minimal (0), you must add CDC fields to create a CDC field policy for that CDC policy. For more information, see Selecting Change Data Capture fields.
Note: The Encrypt policy, Identifying fields, Data area, Index area, Change table, and Change table owner options are enabled only when you select a level value greater than Minimal (0).
7. Select the internal state of the policy as Active or Inactive.
To create a pending policy, select State as Inactive, and to create a current policy, select State as Active.
8. Select the Encrypt policy check box to enable encryption on the change table using the same encryption policy that is in effect for the source table. This check box is selected by default.
9. Select the Identifying fields check box to mark the CDC fields as Identifying fields and create an index on the change table.
10. In the Data area field, type the name of a storage area where the change table is to be created or click Search to select an area from the Area Selection dialog box.
11. In the Index area field, type the name of a storage area where the change table indices are to be created or click Search to select an area from the Area Selection dialog box.
12. (Optional) In the Change table field, provide the name for the change table.
When you create a current policy or make a pending policy to a current policy, a change table is created with CDC_Source table name as its name by default. However, you can choose to provide a name for the change table in this field.
Note: For a source table that does not have an existing change table, creating a pending policy does not create a change table for that table.
Note: Each source table contains only one change table. Once a change table is created for a source table, it will be the change table for all the CDC policies that are newly created for that source table.
13. (Optional) In the Change table owner field, provide the name of the owner, PUB or non-PUB, with which you want to create the change table.
By default, the value is set to PUB.
14. (Optional) To generate an ABL API program for a CDC policy, click GENERATE POLICY PROGRAM, and then select a location to save the create_cdcpolicy.p file.
The Change Data Capture Table Summary page appears and displays the details of the table.
When creating a new current or pending policy for a source table that has an existing current policy and a change table, note that the change table of the existing current policy will be the change table for the new policy, and the existing current policy information is copied to the new policy. You can perform the following:
Provide the new policy name and its description in the Policy name and the Description fields respectively.
In the Create Change Data Capture policy page, all the fields for the new policy are auto-populated except these fields.
Change the Level and State for the new policy.
If the level of the existing current policy is Minimal (0), the level of the new policy will be Minimal (0) and it cannot be changed to other levels. If the level of the existing current policy is greater than Minimal (0), you can change the level of the new policy to any of the following levels: Minimal with BitMap (1), Medium (2), or Maximum (3).
Add CDC field policies to the new policy whose level is greater than Minimal (0), but you cannot edit the existing CDC fields.