Is it possible to cancel a job for a specific table within a file when "compare using" or “repair using” is run on it?
When compare or repair is on a file containing multiple tables, it is not possible to selectively kill compare/repair on a specific table(s). It has to be all or none, namely, one has to kill the complete compare/repair job or let the job finish. The following illustrates the point:
I have a config file containing two tables as below:
sp_ctrl (alvsupl14:9111)> view config file_name
datasource:o.ORA11GR2
#source tables target tables routing map
sha91.table1 sha91.table1 alvsupl18@o.ORA11GR2
sha91.table2 sha91.table2 alvsupl18@o.ORA11GR2
I issue “compare using” on that file to sync the two tables contained in that file:
sp_ctrl (alvsupl14:9111)> compare using file_name
comparing 2 of 2 objects
compare started; job id 5
sp_ctrl (alvsupl14:9111)> compare status detail
Job ID : 5
PID : 27939
Host : alvsupl14
Started : 20-MAR-18 15:19:11
Job Type : Compare
Status : Processing - 0 objects completed
Table ID : 5.1
Table : "SHA91"."TABLE1"
From : alvsupl14@o.ORA11GR2
To : "SHA91"."TABLE1" 10.1.23.155@o.ORA11GR2
Started : 20-MAR-18 15:19:14
Percent complete : N/A
Total Rows : 5
Rows processed : N/A
Status : Time lock
Status Elapsed : 2:06
Total Elapsed : 2:07
Table ID : 5.2
Table : "SHA91"."TABLE2"
From : alvsupl14@o.ORA11GR2
To : "SHA91"."TABLE2" 10.1.23.155@o.ORA11GR2
Started : 20-MAR-18 15:19:14
Percent complete : N/A
Total Rows : 0
Rows processed : N/A
Status : Time lock
Status Elapsed : 2:06
Total Elapsed : 2:07
I try to kill the compare job for the first table by providing the value <table_id> in the “cancel” command but the option does not work:
sp_ctrl (alvsupl14:9111)> cancel 5.1
Invalid job id: 5.1
I finally decide to kill the job associated with the “compare using” by specifying the job id as below and it succeeds:
sp_ctrl (alvsupl14:9111)> cancel 5
Canceled job 5