The following errors are observed when running a “repair using” and using “where” clause in it:
sp_ctrl (alvsupu15:5438)> repair using config2 where "NUM_COL > 10"
Unknown option: 'where'
Usage: repair {source_owner}.{source_table}[.{partition}]
[not ({list of exceptions})]
[to {target_owner}.{target_table}[.{partition}]]
[at {target_host}[@o.{target_sid}]]
[for o.{source_sid}]
[key]
[onepass]
[orderby "{column_list}"]
[include "{column list}"]
[exclude "{column list}"]
[hint "{hint}"]
[where "{clause}"]
[threads {threads count}]
[parallelism {parallelism count}]
[sourcewhere "{clause}"]
[targetwhere "{clause}"]
[insertonly]
[log split]
[nosqllog]
[port {number}]
[on {host}] | [on {host}:{port}] |
[on {login}/{password}@{host}] |
[on {login}/{password}@{host}:{port}]
Usage: repair using {filename}
[key]
[onepass]
[threads {threads count}]
[parallelism {parallelism count}]
[insertonly]
[log split]
[on {host}] | [on {host}:{port}] |
[on {login}/{password}@{host}] |
[on {login}/{password}@{host}:{port}]
The option “where” is not supported in “repair using” command. The most plausible explanation is, there would normally be multiple tables in a config file used in the command so it is not possible to have a “where” clause that would satisfy all tables. The option is meant to be used to check if a column satisfies the stated condition so that the row can be repaired. However, since the command “repair using” operates on a config file, it is assumed that the config file will have multiple tables in it. So the “where” clause will not normally be expected to satisfy the multiple tables. This is the reason by design the option is not supported for this command. The same goes for the command “compare using”.
It is another thing that one may have a config file with only a single table, or the column specified in the “where” clause may exist in all tables forming part of the config specified. However, since the option is not supported, the command will not work even in such conditions that appear logical for the option to be used.
© ALL RIGHTS RESERVED. Terms of Use Privacy Cookie Preference Center