add trandata user.table

When configuring OGG, need to be added to the synchronization table supplemental logging, the command line ggsci 
add trandata user.table 

This actually contains two meanings: 
. 1) Table PK or UK has, based on the target side can accurately PK or UK DML update to find the source of the data, to synchronize the target side. 
2) table and no PK UK, the end goal only to find the source of the data in accordance with DML update all the columns in the table, so synchronization at the target side. 

OGG corresponding to this command, there is an equivalent syntax * PLUS in the SQL: 
. 1) and the meaning equivalent to the first layer syntax (main or unique key) 
ALTER Supplemental Table user.table the Add Group ggs_table_1 log (the PK or UK) Always; 
2) and the second meaning equivalent syntax (no primary key and a unique key) 
ALTER Supplemental log table user.table the Add Group ggs_table_1 (All column) Always; 

when a column of the table when the field is more than 32, the use of add trandata the error will be: 
the WARNING OGG-00706 Failed to log the Add Supplemental user.table Due to the Table Group ON ORA-02 257: Number the maximum of the Columns exceeded Number of ...... 
this time, it is necessary to use: 
the ALTER the Table user.table the Add Supplemental log ... this way before.
This time was divided into two cases: 
the first case is more than 32 columns, but the main or unique key:
alter table user.table add supplemental log group ggs_table_1 (PK or UK) always; 
the second column is the case more than 32, no unique key and a primary key: 
ALTER Supplemental Table user.table the Add Group ggs_table_1 log (All column <32) Always; 
alter table user.table add supplemental log group ggs_table_2 (all colum> 32) always;

  

Guess you like

Origin www.cnblogs.com/vmsysjack/p/12286199.html