What is the significance of the option “log rowdata” in Compare?
When running compare or repair, an SQL file is created on Target containing the SQL statements required to bring the Target table into sync with the Source table.
The SQL statements contain data in the form of hash values which cannot be applied directly to the Target table. Since they are generated by a hash algorithm, it is not possible to convert them to the SQL statements to be applied to the Target.
If you wish to generate an SQL file with the actual values then use the “log rowdata” option when executing Compare.
Here is sample syntax, assuming the Source and Target table names are same, and Source is replicating to only one Target:
On Source:
sp_ctrl> compare OWNER.TABLE_NAME log rowdata
The following shows the difference in contents of the SQL file between the default and “log rowdata” options:
Default option:
sp_ctrl> compare OWNER.TABLE_NAME
declt_*.sql contents: (Located in Target /vardir/log directory):
/* source rowid='AAA+7wAAHAAAKrVAAA' */
insert into "OWNER"."TABLE_NAME" A (
hash_val1,
hash_val2
) values (
'2342552567'
,'0');
/*;;*/
'log rowdata' option:
sp_ctrl> compare OWNER.TABLE_NAME log rowdata
declt_*.sql contents: (Located in Target /vardir/log directory):
/* source rowid='AAA+7wAAHAAAKrVAAA' */
insert into "OWNER"."TABLE_NAME" A (
"NUM_COL",
"VAR_COL"
) values (
'1'
,'TEST');
/*;;*/