GoldenGate OGG-01004 ORA-01400 Cannot insert null

OGG failure, ORA-01400, can not insert  null into "TEST". "TEST"
target-end replication process uses a configuration HANDLECOLLISIONS, this update configuration at the target end, if the data is not updated, will be converted into the insert UPDATE 
but because the source is not configured additional log all columns, so that no columns to be updated are not included in the insert, leading to an error 

made the following steps, where a temporary solution: 
1. the column is modified to null: alter table Modify col1 null Test; 
2. the replication process starts 
3. data check: select count (*) from test where col1 is null ( found eight) 
4. handling and manually synchronize the eight data 
5. the change field not null: alter table test modify col1 not null; 

final solution: additional columns requires the addition of all log table: table Test ALTER log the Add Supplemental Data (ALL) columns; 
the DDL operation is more dangerous in a production environment, suspend operation


MOS文档ID: Replicat Abends With Errror ORA-01400: Cannot Insert NULL Into Table for Not Null Columns When Specifying INSERTALLRECORDS (文档 ID 1994869.1)

                      REPLICAT Reports ORA-01400: Cannot Insert NULL When Using HANDLECOLLISIONS (文档 ID 1576900.1)

REPLICAT tried to UPDATE an existing row, but none was found, so due to parameter HANDLECOLLISIONS, the failed UPDATE was converted into an INSERT. 
That INSERT then failed because the Trail file did not have all the columns, because the record was for an UPDATE for 5 out of 15 columns, where the table on the Oracle database had the NOT NULL constraint set for all columns. 

Zhengzhou infertility hospital: HTTP: //jbk.39.net/yiyuanzaixian/zztjyy/
at The problem has been the cause is of at The Determined from at The following Points;

  • The REPLICAT report shows the message "... inserting a row into USER1.TABLE1 due to missing target row for a key update operation. "  
    where the key words are " missing target row for a key update ".  
    This means there was no row to UPDATE, for the change record found in the Trail file.

  • The REPLICAT had the HANDLECOLLISIONS parameter set.

  • The GoldenGate Reference Guide shows that when HANDLECOLLISIONS is used, failed UPDATE's will be converted into INSERT's  
    "If the row with the old key is not found in the target, the change record in the trail is converted to an insert".

  • The REPLICAT report finally shows that after the failed UPDATE was reported, the INSERT also failed.   
    The INSERT failed because the Trail file record only had 5 out of 15 columns, where the table is defined with NOT NULL on all the columns.   
    This then caused the Oracle database error: ORA-01400: cannot insert NULL...


Guess you like

Origin blog.51cto.com/14478010/2427429