_Policy-Instance Field
|
Values and their meaning
|
0
|
0 means this is a current instance of the policy and a Change table may be in existence for this policy depending on policy level. This is the policy that is loaded to the CDC cache and used during data capture by the database triggers.
|
1
|
1 means this is a previous instance of the policy.
If the policy level of the policy required a Change Table, it remains in existence even if the current policy is not adding to it.
A previous policy can represent historical data capture.
|
2
|
2 means this is a pending instance of the policy. The pending policy occurs when a user has not finished editing a policy and will continue at some other point in time.
|
Source Table Schema Changes Supported
|
Action Required
|
Change to the Table Policy with an instance of “current” - Level field can be altered to specify either more or less detail in the captured data.
|
Commit change and it becomes immediately in effect.
|
Add a field to an existing Source Table.
When the new field is added to the Source Table a Change Tracking record with an operation code “add field” is created. In addition, the Change Table’s field map will reflect the newly added fields.
|
Commit schema change. In order to capture the new field, add a new Table/Field policy set that includes the new field. Upon creation, the new policy becomes the current instance and the old policy becomes the previous instance. As soon as this happens, the database triggers will begin to capture data against the new policy and use the existing Change Table.
|
Delete a field to an existing Source Table.
When the new field is added to the Source Table a Change Tracking record with an operation code “add field” is created. In addition, the Change Table’s field map will reflect the newly added fields.
|
Commit change schema change. From the point the field is removed from the Source Table, the deleted field in the change record will no longer contain values.
If a source field participates in an identifying field in the Change Table, it cannot be deleted. The policy(s) containing this field must be deleted (as well as the Change Table itself) before this field can be dropped.
|
Table Rename of Source Table.
|
A change of a table name does not require a change to the Table policies because the Source Table recid is stored in the policy, rather than the table name.
|
Field Rename of field in Source Table that is being tracked in a field policy.
|
Field rename is allowed, the field policy does not store field names. The Change Table does use the field name to name the Change fields, so field renames must cascade through the Change Table schema.
This action is restricted to an offline operation because it requires a Database Schema lock.
|
Source table is dropped by Language Drop syntax.
|
This operation requires that the policies are already deleted. Act of dropping table does not remove records in the Change Tracking Table.
|
Source partition is dropped
|
No effect on data capture activity. The capture is based on the Source table and not a specific partition so capture proceeds as usual.
|
Source partition is renamed.
|
Both the languages and a utility can rename a partition. The act of renaming a partition does not change the partitionId, so this has no effect on CDC capture activities.
|
Change
|
Action Required
|
Change to the Table Policy with an instance of “current” - Level field can be altered to specify either more or less detail in the captured data.
|
Commit change and it becomes immediate.
|
If a Table Policy is marked as in the “Pending” instance and the _Object-Id field is set to zero, the table policy can be altered.
|
Change the table policy. Add/delete field policies. This may occur when a policy was being constructed and was not “finished” and made “current”. This policy can be revisited until it is made to be the current policy.
|
A field policy may be added, deleted, or changed so long as the parent Table Policy is in the “Pending” instance and its _Object-Id field is set to zero. An object Id of zero means the Change Table associated with the policies have not been created yet.
|
Change field policy.
|
Deleting Table/Field Policy Sets.
Note: The intention for this operation is that it is a cascading delete operation. All table and field policies and the Change Table will be deleted at once.
|
Can occur on a Table policy regardless of state or instance. Does not delete related records in the Change Tracking Table.
|
Change
|
Action Required
|
If a Change Table was created without an Identifying Field Index, a new Identifying Index cannot be added to the Change Table.
|
Existing Policy Sets cannot be altered to add a new index. A new policy is required for this table and the old one must be retired.
|
If a Change Table was created with an Identifying Field Index, the Identifying Field Index cannot be deleted from the Change Table.
|
Existing Policy Sets cannot be altered to delete an index. A new policy is required for this table and the old one must be retired. An alternative to this situation would be to deactivate the index.
|
Identifying fields (which are components of the Identify Field Index) cannot be altered or added to an existing Table and Field policy set.
|
A new policy is required for this table and the old one must be retired.
|