In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
It is believed that many inexperienced people have no idea about how to analyze the showsynatx test in OGG. Therefore, this paper summarizes the causes and solutions of the problem. Through this article, I hope you can solve this problem.
Test showsynatx: first make it clear that showsynatx is a parameter of replicat
1. The source and destination create tables respectively:
Source: SENDER@hyyk > create table tb20 (id int primary key, name varchar2 (20))
Target: RECEIVER@ogg > create table tb20 (id int primary key, name varchar2 (20))
Source
GGSCI (pc6) 2 > edit params ext_s1
Extract ext_s1
Setenv (NLS_LANG= "AMERICAN_AMERICA.AL32UTF8")
Setenv (ORACLE_SID= "hyyk")
Userid ogg,password oracle
Gettruncates
Exttrail / u01/app/oggs/dirdat/ss
Table sender.*
GGSCI (pc6) 3 > edit params pump_s1
Extract pump_s1
Passthru
Userid ogg,password oracle
Rmthost 192.168.1.80,mgrport 7809
Rmttrail / u01/app/oggd/dirdat/sd
-- table sender.tab1
-- table sender.tb10
Table sender.*
target
GGSCI (ogg-80) 5 > edit params rep_s1
Replicat rep_s1
Setenv (NLS_LANG=AMERICAN_AMERICA.ZHS16GBK)
Setenv (ORACLE_SID='ogg')
Userid ogg,password oracle
-- handlecollisions
ASSUMETARGETDEFS
-- SOURCEDEFS / u01/app/oggd/dirdef/test.def
DISCARDFILE. / dirrpt/rorabb.dsc,PURGE
Userid ogg,password oracle
Map sender.tb20,target receiver.tb20
2. Insert a row for the target:
Insert into tb20 values (1)
Commit
3. Insert a row at the source end (replication link has been configured and trandata is added):
Insert into tb20 values (1)
Commit
The target process will abend
GGSCI (ogg-80) 11 > info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
REPLICAT RUNNING GGS_REP2 00:00:00 00:00:01
REPLICAT ABENDED REP_S1 00:00:07 00:00:00
Information can be found in discard file
[oracle@ogg-80 dirrpt] $cat rorabb.dsc
Oracle GoldenGate Delivery for Oracle process started, group REP_S1 discard file opened: 2018-03-17 111VV 3715 42.169932
Current time: 2018-03-17 11:44:07
Discarded record from action ABEND on error 1
OCI Error ORA-00001: unique constraint (RECEIVER.SYS_C0011463) violated (status = 1), SQL
Aborting transaction on / u01/app/oggd/dirdat/sd beginning at seqno 32 rba 2557
Error at seqno 32 rba 2557
Problem replicating SENDER.TB20 to RECEIVER.TB20
Mapping problem with insert record (target format)...
*
ID = 1
000000: 31 | 1 |
NAME = a
000000: 61 | a |
*
Process Abending: 2018-03-17 11:44:07
4. Modify target parameters
Edit param rep2
Add:
NoBinaryChars
NoDynSQL
ShowSyntax
(OGG12c can only add ShowSyntax)
Then execute to the process of abend:
Cd ogg
. / replicat paramfile dirprm/rep_s1.prm
.
INSERT INTO "RECEIVER". "TB20" ("ID", "NAME") VALUES
Statement length: 60
(s) top display, (K) eep displaying (default)
Select (K)
5. Test the normal condition
Ggsci > alter rep2_s1, begin now
Source side:
Insert into tb20 values (2)
Commit
Target end
Then:
. / replicat paramfile dirprm/rep_s1.prm
Select (K)
INSERT INTO "RECEIVER". "TB20" ("ID", "NAME") VALUES
Statement length: 60
(s) top display, (K) eep displaying (default): K
The replication process will not copy until you enter K
RECEIVER@ogg > select * from tb20
ID NAME
--
2 b
1 a
(if you do not execute. / replicat paramfile dirprm/rep_s1.prm, directly start rep_s1, you can also execute the past, but the SQL is not displayed.)
After reading the above, have you mastered how to analyze the showsynatx test in OGG? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!
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.