Document Type | Troubleshooting
Category | Administration
Applicable Product Versions | 5SP1FS01, 5SP1FS02, 5SP1FS03, 5SP1FS04, 5SP1FS06, 6FS01, 6FS02, 6FS03, 6FS04, 6FS05, 6FS06, 6FS07, 6FS07PS, 7FS01, 7FS02
Document Number | PADTS001
Issue
In Prosync 4.4.0, even though the parameter NO_DCR_TABLE_SKIP_ERROR=Y is set, the related errors are not properly skipped.
Cause
After the DISCARD_YN parameter was newly introduced, since its function is similar to the existing NO_DCR_TABLE_SKIP_ERROR parameter, the NO_DCR_TABLE_SKIP_ERROR parameter was removed from Prosync versions after 4.3.4.
Solutions
If you want to use the existing NO_DCR_TABLE_SKIP_ERROR parameter, you should use the DISCARD_YN parameter instead of NO_DCR_TABLE_SKIP_ERROR.
Guide for DISCARD_YN Related Parameters
Parameter | Function |
|---|---|
DISCARD_YN | - Parameter to turn the discard function on or off - Default value is N |
DISCARD_EC | - Parameter to specify error codes to discard - No default value; for "no data found" error, error code 2 is used ex) DISCARD_EC=(2 10007 8026) [up to 256 codes] |
DISCARD_FILE_YN | - Parameter to enable or disable logging of discard details to a discard file when discard occurs - Default value is N |
DISCARD_FILE_SIZE | - Parameter to specify the maximum size of the discard file - Default value is 100M |
DISCARD_FILE_DIR | - Parameter to specify the storage location of the discard file - Default value is set the same as the LOG_DIR parameter |
DISCARD_BACKUP_DIR | - Parameter to specify the location where the discard file is backed up when its size exceeds the limit - Default value is set to DISCARD_FILE_DIR/backup path |
DISCARD_BACKUP_SIZE | - Parameter to specify the size of the backup directory - Default value is 0 [unlimited] |
Example of Parameter Usage
1. Performing DML on a table where data differs
To cause a NO DATA FOUND error, delete data that exists only in the Source.
Since a row with c1=2 exists in the Source but not in the Target, a "NO DATA FOUND" error occurs on the Target Prosync side during synchronization.
Source
SQL> select * from t1;
C1 C2 C3
---------- -------------------- -----------------
3 test test
1 ํ
์คํธ ํํ
2 test test
SQL> delete from t1 where c1=2;
1 row deleted.
SQL> commit;
Commit complete.
SQL> select * from t1;
C1 C2 C3
---------- -------------------- --------------------
3 test test
1 ํ
์คํธ ํํTarget
SQL> select * from t1;
C1 C2 C3
---------- --------------- --------------
1 ํ
์คํธ ํํ
3 test test
SQL>
SQL>
SQL>
SQL>
SQL> select * from t1;
C1 C2 C3
---------- --------------- --------------
1 ํ
์คํธ ํํ
3 test test2. Check error logs in Apply logs
After deleting data that does not exist in the Target, you can confirm that a "NO DATA FOUND" error occurred in the Apply logs.
[05-01T21:35:03.802986] [REP-04] [T] replay delete (obj_id:238123, col_cnt:3) [05-01T21:35:03.803025] [REP-04] [T] execute delete (DELETE FROM "TIBERO"."T1" WHERE "C1" = :"C1" AND "C2" = :"C2" AND "C3" = :"C3" AND ROWNUM = 1) [05-01T21:35:03.803034] [REP-04] [D] prepare SQL (DELETE FROM "TIBERO"."T1" WHERE "C1" = :"C1" AND "C2" = :"C2" AND "C3" = :"C3" AND ROWNUM = 1) [05-01T21:35:03.803063] [REP-04] [D] natparam #1 (type:NUMBER, len:3) [05-01T21:35:03.803071] [REP-04] [D] 0000: 02 c1 82 ... [05-01T21:35:03.803085] [REP-04] [D] natparam #2 (type:VARCHAR, len:4) [05-01T21:35:03.803091] [REP-04] [D] 0000: 74 65 73 74 test [05-01T21:35:03.803099] [REP-04] [D] natparam #3 (type:VARCHAR, len:4) [05-01T21:35:03.803105] [REP-04] [D] 0000: 74 65 73 74 test [05-01T21:35:03.803690] [REP-04] [T] no data found [05-01T21:35:03.803699] [REP-04] [E] DELETE: no data found [prs_apply_replay.c:3575] [05-01T21:35:03.803706] [REP-04] [T] send ipc (type:PRS_IPC_ERROR_LOG, tid:0, key:0 src_id:-1) [05-01T21:35:03.803713] [REP-04] [E] Replay delete failed.(xid: 3940649673949184, stmt: DELETE FROM "TIBERO"."T1" WHERE "C1" = :"C1" AND "C2" = :"C2" AND "C3" = :"C3" AND ROWNUM = 1) [prs_apply_replay.c:3608]
3. Add DISCARD related parameters to Apply configuration and restart Prosync
Set the error codes you want to skip in the DISCARD_EC parameter, then restart Prosync to apply.
################################################################################
#
# ProSync (Apply) Initialization Parameters
#
################################################################################
LOG_LEVEL=5
PRS_USER=US_PROSYNC_G2I
PRS_PWD=#encrypted
APPLY_NUM=1
TAR_DB_TYPE=TIBERO
TAR_DB_NAME=tibero7_2
SRC_DB_CNT=1
#MAP=(TABLE DEFAULT)
#DDL=(INCLUDE DEFAULT, TYPE=('ALTER TABLE','TRUNCATE TABLE'))
MAP=(TABLE DEFAULT
#TABLE TIBERO.PKY,TIBERO.PKY RESOLVE BY SOURCE
#TABLE TIBERO.T3,TIBERO.T3 RESOLVE BY SOURC
)
DDL=(EXCLUDE ALL, TYPE=('ALTER TABLE','TRUNCATE TABLE'))
LOG_DIR=/idiska/pub1/jsh/7.2.2/0423/prosync4/var/US_PROSYNC_G2I/log
LOG_BACKUP_DIR=/idiska/pub1/jsh/7.2.2/0423/prosync4/var/US_PROSYNC_G2I/log/backup
LOG_BACKUP_SIZE=5G
USE_PK_FOR_WHERE=Y
DISCARD_YN=Y
DISCARD_EC=(2)
DISCARD_FILE_YN=Y [05-01T21:48:11.637779] [REP-04] [T] replay delete (obj_id:238123, col_cnt:3) [05-01T21:48:11.637811] [REP-04] [T] execute delete (DELETE FROM "TIBERO"."T1" WHERE "C1" = :"C1" AND "C2" = :"C2" AND "C3" = :"C3" AND ROWNUM = 1) [05-01T21:48:11.637814] [REP-04] [D] prepare SQL (DELETE FROM "TIBERO"."T1" WHERE "C1" = :"C1" AND "C2" = :"C2" AND "C3" = :"C3" AND ROWNUM = 1) [05-01T21:48:11.637822] [REP-04] [D] natparam #1 (type:NUMBER, len:3) [05-01T21:48:11.637826] [REP-04] [D] 0000: 02 c1 82 ... [05-01T21:48:11.637840] [REP-04] [D] natparam #2 (type:VARCHAR, len:4) [05-01T21:48:11.637843] [REP-04] [D] 0000: 74 65 73 74 test [05-01T21:48:11.637847] [REP-04] [D] natparam #3 (type:VARCHAR, len:4) [05-01T21:48:11.637849] [REP-04] [D] 0000: 74 65 73 74 test [05-01T21:48:11.638213] [REP-04] [T] no data found [05-01T21:48:11.638222] [REP-04] [E] DELETE: no data found [prs_apply_replay.c:3575] [05-01T21:48:11.638229] [REP-04] [T] send ipc (type:PRS_IPC_ERROR_LOG, tid:0, key:0 src_id:-1) [05-01T21:48:11.638235] [REP-04] [E] Replay delete failed.(xid: 3940649673949184, stmt: DELETE FROM "TIBERO"."T1" WHERE "C1" = :"C1" AND "C2" = :"C2" AND "C3" = :"C3" AND ROWNUM = 1) [prs_apply_replay.c:3608] [05-01T21:48:11.638240] [REP-04] [T] send ipc (type:PRS_IPC_ERROR_LOG, tid:0, key:0 src_id:-1) [05-01T21:48:11.638266] [CTH-00] [T] event occurred (fd:16, type:1, idx:0) [05-01T21:48:11.638269] [REP-04] [E] unable to get error code (rc:100) [prs_apply_replay.c:3622] [05-01T21:48:11.638284] [REP-04] [E] Error discarded : no data found [prs_apply_replay.c:3641]
4. Check Apply logs
Confirm the "Error discarded" message in the Apply logs.
This message means that the DML which caused the error was skipped.
[05-01T21:48:11.637779] [REP-04] [T] replay delete (obj_id:238123, col_cnt:3) [05-01T21:48:11.637811] [REP-04] [T] execute delete (DELETE FROM "TIBERO"."T1" WHERE "C1" = :"C1" AND "C2" = :"C2" AND "C3" = :"C3" AND ROWNUM = 1) [05-01T21:48:11.637814] [REP-04] [D] prepare SQL (DELETE FROM "TIBERO"."T1" WHERE "C1" = :"C1" AND "C2" = :"C2" AND "C3" = :"C3" AND ROWNUM = 1) [05-01T21:48:11.637822] [REP-04] [D] natparam #1 (type:NUMBER, len:3) [05-01T21:48:11.637826] [REP-04] [D] 0000: 02 c1 82 ... [05-01T21:48:11.637840] [REP-04] [D] natparam #2 (type:VARCHAR, len:4) [05-01T21:48:11.637843] [REP-04] [D] 0000: 74 65 73 74 test [05-01T21:48:11.637847] [REP-04] [D] natparam #3 (type:VARCHAR, len:4) [05-01T21:48:11.637849] [REP-04] [D] 0000: 74 65 73 74 test [05-01T21:48:11.638213] [REP-04] [T] no data found [05-01T21:48:11.638222] [REP-04] [E] DELETE: no data found [prs_apply_replay.c:3575] [05-01T21:48:11.638229] [REP-04] [T] send ipc (type:PRS_IPC_ERROR_LOG, tid:0, key:0 src_id:-1) [05-01T21:48:11.638235] [REP-04] [E] Replay delete failed.(xid: 3940649673949184, stmt: DELETE FROM "TIBERO"."T1" WHERE "C1" = :"C1" AND "C2" = :"C2" AND "C3" = :"C3" AND ROWNUM = 1) [prs_apply_replay.c:3608] [05-01T21:48:11.638240] [REP-04] [T] send ipc (type:PRS_IPC_ERROR_LOG, tid:0, key:0 src_id:-1) [05-01T21:48:11.638266] [CTH-00] [T] event occurred (fd:16, type:1, idx:0) [05-01T21:48:11.638269] [REP-04] [E] unable to get error code (rc:100) [prs_apply_replay.c:3622] [05-01T21:48:11.638284] [REP-04] [E] Error discarded : no data found [prs_apply_replay.c:3641]
5. Check Discard logs
You can check the skipped DML details through the Discard logs.
[05-01T21:48:11.638293] [REP-04] [I] Error discarded : no data found [05-01T21:48:11.638301] [REP-04] [I] sql : DELETE FROM "TIBERO"."T1" WHERE "C1" = :"C1" AND "C2" = :"C2" AND "C3" = :"C3" AND ROWNUM = 1 , xid:3940649673949184 ,seqno:3636 ,tsn:315844751 ,obj_id:238123 [05-01T21:48:11.638305] [REP-04] [I] WHERE clause columns (col_cnt:3) [05-01T21:48:11.638343] [REP-04] [I] end sql
Caution
Since this parameter skips DMLs that failed to apply due to errors, be aware that rows processed by such DMLs may cause data discrepancies between Source and Target.