alter compareset

Changes the attributes of an existing compareset. alter compareset fails if the compareset you are modifying is being used in an executing job.

Syntax

To alter description:
alter compareset compareset_name [force]
set desc [{to|=}] description

To drop a target table:

alter compareset compareset_name [force]
drop target target_connection_name owner_name
target_table_name
[and target_connection_name owner_name
target_table_name …]

To add a target connection:

alter compareset compareset_name  [force]
	add target target_connection_name owner_name 
target_table_name target_alias [where “constraint”]
[and target target_connection_name owner_name 
target_table_name target_alias2 where “constraint”]...] 
map 
    source.column_name = target_alias.column_name 
[ = target_alias2.column_name ...], 
[and source.column_name = target_alias2.column_name 
[ = target_alias2.column_name ...]…]

To drop a column mapping:

alter compareset compareset_name [force]
drop map source_column_name [and source_column_name…]

To add a column mapping:

alter compareset compareset_name  [force]
	with target target_connection_name owner_name 
target_table_name target_alias 
[and target target_connection_name owner_name 
target_table_name target_alias2]] 
add map 
    source.column_name = {target1}target_alias.column_name 
[ = {target2}target_alias2.column_name] [set key=true], 
[and source.column_name = {target1}target_alias2.column_name 
[ = {target2}target_alias2.column_name] [set key=true]…]

To alter a where constraint:

alter compareset compareset_name  [force]
[alter source where constraint]
[alter target target_connection_name owner_name
target_table_name where constraint]
Note: You cannot modify the source where constraint and the target where constraint at the same time.

To drop a where constraint:

alter compareset compareset_name  [force]
[alter source where “”]
[alter target target_connection_name owner_name
target_table_name where “”]

To alter key columns:

alter compareset compareset_name  [force]
alter map
source.column_name set key {false | true}
[source.column_name set key {false | true}...]

Parameters

Examples

Usage

  • If you do not redefine the target alias, you can use the keywords “target1” and “target2” to refer to the target tables; the sequence must be consistent with the definition used when you created the compareset.

  • When using the add map clause in alter compareset, you must include all the target connections.