Login
网站首页 > 文章中心 > 其它

配置ogg异构oracle-mysql_2)源端配置

作者:小编 更新时间:2023-08-11 21:44:44 浏览量:154人看过

源端配置大致分为如下三个步骤:配置mgr,配置抽取进程,配置投递进程

在源端先创建一张表,记得带主键:

Table created.

①登陆ogg,配置全局设置

[oracle@ora11g 11.2]$ ./ggsci 

Oracle GoldenGate Command Interpreter for Oracle
Version 11.2.1.0.3 14400833 OGGCORE_11.2.1.0.3_PLATFORMS_12082③1258_FBO
Linux, x64, 64bit (optimized), Oracle 11g on Aug 23 2012 20:20:21

Copyright (C) 1995, 2012, Oracle and/or its affiliates. All rights reserved.


GGSCI (ora11g) 1> dblogin userid ggs password ggs
Successfully logged into database.

ggschema ggs

?
GGSCI (ora11g) 3>  edit param mgr

PORT 7809
DYNAMICPORTLIST 7810-7909
--AUTOSTART ER *
AUTORESTART EXTRACT *,RETRIES 5,WAITMINUTES 3
PURGEOLDEXTRACTS ./dirdat/*,usecheckpoints, minkeepdays 3
LAGREPORTHOURS 1
LAGINFOMINUTES 30
LAGCRITICALMINUTES 45

PS:

GGSCI (ora11g) 6> start mgr

Manager started.

GGSCI (ora11g) 7> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt
MANAGER     RUNNING    
GGSCI (ora11g) 8> add trandata hr.ah4

Logging of supplemental redo data enabled for table HR.AH④

GGSCI (ora11g) 9> info trandata hr.*

Logging of supplemental redo log data is enabled for table HR.AH1.

Columns supplementally logged for table HR.AH1: ID.

Logging of supplemental redo log data is enabled for table HR.AH2.

Columns supplementally logged for table HR.AH2: ID.

Logging of supplemental redo log data is enabled for table HR.AH③

Columns supplementally logged for table HR.AH3: ID.

Logging of supplemental redo log data is enabled for table HR.AH④

Columns supplementally logged for table HR.AH4: ID.

Logging of supplemental redo log data is disabled for table HR.COUNTRIES.

Logging of supplemental redo log data is disabled for table HR.DEPARTMENTS.

Logging of supplemental redo log data is disabled for table HR.EMPLOYEES.

Logging of supplemental redo log data is disabled for table HR.JOBS.

Logging of supplemental redo log data is disabled for table HR.JOB_HISTORY.

Logging of supplemental redo log data is disabled for table HR.LOCATIONS.

Logging of supplemental redo log data is disabled for table HR.REGIONS.

Logging of supplemental redo log data is disabled for table HR.SURE1.

GGSCI (ora11g) 10> 
GGSCI (ora11g) 11> edit params ext3

extract ext3
dynamicresolution
userid ggs,password ggs
exttrail /u01/ogg/11.2/dirdat/xs
table hr.ah4;
--table hr.ah5;
GGSCI (ora11g) 13> add extract ext3,tranlog,begin now
EXTRACT added.

GGSCI (ora11g) 14> add exttrail /u01/ogg/11.2/dirdat/xs,extract ext3
EXTTRAIL added.

GGSCI (ora11g) 15> 

ext的模板可以是:

GGSCI (ora11g) 17> edit params push3 

extract push3
passthru
dynamicresolution
userid ggs,password ggs
rmthost 192.16⑧0.166,mgrport 7809
rmttrail /u01/ogg/11.2/dirdat/xs
table hr.ah4;
GGSCI (ora11g) 18> add extract push3,exttrailsource /u01/ogg/11.2/dirdat/xs
EXTRACT added.

GGSCI (ora11g) 19> add rmttrail /u01/ogg/11.2/dirdat/xs,extract push3
RMTTRAIL added.

GGSCI (ora11g) 20> 

push的模板:

GGSCI (ora11g) 21> edit params ah4

defsfile /u01/ogg/11.2/dirdef/ah④prm
userid ggs,password ggs
table hr.ah4;

去相应的目录下生产define文件:

[oracle@ora11g 11.2]$ ./defgen paramfile dirprm/ah④prm                 

***********************************************************************
    Oracle GoldenGate Table Definition Generator for Oracle
 Version 11.2.1.0.3 14400833 OGGCORE_11.2.1.0.3_PLATFORMS_12082③1258
   Linux, x64, 64bit (optimized), Oracle 11g on Aug 23 2012 16:58:29
 
Copyright (C) 1995, 2012, Oracle and/or its affiliates. All rights reserved.


                Starting at 2014-04-02 15:47:20
***********************************************************************

Operating System Version:
Linux
Version #1 SMP Fri Jan 27 17:17:51 EST 2012, Release 2.⑥18-308.el5
Node: ora11g
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: 31345

***********************************************************************
**            Running with the following parameters                  **
***********************************************************************
defsfile /u01/ogg/11.2/dirdef/ah④prm
userid ggs,password ***
table hr.ah4;
Retrieving definition for HR.AH4


Definitions generated for 1 table in /u01/ogg/11.2/dirdef/ah④prm

[oracle@ora11g 11.2]$ 
[root@ora11g ~]#  scp /u01/ogg/11.2/dirdef/ah④prm 192.16⑧0.166:/u01/ogg/11.2/
Display all 108 possibilities? (y or n)
[root@ora11g ~]#  scp /u01/ogg/11.2/dirdef/ah④prm 192.16⑧0.166:/u01/ogg/11.2/dirdef/
The authenticity of host '192.16⑧0.166 (192.16⑧0.166)' can't be established.
RSA key fingerprint is 67:c6:bb:27:ba:70:17:31:00:5b:4e:39:3c:fd:92:ad.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.16⑧0.166' (RSA) to the list of known hosts.
root@192.16⑧0.166's password: 
ah④prm                                                                                           100%  991     1.0KB/s   00:00    
[root@ora11g ~]# 

至此,源端就配置完毕了.

以上就是土嘎嘎小编大虾米为大家整理的相关主题介绍,如果您觉得小编更新的文章只要能对粉丝们有用,就是我们最大的鼓励和动力,不要忘记讲本站分享给您身边的朋友哦!!

版权声明:倡导尊重与保护知识产权。未经许可,任何人不得复制、转载、或以其他方式使用本站《原创》内容,违者将追究其法律责任。本站文章内容,部分图片来源于网络,如有侵权,请联系我们修改或者删除处理。

编辑推荐

热门文章