Friday, May 29, 2009

Troubleshooting Apply problems

Troubleshooting Apply problems
1) If Apply process is not applying changes as expected:
a. Please make sure that the apply process is enabled.
b. Please make sure that the apply Queue receiving the messages to be applied.
c. Please check the apply errors in error queue.
2) Common Apply Issues:
a) a) ORA-1403 no data found: It occurs typically when apply process try to update a row using old values in lcr and the lcr’s old values do not match with the current values in the destination table. This can be avoided either using apply parameter “_CMPKEY_ONLY” set to ‘Y’ and executing the apply errors OR alternatively by manually updating the destination table data to match the old values of the LCR. Please see metalink note 265201.1.
SQL> select * from dba_apply_error;APPLY_NAME QUEUE_NAME------------------------------ ------------------------------QUEUE_OWNER LOCAL_TRANSACTION_ID------------------------------ ----------------------SOURCE_DATABASE--------------------------------------------------------------------------------SOURCE_TRANSACTION_ID SOURCE_COMMIT_SCN MESSAGE_NUMBER ERROR_NUMBER---------------------- ----------------- -------------- ------------ERROR_MESSAGE--------------------------------------------------------------------------------RECIPIENT_ID RECIPIENT_NAME MESSAGE_COUNT ERROR_CREATION_------------ ------------------------------ ------------- ---------------COR_APPL01 CNRTD_QSTRMADMIN 12.46.4005CNRT22.9.5528 7.0903E+10 1 1403ORA-01403: no data found88 STRMADMIN 1 20-APR-07
SQL> set serveroutput onSQL> exec print_transaction('12.46.4005');
----- Local Transaction ID: 12.46.4005----- Source Database: CNRT----Error in Message: 1----Error Number: 1403----Message Text: ORA-01403: no data found --message: 1type name: SYS.LCR$_ROW_RECORDsource database: CNRTowner: STRMADMINobject: HEART_BEATis tag null: Ycommand_type: UPDATESCN: 70903367413COMMIT SCN:old(1): ID1old(2): MSG_TIME20-APR-07 07.34.56.000000 PMnew(1): MSG_TIME20-APR-07 07.35.40.000000 PM
PL/SQL procedure successfully completed.
SQL> select * from heart_beat;ID MSG_TIME---------- -------------------------------------1 19-APR-07 07.46.08.000000 PM
SQL> exec dbms_apply_adm.set_parameter('COR_APPL01','_CMPKEY_ONLY','Y');PL/SQL procedure successfully completed.
SQL> exec dbms_apply_Adm.execute_all_errors;PL/SQL procedure successfully completed.
SQL> select * from dba_apply_error; no rows selected
SQL> exec dbms_apply_adm.set_parameter('COR_APPL01','_CMPKEY_ONLY','N');PL/SQL procedure successfully completed.
b) ORA-26687: no instantiation SCN provided forin source database . Please make sure that the object on source database prepared for instantiation.
select table_name, scn, SUPPLEMENTAL_LOG_DATA_PK PK, SUPPLEMENTAL_LOG_DATA_UI UK, SUPPLEMENTAL_LOG_DATA_FK FK, SUPPLEMENTAL_LOG_DATA_ALL as "ALL"from DBA_CAPTURE_PREPARED_TABLES where table_name = ‘tabname';’;
c)

No comments:

Post a Comment