alter job

Changes the attributes of an existing job.

Syntax

To drop a job comparison:

alter job job_name 
	drop comparison comparison_name [and comparison_name2 […]]

To add a job comparison:

alter job job_name
add comparison comparison_name
set COMPARESET =compareset_name
[and set ABORT_DIFF_MAX [{to|=}] number_of_differences
[and set ABORT_DIFF_ROW_COUNT [{to|=}] {true|false}
[and set AUTO_RECONCILE [{to|=}] {true|false}
[and set COMPARE_MODE [{to|=}] {row_compare | key_compare | row_count} 
[and set COMPRESS_DATA_TRANSFER [{to|=}] {true|false}
[and set CREATE_COL_LOG [{to|=}] {true|false}
[and set CREATE_RECON_SCRIPT [{to|=}] {true|false}
[and set DESC [{to|=}] description
[and set ENABLE_ROW_COUNT [{to|=}] {true|false}
[and set EXTERNAL_SORT [{to|=}] {true|false}
[and set HASH_TYPE [{to|=}] {database_hash | agent_hash}
[and set NUM_PARTITIONS [{to|=}] number
[and set PRIORITY [{to|=}] {highest | high | normal | low}
[and set RETRY_DELAY_SEC [{to|=}] number_delay_second
[and set RETRY_DIFF [{to|=}] {never | wait_and_retry }
[and set RETRY_MAX [{to|=}] number_of_retries
]]]]]]]]]]]]]]]
[with column option
set column_name [{to|=}] {literal | column_hash | row_hash}
[set column_name [{to|=}] {literal | column_hash | row_hash}]
 […]]
 [and comparison comparison_name2
…]
To alter the job comparisons:
alter job job_name
alter comparison comparison_name
[and set ABORT_DIFF_MAX [{to|=}] number_of_differences
[and set ABORT_DIFF_ROW_COUNT [{to|=}] {true|false}
[and set AUTO_RECONCILE [{to|=}] {true|false}
[and set COMPARE_MODE [{to|=}] {row_compare | key_compare | row_count} 
[set COMPARESET =compareset_name
[and set COMPRESS_DATA_TRANSFER [{to|=}] {true|false}
[and set CREATE_COL_LOG [{to|=}] {true|false}
[and set CREATE_RECON_SCRIPT [{to|=}] {true|false}
[and set DESC [{to|=}] description
[and set ENABLE_ROW_COUNT  [{to|=}] {true|false}
[and set EXTERNAL_SORT [{to|=}] {true|false}
[and set HASH_TYPE [{to|=}] {database_hash | agent_hash}
[and set NUM_PARTITIONS [{to|=}] number
[and set PRIORITY [{to|=}] {highest | high | normal | low}
[and set RETRY_DELAY_SEC [{to|=}] number_delay_second
[and set RETRY_DIFF [{to|=}] {never | wait_and_retry }
[and set RETRY_MAX [{to|=}] number_of_retries
]]]]]]]]]]]]]]]]
To alter the column options in a job comparison:
alter job job_name
alter comparison comparison_name
with column option
set column_name [{to|=}] {literal | column_hash | row_hash}
[set column_name [{to|=}] {literal | column_hash | row_hash}]
 […]
To change the job options:
alter job job_name 
[[set MAX_CONCURRENT_COMPARISONS [{to|=}] number_of_max_concurrent_comparisons
[and set DESC [{to|=}] description]]
To change all the comparison options:
alter job job_name
alter  comparison option
set parameter [{to|=}] value
To enable a comparison:
alter job job_name enable comparison comparison_name
[ and comparison_name2[…]]
To disable a comparison:
alter job job_name disable comparison comparison_name
[ and comparison_name2[…]]
To add or alter the scheduling options:
alter job job_name
 
{add | alter} schedule schedule_name 
[set TYPE [{to|=}] {once | cron | every_day | every_week | every_month}
[and set EVERY [{to|=}] n
[and set DATE [{to|=}] date_value
[and set TIME [{to|=}] time_value
[and set KEEP [{to|=}] keep_value
[and set KEEP_UNIT [{to|=}] {day | week | month | forever}
[and set CRON [{to|=}] cron_value
[and set DESC [{to|=}] description
]]]]]]]]
     [and schedule schedule_name2
[set TYPE [{to|=}] {once | cron | every_day | every_week | every_month}
[and set EVERY [{to|=}] n
[and set DATE [{to|=}] date_value
[and set TIME [{to|=}] time_value
[and set KEEP [{to|=}] keep_value
[and set KEEP_UNIT [{to|=}] {day | week | month | forever}
[and set CRON [{to|=}] cron_value
[and set DESC [{to|=}] description
]]]]]]]]……]}
To drop the scheduling option:
alter job job_name 
drop schedule schedule_name[and schedule_name2[……]]

Parameters

Comparison Options

Parameter

Value

ABORT_DIFF_MAX

Aborts row comparison if the difference count exceeds the specified value.

Valid values: 1 to 9223372036854775807.

Default value:1000.

ABORT_DIFF_ROW_COUNT

Determines whether to abort row comparison if table row counts do not match.

Valid values: true or false.

Default value: false.

AUTO_RECONCILE

Indicates whether to automatically apply the reconciliation script.

Valid values: true or false.

Default value: false.

Note: To enable AUTO_RECONCILE, set CREATE_COL_LOG to true.

COMPARE_MODE

Specifies the row comparison mode.
  • row_compare – compares all table rows.
  • key_compare – compares the primary key columns.
  • row_count – compress row count.

Default value: row_compare.

COMPRESS_DATA_TRANSFER

Compresses the row data between the agent and the server.

Valid values: true or false.

Default value: false.

CREATE_COL_LOG

Generates a column differences log, which lists all missing, orphaned, and inconsistent row values (keys and columns). Create a column log if you want to:
  • Generate a reconciliation script
  • Perform automatic reconciliation
  • Generate a detailed report

Valid values: true or false.

Default value: false.

CREATE_RECON_SCRIPT

Generates a reconciliation script. To use this parameter, you must also set CREATE_COL_LOG to true.

Valid values: true or false.

Default value: false.

ENABLE_ROW_COUNT

Determines whether or not to count source and target table rows before they are compared. DA server uses the row count to estimate the comparison progress and end time.
Note: DA server counts rows if COMPARE_MODE is row_count. Use ENABLE_ROW_COUNT only if COMPARE_MODE is a value other than row_count.

Valid values: true or false.

Default value: true.

EXTERNAL_SORT

Sorts rows on the agent, thereby reducing the impact of processing the ORDER BY clause in the databases.

Valid values: true or false.

Default value: false.

HASH_TYPE

Specifies the hash type for the comparison.
  • database_hash – use the hash function provided by the database.
  • agent_hash – use the hash function provided by Replication Server Data Assurance Option.
Note: Set the hash type comparison option to agent_hash for heterogeneous comparison. The database_hash comparison option is used only for Adaptive Server-to-Adaptive Server comparisons.

Default value: database_hash.

NUM_PARTITIONS

Specifies the number of partitions for a table.

PRIORITY

Specifies the job comparison order in the comparison queue.

Valid values are:
  • highest
  • high
  • normal
  • low

Default value: normal.

RETRY_DIFF

Specifies the retry option.
  • never – no recompare.
  • wait_and_retry – run recompare based on RETRY_MAX and RETRY_DELAY_SEC settings.

Default value: never.

RETRY_DELAY_SEC

Specifies the number of seconds delay for each recomparison.

Valid values: 0 to 86400.

Default value: 10.

RETRY_MAX

Specifies the total number of recomparison for rows that have differences resulting from a previous comparison.

Valid values: 0 to 100.

Default value: 3.

Column Comparison Option
Column Option Value

COMPARE_MODE

Specifies for how each column is compared.
  • column_hash – compares using column hash value.
  • row_hash – compares all columns with this option together with a whole hash value.
  • literal – compares using column literal value.
Scheduling Options

Parameter

Value

date_value

Specifies a date in the scheduler.

time_value

Specifies a time in the scheduler.

keep_value

Specifies the number of keep units for which this schedule remains active.

cron_value

Specifies the cron option value in the scheduler.

Examples