In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
This paper mainly discusses the function of handlecollisions parameters.
Environment
Ogg12c version.
The source side and the destination side all have primary keys on column a.
Preparatory work
Stop the extraction process and delivery process
Insert several pieces of data on the source side
The source-side extraction process skips these insert, alter extract EXT_MI01,begin now
Start the extraction process and delivery process
Delete experiment
Target end
SQL > select * from T3
An EUTIME B
1 3
2 22-OCT-18 3
3 22-OCT-18 3
3 rows selected.
Source side:
SQL > select * from T3
An EUTIME B
1 3
2 22-OCT-18 3
3 22-OCT-18 3
4 23-OCT-18 3
5 23-OCT-18 3
5 rows selected.
Source-side delete, and submit
SQL > delete from T3 where astat4
Replication process abend:
2018-10-23 14:39:05 WARNING OGG-01004 Aborted grouped transaction on 'MING.T3', Database error 1403 (OCI Error ORA-01403: no data found, SQL).
2018-10-23 14:39:05 WARNING OGG-01003 Repositioning to rba 2135 in seqno 7.
2018-10-23 14:39:05 WARNING OGG-01154 SQL error 1403 mapping MING.T3 to MING.T3 OCI Error ORA-01403: no data found, SQL.
Source Context:
SourceModule: [er.errors]
SourceID: [/ scratch/aime/adestore/views/aime_adc4150330/oggcore/OpenSys/src/app/er/errors.cpp]
SourceFunction: [take_rep_err_action]
SourceLine: [941]
ThreadBacktrace: [15] elements
: [/ u01/app/oracle/products/ogg/libgglog.so (CMessageContext::AddThreadContext () + 0x1b) [0x7f9d6f0554eb]]
: [/ u01/app/oracle/products/ogg/libgglog.so (CMessageFactory::CreateMessage (CSourceContext*, unsigned int,...) + 0x135) [0x7f9d6f04f5c5]]
: [/ u01/app/oracle/products/ogg/libgglog.so (_ MSG_ERR_MAP_TO_TANDEM_FAILED (CSourceContext*, ggs::gglib::ggapp::CQualDBObjName const&, ggs::gglib::g)
Gapp::CQualDBObjName const&, CMessageFactory::MessageDisposition) + 0x50) [0x7f9d6f048c7c]]
[/ u01/app/oracle/products/ogg/replicat (take_rep_err_action (short, int, char const*, extr_ptr_def*, std_rec_hdr_def*, char*, file_def*, bool) + 0x17aa) [0x5b63ef
]]
: [/ u01/app/oracle/products/ogg/replicat (replicate_io (ggs::gglib::ggdatasource::DataSource*, file_def*, ggs::gglib::gglcr::CommonLCR const*, ggs::gglib::gglcr::)
CommonLCR*, extr_ptr_def*, int*, int) + 0x3847) [0x63ad27]]
: [/ u01/app/oracle/products/ogg/replicat (process_record (ggs::gglib::ggdatasource::DataSource*, file_def*&, ggs::gglib::gglcr::CommonLCR const*, ggs::gglib::gglc)
Short&, extr_ptr_def*&, extr_ptr_def*&, int&, int&, int&, bool) + 0x2f8) [0x63f018]]
: [/ u01/app/oracle/products/ogg/replicat (ggs::er::ReplicatContext::processReplicatLoop (ggs::Heartbeat::MapGeneratorParams&) + 0x1061) [0x5f6cc1]]
: [/ u01/app/oracle/products/ogg/replicat (ggs::er::ReplicatContext::run (ggs::Heartbeat::MapGeneratorParams&) + 0x29) [0x5eae39]]
: [/ u01/app/oracle/products/ogg/replicat () [0x633c7b]]
: [/ u01/app/oracle/products/ogg/replicat (ggs::gglib::MultiThreading::MainThread::ExecMain () + 0x60) [0x6ecbe0]]
: [/ u01/app/oracle/products/ogg/replicat (ggs::gglib::MultiThreading::Thread::RunThread (ggs::gglib::MultiThreading::Thread::ThreadArgs*) + 0x14d) [0x6edbfd]]
: [/ u01/app/oracle/products/ogg/replicat (ggs::gglib::MultiThreading::MainThread::Run (int, char**) + 0xb1) [0x6edce1]]
: [/ u01/app/oracle/products/ogg/replicat (main+0x3b) [0x636c9b]]
: [/ lib64/libc.so.6 (_ _ libc_start_main+0xfd) [0x37cba1ed1d]]
: [/ u01/app/oracle/products/ogg/replicat () [0x56c559]]
2018-10-23 14:39:05 ERROR OGG-01296 Error mapping from MING.T3 to MING.T3.
Copy process modifies parameters and adds handlecollisions
Map ming.t3, target ming.t3,handlecollisions
Start the replication process
Start rep_mi01
GGSCI (ORADB-8955.datadept.eastmoney.com.sh) 79 > stats REP_MI01,table ming.t3,total
Sending STATS request to REPLICAT REP_MI01...
Start of Statistics at 2018-10-23 14:53:21.
Replicating from MING.T3 to MING.T3:
* Total statistics since 2018-10-23 14:53:03 * *
Total inserts 0.00
Total updates 0.00
Total deletes 1.00
Total discards 0.00
Total operations 1.00
Total delete collisions 1.00
End of Statistics
Update experiment
Without the handlecollisions parameter, the source side inserts the data extraction process and skips the differential data.
Source end
SQL > select * from T3
An EUTIME B
1 3
2 22-OCT-18 3
3 22-OCT-18 3
5 23-OCT-18 3
6 23-OCT-18 3
4 23-OCT-18 3
6 rows selected.
Target end
SQL > select * from T3
An EUTIME B
1 3
2 22-OCT-18 3
3 22-OCT-18 3
3 rows selected.
Update a piece of data at the source end and submit:
SQL > update T3 set axiom 7, baud 4 where axiom 6
Destination side replication process abend
2018-10-23 15:06:20 WARNING OGG-01004 Aborted grouped transaction on 'MING.T3', Database error 1403 (OCI Error ORA-01403: no data found, SQL).
2018-10-23 15:06:20 WARNING OGG-01003 Repositioning to rba 5635 in seqno 7.
2018-10-23 15:06:20 WARNING OGG-01154 SQL error 1403 mapping MING.T3 to MING.T3 OCI Error ORA-01403: no data found, SQL.
Source Context:
SourceModule: [er.errors]
SourceID: [/ scratch/aime/adestore/views/aime_adc4150330/oggcore/OpenSys/src/app/er/errors.cpp]
SourceFunction: [take_rep_err_action]
SourceLine: [941]
ThreadBacktrace: [15] elements
: [/ u01/app/oracle/products/ogg/libgglog.so (CMessageContext::AddThreadContext () + 0x1b) [0x7f552516e4eb]]
: [/ u01/app/oracle/products/ogg/libgglog.so (CMessageFactory::CreateMessage (CSourceContext*, unsigned int,...) + 0x135) [0x7f55251685c5]]
: [/ u01/app/oracle/products/ogg/libgglog.so (_ MSG_ERR_MAP_TO_TANDEM_FAILED (CSourceContext*, ggs::gglib::ggapp::CQualDBObjName const&, ggs::gglib::g)
Gapp::CQualDBObjName const&, CMessageFactory::MessageDisposition) + 0x50) [0x7f5525161c7c]]
[/ u01/app/oracle/products/ogg/replicat (take_rep_err_action (short, int, char const*, extr_ptr_def*, std_rec_hdr_def*, char*, file_def*, bool) + 0x17aa) [0x5b63ef
]]
: [/ u01/app/oracle/products/ogg/replicat (replicate_io (ggs::gglib::ggdatasource::DataSource*, file_def*, ggs::gglib::gglcr::CommonLCR const*, ggs::gglib::gglcr::)
CommonLCR*, extr_ptr_def*, int*, int) + 0x3847) [0x63ad27]]
: [/ u01/app/oracle/products/ogg/replicat (process_record (ggs::gglib::ggdatasource::DataSource*, file_def*&, ggs::gglib::gglcr::CommonLCR const*, ggs::gglib::gglc)
Short&, extr_ptr_def*&, extr_ptr_def*&, int&, int&, int&, bool) + 0x2f8) [0x63f018]]
: [/ u01/app/oracle/products/ogg/replicat (ggs::er::ReplicatContext::processReplicatLoop (ggs::Heartbeat::MapGeneratorParams&) + 0x1061) [0x5f6cc1]]
: [/ u01/app/oracle/products/ogg/replicat (ggs::er::ReplicatContext::run (ggs::Heartbeat::MapGeneratorParams&) + 0x29) [0x5eae39]]
: [/ u01/app/oracle/products/ogg/replicat () [0x633c7b]]
: [/ u01/app/oracle/products/ogg/replicat (ggs::gglib::MultiThreading::MainThread::ExecMain () + 0x60) [0x6ecbe0]]
: [/ u01/app/oracle/products/ogg/replicat (ggs::gglib::MultiThreading::Thread::RunThread (ggs::gglib::MultiThreading::Thread::ThreadArgs*) + 0x14d) [0x6edbfd]]
: [/ u01/app/oracle/products/ogg/replicat (ggs::gglib::MultiThreading::MainThread::Run (int, char**) + 0xb1) [0x6edce1]]
: [/ u01/app/oracle/products/ogg/replicat (main+0x3b) [0x636c9b]]
: [/ lib64/libc.so.6 (_ _ libc_start_main+0xfd) [0x37cba1ed1d]]
: [/ u01/app/oracle/products/ogg/replicat () [0x56c559]]
2018-10-23 15:06:20 ERROR OGG-01296 Error mapping from MING.T3 to MING.T3.
Replication process add
Map ming.t3, target ming.t3,handlecollisions
Start the replication process
Start rep_mi01
Handlecollisions changed update to insert.
SQL > select * from T3
An EUTIME B
1 3
2 22-OCT-18 3
3 22-OCT-18 3
7 23-OCT-18 4
4 rows selected.
Insert experiment
The target side inserts a piece of data and submits it
SQL > insert into T3 (arecine b) values (9. 9)
Insert data with a primary key of 9 on the source side
SQL > insert into T3 (a) values (9)
SQL > commit
SQL > select * from T3
An EUTIME B
1 3
2 22-OCT-18 3
3 22-OCT-18 3
5 23-OCT-18 4
7 23-OCT-18 4
4 23-OCT-18 3
8 23-OCT-18 3
9 23-OCT-18 3
8 rows selected.
Destination side:
SQL > select * from T3
An EUTIME B
1 3
2 22-OCT-18 3
3 22-OCT-18 3
7 23-OCT-18 4
5 23-OCT-18 4
8 23-OCT-18 3
9 23-OCT-18 3
7 rows selected.
There is no abend in the replication process on the destination side, and the old data is overwritten, mainly on the source side.
Remove the handlecollisions in the replication process and insert the data on the source side
SQL > insert into T3 (arecine b) values (10jue 10)
SQL > commit
The source side inserts data and submits it
SQL > insert into T3 (a) values (10)
Source-side process abend
2018-10-23 15:36:46 WARNING OGG-00869 OCI Error ORA-00001: (MING. (status = 1), SQL.
2018-10-23 15:36:46 WARNING OGG-01004 Aborted grouped transaction on 'MING.T3', Database error 1 (OCI Error ORA-00001: (MING. (status = 1), SQL).
2018-10-23 15:36:46 WARNING OGG-01003 Repositioning to rba 6366 in seqno 7.
2018-10-23 15:36:46 WARNING OGG-01154 SQL error 1 mapping MING.T3 to MING.T3 OCI Error ORA-00001: (MING. (status = 1), SQL.
Source Context:
SourceModule: [er.errors]
SourceID: [/ scratch/aime/adestore/views/aime_adc4150330/oggcore/OpenSys/src/app/er/errors.cpp]
SourceFunction: [take_rep_err_action]
SourceLine: [941]
ThreadBacktrace: [15] elements
: [/ u01/app/oracle/products/ogg/libgglog.so (CMessageContext::AddThreadContext () + 0x1b) [0x7f118d26c4eb]]
: [/ u01/app/oracle/products/ogg/libgglog.so (CMessageFactory::CreateMessage (CSourceContext*, unsigned int,...) + 0x135) [0x7f118d2665c5]]
: [/ u01/app/oracle/products/ogg/libgglog.so (_ MSG_ERR_MAP_TO_TANDEM_FAILED (CSourceContext*, ggs::gglib::ggapp::CQualDBObjName const&, ggs::gglib::g)
Gapp::CQualDBObjName const&, CMessageFactory::MessageDisposition) + 0x50) [0x7f118d25fc7c]]
[/ u01/app/oracle/products/ogg/replicat (take_rep_err_action (short, int, char const*, extr_ptr_def*, std_rec_hdr_def*, char*, file_def*, bool) + 0x17aa) [0x5b63ef
]]
: [/ u01/app/oracle/products/ogg/replicat (replicate_io (ggs::gglib::ggdatasource::DataSource*, file_def*, ggs::gglib::gglcr::CommonLCR const*, ggs::gglib::gglcr::)
CommonLCR*, extr_ptr_def*, int*, int) + 0x3847) [0x63ad27]]
: [/ u01/app/oracle/products/ogg/replicat (process_record (ggs::gglib::ggdatasource::DataSource*, file_def*&, ggs::gglib::gglcr::CommonLCR const*, ggs::gglib::gglc)
Short&, extr_ptr_def*&, extr_ptr_def*&, int&, int&, int&, bool) + 0x2f8) [0x63f018]]
: [/ u01/app/oracle/products/ogg/replicat (ggs::er::ReplicatContext::processReplicatLoop (ggs::Heartbeat::MapGeneratorParams&) + 0x1061) [0x5f6cc1]]
: [/ u01/app/oracle/products/ogg/replicat (ggs::er::ReplicatContext::run (ggs::Heartbeat::MapGeneratorParams&) + 0x29) [0x5eae39]]
: [/ u01/app/oracle/products/ogg/replicat () [0x633c7b]]
: [/ u01/app/oracle/products/ogg/replicat (ggs::gglib::MultiThreading::MainThread::ExecMain () + 0x60) [0x6ecbe0]]
: [/ u01/app/oracle/products/ogg/replicat (ggs::gglib::MultiThreading::Thread::RunThread (ggs::gglib::MultiThreading::Thread::ThreadArgs*) + 0x14d) [0x6edbfd]]
: [/ u01/app/oracle/products/ogg/replicat (ggs::gglib::MultiThreading::MainThread::Run (int, char**) + 0xb1) [0x6edce1]]
: [/ u01/app/oracle/products/ogg/replicat (main+0x3b) [0x636c9b]]
: [/ lib64/libc.so.6 (_ _ libc_start_main+0xfd) [0x37cba1ed1d]]
: [/ u01/app/oracle/products/ogg/replicat () [0x56c559]]
2018-10-23 15:36:46 ERROR OGG-01296 Error mapping from MING.T3 to MING.T3.
Add the handlecollisions parameter again, and the data on the destination side is modified to be consistent with the source side.
Summary:
1.handlecollisions is the replication process parameter
two。 For delete operations, if there is no handlecollisions parameter and the source side delete a piece of data, and the destination side does not meet the requirements, then the replication process will abend
With the handlecollisions parameter, the replication process will not abend, and the destination side will skip delete
3. For update operations, if there is no handlecollisions parameter and the source side update a piece of data, and the destination side does not meet the requirements, then the replication process will abend
With the handlecollisions parameter, the replication process will not abend, the target side will change the update into insert, and the data will be inserted into the target side.
4. For the insert operation, if there is no handlecollisions parameter and the source side insert a piece of data, and the destination side violates the uniqueness constraint, the replication process will abend
With the handlecollisions parameter, the replication process will not abend, and the destination end will modify the data that violates the uniqueness constraint according to the source data.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.