当前位置:网站首页>Deploy Ogg on the same machine and test
Deploy Ogg on the same machine and test
2022-06-26 00:12:00 【Document Porter】
OGG , Deployed on the same machine .IP The address is 192.168.2.100
Source end :orcl
Target end : test
ogg edition
[[email protected] ogg19c]$ ./ggsci -v
Oracle GoldenGate Command Interpreter for Oracle
Version 19.1.0.0.4 OGGCORE_19.1.0.0.0_PLATFORMS_191017.1054_FBO
Linux, x64, 64bit (optimized), Oracle 19c on Oct 17 2019 21:16:29
Copyright (C) 1995, 2019, Oracle and/or its affiliates. All rights reserved.
[[email protected] ogg19c]$ take bb.t Synchronize to bb.t
Configure test content :
1 take bb.t Synchronize to bb.t , The two tables are the same schema, The same structure
2 take bb.t1 Synchronize to zbb.t1, The two tables belong to different schema, Structure is the same , But the target side table , One more. update_time Field , This field records the synchronization time
----- Configuration testing 1
-- Source configuration
view params mgr -- To configure mgr process
PORT 7809
DYNAMICPORTLIST 7800-8000
AUTORESTART EXTRACT *, RETRIES 5, WAITMINUTES 7
LAGREPORTHOURS 1
PURGEOLDEXTRACTS ./dirdat/ext1/*, USECHECKPOINTS, MINKEEPDAYS 3
LAGINFOMINUTES 30
LAGCRITICALMINUTES 45 -- The source side adds the table to be synchronized
add trandata bb.t-- Configure the extraction process
view params ext1
extract ext1
SETENV (NLS_LANG="AMERICAN_AMERICA.AL32UTF8")
SETENV (ORACLE_HOME = "/u01/app/oracle")
SETENV (ORACLE_SID = "orcl")
userid ogg, password oracle
warnlongtrans 4h, checkinterval 10m
dynamicresolution
exttrail ./dirdat/ext1/ee
table bb.t ;add extract ext1,tranlog,begin now
add exttrail ./dirdat/ext1/ee,extract ext1,megabytes 200 -- Be careful not to use absolute paths here , Otherwise, the report will be wrong -- Configure the delivery process view params pump1
extract PUMP1
SETENV (NLS_LANG="AMERICAN_AMERICA.AL32UTF8")
SETENV (ORACLE_HOME = "/u01/app/oracle")
SETENV (ORACLE_SID = "orcl")
rmthost 192.168.2.100, mgrport 7809
rmttrail ./dirdat/pump1/pp
userid ogg, password oracle
table bb.t ;add extract pump1, exttrailsource ./dirdat/ext1/ee, begin now
ADD RMTTRAIL ./dirdat/pump1/pp, EXTRACT pump1, MEGABYTES 200-- The target side configures the replication process view params rep1
replicat rep1
SETENV (NLS_LANG="AMERICAN_AMERICA.AL32UTF8")
SETENV (ORACLE_HOME = "/u01/app/oracle")
SETENV (ORACLE_SID = "test")
userid ogg, password oracle
assumetargetdefs
discardfile ./dirdat/rep_l_discard,append
--discardfile ./dirrpt/repdb1_repaix.dsc,purge
REPORTROLLOVER AT 05:30 ON Friday
map bb.t,target bb.t;add replicat rep1,exttrail ./dirdat/pump1/pp, checkpointtable ogg.checkpoint
start replicat repdb1 -- View process status
GGSCI (redhat762100 as [email protected]) 52> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
EXTRACT RUNNING EXT1 00:00:00 00:00:01
EXTRACT RUNNING PUMP1 00:00:00 00:00:06
REPLICAT RUNNING REP1 00:00:00 00:00:02
REPLICAT STOPPED REPTAB1 00:00:00 03:11:37
REPLICAT STOPPED REPTAB2 00:00:00 2708:59:59 ----------------- Configuration testing 2 , Newly added synchronization process , Make the table structure different
Source end :orcl
Target end : test
take bb.t1 Synchronize to zbb.t1
-- The source side adds the table to be synchronized
add trandata bb.t1Source side table
[email protected]>desc bb.t1
Name Null? Type
----------------------------------------------------------------- -------- --------------------------------------------
ID NUMBER
NAME VARCHAR2(10)
[email protected]> Destination end table , The table fields on the source side are the same , But one more update_date Field [email protected]>desc zbb.t1
Name Null? Type
----------------------------------------- -------- ----------------------------
ID NOT NULL NUMBER
NAME VARCHAR2(30)
[email protected]>alter table zbb.t1 add update_date date default sysdate;
Table altered.
[email protected]>desc zbb.t1
Name Null? Type
----------------------------------------- -------- ----------------------------
ID NOT NULL NUMBER
NAME VARCHAR2(30)
UPDATE_DATE DATE
[email protected]>-- The source side configures the extraction process ext2
First add trandata bb.t1
view params ext2
extract ext2
SETENV (NLS_LANG="AMERICAN_AMERICA.AL32UTF8")
SETENV (ORACLE_HOME = "/u01/app/oracle")
SETENV (ORACLE_SID = "orcl")
userid ogg, password oracle
warnlongtrans 4h, checkinterval 10m
dynamicresolution
exttrail ./dirdat/ext2/ee
table bb.t1 ,TOKENS (UPDATE_DATE = @GETENV ('GGHEADER', 'COMMITTIMESTAMP')) ; -- Pay attention to single quotation marks add extract ext2,tranlog,begin now
add exttrail ./dirdat/ext2/ee,extract ext2,megabytes 200 -- Be careful not to use absolute paths here , Otherwise, the report will be wrong -- Configure the delivery process on the source side view params pump2
extract PUMP2
SETENV (NLS_LANG="AMERICAN_AMERICA.AL32UTF8")
SETENV (ORACLE_HOME = "/u01/app/oracle")
SETENV (ORACLE_SID = "orcl")
rmthost 192.168.2.100, mgrport 7809
rmttrail ./dirdat/pump2/pp
userid ogg, password oracle
table bb.t1 ,TOKENS (UPDATE_DATE = @GETENV ('GGHEADER', 'COMMITTIMESTAMP')) ; -- Single quotation marks are also required here add extract pump2, exttrailsource ./dirdat/ext2/ee, begin now
ADD RMTTRAIL ./dirdat/pump2/pp, EXTRACT pump2, MEGABYTES 200-- Source side definition defgen
view params defgen_t1 -- This file is in dirprm In the folder , Namely defgen_t1.prm
defsfile ./dirdat/defen_t1/defgen_t1.def -- Write this , The description is generated defsfile Path to file
userid ogg,password oracle
table bb.t1;-- Source side generation defgen file , File to be generated ,copy To the target end dirdef Under the table of contents ( Copy process strategy )
defgen paramfile /u01/ogg19c/dirprm/defgen_t1.prm
[[email protected] ogg19c]$ ./defgen paramfile /u01/ogg19c/dirprm/defgen_t1.prm
***********************************************************************
Oracle GoldenGate Table Definition Generator for Oracle
Version 19.1.0.0.4 OGGCORE_19.1.0.0.0_PLATFORMS_191017.1054
Linux, x64, 64bit (optimized), Oracle 19c on Oct 17 2019 15:32:20
Copyright (C) 1995, 2019, Oracle and/or its affiliates. All rights reserved.
Starting at 2022-06-25 15:03:16
***********************************************************************
Operating System Version:
Linux
Version #1 SMP Thu Oct 4 20:48:51 UTC 2018, Release 3.10.0-957.el7.x86_64
Node: redhat762100
Machine: x86_64
soft limit hard limit
Address Space Size : unlimited unlimited
Heap Size : unlimited unlimited
File Size : unlimited unlimited
CPU Time : unlimited unlimited
Process id: 37169
***********************************************************************
** Running with the following parameters **
***********************************************************************
defsfile ./dirdat/defen_t1/defgen_t1.def
userid ogg,password ***
table bb.t1;
Retrieving definition for BB.T1.
2022-06-25 15:03:20 WARNING OGG-06439 No unique key is defined for table T1. All viable columns will be used to represent the key, but may not guarantee uniqueness. KEYCOLS may be used to define the key.
Definitions generated for 1 table in ./dirdat/defen_t1/defgen_t1.def.
[[email protected] ogg19c]$ -- The target side configures the replication process
replicat rep2
Sourcedefs /u01/ogg19c/dirdef/defgen_t1.def -- Use the file generated above ( The file generated above ,copy Go to the appropriate directory )
SETENV (NLS_LANG="AMERICAN_AMERICA.AL32UTF8")
SETENV (ORACLE_HOME = "/u01/app/oracle")
SETENV (ORACLE_SID = "test")
userid ogg, password oracle
--assumetargetdefs
discardfile ./dirdat/rep_2_discard,append
--discardfile ./dirrpt/repdb1_repaix.dsc,purge
REPORTROLLOVER AT 05:30 ON Friday
map bb.t1,target zbb.t COLMAP (USEDEFAULTS, UPDATE_DATE= @TOKEN ('TKN-COMMITTIME'));add replicat rep2,exttrail ./dirdat/pump2/pp, checkpointtable ogg.checkpoint
start replicat rep2
-- Check the process , Each process is normal .
GGSCI (redhat762100 as [email protected]) 24> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
EXTRACT RUNNING EXT1 00:00:00 00:00:09
EXTRACT RUNNING EXT2 00:00:00 00:00:09
EXTRACT RUNNING PUMP1 00:00:00 00:00:09
EXTRACT RUNNING PUMP2 00:00:00 00:00:08
REPLICAT RUNNING REP1 00:00:00 00:00:05
REPLICAT RUNNING REP2 00:00:00 00:00:05
REPLICAT STOPPED REPTAB1 00:00:00 04:32:38
REPLICAT STOPPED REPTAB2 00:00:00 2710:20:59
GGSCI (redhat762100 as [email protected]) 25> Problems encountered in the process and their causes :
problem 1 :
OGG-00041 Oracle GoldenGate Capture for Oracle, pump1.prm: Data source not specified.
OGG-00041 Data source not specified.
reason :
edit params The parameters are incomplete , Is not specified extract The name of
problem 2
OGG-01298 Oracle GoldenGate Capture for Oracle, ext2.prm: Column function diagnostic message: could not find column "GGHEADER".
reason :
Single and double quotation marks ,ogg11g and ogg19c, Note whether single or double quotation marks are used
problem 3
GGSCI (redhat762100 as [email protected]) 102> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
EXTRACT RUNNING EXT1 00:00:00 00:00:05
EXTRACT RUNNING EXT2 00:00:00 00:00:05
EXTRACT RUNNING PUMP1 00:00:00 00:00:04
EXTRACT RUNNING PUMP2 00:00:00 00:00:04
REPLICAT RUNNING REP1 00:00:00 00:00:00
REPLICAT ABENDED REP2 00:00:00 00:01:50
REPLICAT STOPPED REPTAB1 00:00:00 04:16:21
REPLICAT STOPPED REPTAB2 00:00:00 2710:04:42
reason , surface zbb.t1 There is a primary key (not null constraint , And also zbb.t2 Foreign key constraint ), and zbb.t2 Foreign key constraint ,
alter table zbb.t1 disable constraint T1_pk;
alter table zbb.t2 disable constraint T2_FK_CASCADE;
END
边栏推荐
- huibian
- SMT贴片加工PCBA板清洗注意事项
- The problem of low video memory in yolov5 accelerated multi GPU training
- darkent2ncnn出错
- Joint simulation of STEP7 and WinCC_ Old bear passing by_ Sina blog
- Read CSV file data in tensorflow
- mysql 主从复制
- 网络协议之:redis protocol详解
- Smt贴片机保养与维护要点
- Literature research (IV): Hourly building power consumption prediction based on case-based reasoning, Ann and PCA
猜你喜欢
![[advanced ROS] Lecture 1 Introduction to common APIs](/img/25/85e8c55605f5cc999a8e85f0a05f93.jpg)
[advanced ROS] Lecture 1 Introduction to common APIs

10.4.1、數據中臺

Redis之内存淘汰机制

Some common operation methods of array

yolov5 提速多GPU训练显存低的问题

(Reprint) visual explanation of processes and threads

DHCP review

EasyConnect连接后显示未分配虚拟地址

About Simple Data Visualization

Literature research (IV): Hourly building power consumption prediction based on case-based reasoning, Ann and PCA
随机推荐
Hand made pl-2303hx USB to TTL level serial port circuit_ Old bear passing by_ Sina blog
【微信公众号H5】 生成带参数进入公众号关注页的二维码 监听用户关注公众号事件 自定义菜单栏 (服务端)
14.1.1 promethues monitoring, four data types metrics, pushgateway
《网络是怎么样连接的》读书笔记 - 集线器、路由器和路由器(三)
Topic36——53. 最大子数组和
Common knowledge points in JS
How ASA configures port mapping and pat
Multi-Instance Redo Apply
Linux下搭建集群环境(2)-----------linux下安装Mysql
DNS复习
Smt贴片机工作流程
10.2.2、Kylin_kylin的安装,上传解压,验证环境变量,启动,访问
mysql 主从复制
Introduction to anchor free decision
小红书微服务框架及治理等云原生业务架构演进案例
Frequently asked questions about redis
ffmpeg 版本切换
Building cloud computers with FRP
10.3.1、FineBI_ Installation of finebi
网络连接验证