Changes the attributes of an existing compareset. alter compareset fails if the compareset you are modifying is being used in an executing job.
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 …]
This command also deletes all partition boundary values stored for this compareset.
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]
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}...]
alter compareset cust_orders drop target conn_bak1 cust_owner cust_orders go
alter compareset cust_orders drop map id and cust_id go
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.