资讯专栏INFORMATION COLUMN

OGG创建进程

IT那活儿 / 3131人阅读
OGG创建进程

点击上方“IT那活儿”公众号,关注后了解更多内容,不管IT什么活儿,干就完了!!!


软件安装

1.1 下载软件包,解压,并进入解压目录,根据提示修改 oggcore.rsp参数
cd /arch/fbo_ggs_Linux_x64_shiphome/Disk1/response

cat oggcore.rsp

#
-------------------------------------------------------------------------------
# Do not change the following system generated value.
#-------------------------------------------------------------------------------
oracle.install.responseFileVersion=/oracle/install/rspfmt_ogginstall_response_schema_v19_1_0



#
-------------------------------------------------------------------------------
# Specify the installation option.
# Specify ORA19c for installing Oracle GoldenGate for Oracle Database 19c or
#         ORA18c for installing Oracle GoldenGate for Oracle Database 18c or
#         ORA12c for installing Oracle GoldenGate for Oracle Database 12c or
#         ORA11g for installing Oracle GoldenGate for Oracle Database 11g
#-------------------------------------------------------------------------------
INSTALL_OPTION=ORA12c

#
-------------------------------------------------------------------------------
# Specify a location to install Oracle GoldenGate
#-------------------------------------------------------------------------------
SOFTWARE_LOCATION=/acfs/ogg

#
-------------------------------------------------------------------------------
# Specify true to start the manager after installation.
#-------------------------------------------------------------------------------
START_MANAGER=false

#
-------------------------------------------------------------------------------
# Specify a free port within the valid range for the manager process.
# Required only if START_MANAGER is true.
#-------------------------------------------------------------------------------
MANAGER_PORT=7809

#
-------------------------------------------------------------------------------
# Specify the location of the Oracle Database.
# Required only if START_MANAGER is true.
#-------------------------------------------------------------------------------
DATABASE_LOCATION=/oracle/app/oracle/product/11.2.0/db_1

#
-------------------------------------------------------------------------------
# Specify the location which holds the install inventory files.
# This is an optional parameter if installing on
# Windows based Operating System.
#-------------------------------------------------------------------------------
INVENTORY_LOCATION=

#
-------------------------------------------------------------------------------
# Unix group to be set for the inventory directory.
# This parameter is not applicable if installing on
# Windows based Operating System.
#-------------------------------------------------------------------------------
UNIX_GROUP_NAME=dba
1.2 启动静默安装
cd /acfs/azb/fbo_ggs_Linux_x64_shiphome/Disk1/
./runInstaller -silent -responseFile /acfs/azb/fbo_ggs_Linux_x64_shiphome/Disk1/response/oggcore.rsp
配置ogg环境变量:
vi .bash_profile
export OGG=/arch/ogg19C
export PATH=$ORACLE_HOME/OPatch:$ORACLE_HOME/bin:$OGG:/usr/local/bin:/usr/bin:$PATH
================================安装日志==================================
[oracle@aigo1 Disk1]$ ./runInstaller -silent -responseFile /acfs/azb/fbo_ggs_Linux_x64_shiphome/Disk1/response/oggcore.rsp
正在启动 Oracle Universal Installer...

检查临时空间: 必须大于 120 MB。实际为 66011 MB 通过
检查交换空间: 必须大于 150 MB。实际为 2625 MB 通过
准备从以下地址启动 Oracle Universal Installer /tmp/OraInstall2022-05-12_09-14-54PM. 请稍候...[oracle@aigo1 Disk1]$
[oracle@aigo1 Disk1]$
[oracle@aigo1 Disk1]$
[oracle@aigo1 Disk1]$
[oracle@aigo1 Disk1]$
[oracle@aigo1 Disk1]$
[oracle@aigo1 Disk1]$
[oracle@aigo1 Disk1]$ cd /acfs
[oracle@aigo1 acfs]$ ls
azb lost+found ogg oggde_arch
[oracle@aigo1 acfs]$ ls
azb lost+found ogg oggde_arch
[oracle@aigo1 acfs]$ cd ogg
[oracle@aigo1 ogg]$ ls
[oracle@aigo1 ogg]$ ls
[oracle@aigo1 ogg]$ ls -lrth
总用量 0
[oracle@aigo1 ogg]$ [WARNING] [INS-75017] Cluster detected: Unable to determine if the specified software location is shared.
It is recommended to install Oracle GoldenGate entirely on shared storage.
   原因: One or more cluster nodes may be unreachable or the specified software location may not be accessible from one or more nodes.
   操作: Specify the software location on a shared storage.
可以在以下位置找到本次安装会话的日志:
 /u01/app/oraInventory/logs/installActions2022-05-12_09-14-54PM.log
Successfully Setup Software.
Oracle GoldenGate Core 的 安装 已成功。
请查看 /u01/app/oraInventory/logs/silentInstall2022-05-12_09-14-54PM.log 以获取详细资料。


[oracle@aigo1 ogg]$ more /u01/app/oraInventory/logs/silentInstall2022-05-12_09-14-54PM.log
silentInstall2022-05-12_09-14-54PM.log
Oracle GoldenGate Core 的 安装 已成功。

==============================安装日志=======================================================
1.3 创建子目录
ggsci
create subdirs
1.4 ogg密码加密

GGSCI (hnpb03na) 1> encrypt password Test123,ENCRYPTKEY default
Using Blowfish encryption with DEFAULT key.
Encrypted password: AACAAAAAAAAAAAIAXDKDUFXDEIMBFDHG
Algorithm used: BLOWFISH


新建ogg进程

2.1 源端配置mgr
dblogin UserID ogg, Password Test123
edit param mgr

PORT 7809
DYNAMICPORTLIST 7800-7900
--AUTORESTART ER *
PURGEOLDEXTRACTS ./dirdat/*/*, USECHECKPOINTS, MINKEEPDAYS 5
LAGREPORTMINUTES 1
LAGINFOMINUTES 1
LAGCRITICALMINUTES 1

start mgr
2.2 配置抽取程
mkdir $OGG/dirdat/oggyd
mkdir $OGG/dirrpt/oggyd
ggsci
dblogin UserID ogg, Password Test123
REGISTER EXTRACT EXT_OYD DATABASE
add extract EXT_OYD, integrated tranlog, begin now
add exttrail ./dirdat/oggyd/ma, extract EXT_OYD, megabytes 500

edit params EXT_OYD
Extract EXT_OYD
obey ./dirprm/env_set.obey
obey ./dirprm/ext_set.obey

--PumpName:DP_OYD
TRANLOGOPTIONS INTEGRATEDPARAMS(_CHECKPOINT_FREQUENCY 10000)
TRANLOGOPTIONS CHECKPOINTRETENTIONTIME 1
TRANLOGOPTIONS ASYNCTRANSPROCESSING 600
TRANLOGOPTIONS _READAHEADCOUNT 64

DISCARDFILE ./dirrpt/oggyd/EXT_OYD.dsc, APPEND, MEGABYTES 1000

EXTTRAIL ./dirdat/hmarkdb/ma

SQLEXEC alter session set OPTIMIZER_DYNAMIC_SAMPLING=0
DDL INCLUDE MAPPED EXCLUDE MAPPED OBJTYPE TRIGGER EXCLUDE MAPPED INSTR FOREIGN KEY
DDLOPTIONS ADDTRANDATA, REPORT
--DDLOPTIONS GETREPLICATES, IGNOREAPPLOPS
DDLOPTIONS IGNOREREPLICATES, GETAPPLOPS

--Sync_Tab list

obey ./dirprm/gglist_EXT_OYD_base_table.obey
obey ./dirprm/gglist_EXT_OYD_2022_table.obey
###通用环境变量参数文件###
cat env_set.obey

SETENV (ORACLE_HOME = "/u01/app/oracle/product/12.2.0/db_1")
SETENV (ORACLE_SID = "oggyd")
SETENV (NLS_LANG = "AMERICAN_AMERICA.ZHS16GBK")
UserID ogg, Password Test123
###通用抽取进程参数文件###
cat ext_set.obey
###下列参数仅用于integrated mode###
TRANLOGOPTIONS INTEGRATEDPARAMS (max_sga_size 1024,parallelism 1)
TRANLOGOPTIONS _lcrpingfrequency 5
CHECKPOINTSECS 3

GETTRUNCATES

EOFDELAYCSECS 50
FLUSHCSECS 10

WARNLONGTRANS 1H, CHECKINTERVAL 10M, SKIPEMPTYTRANS

REPORT AT 6:00
STATOPTIONS RESETREPORTSTATS
STATOPTIONS REPORTFETCH

CACHEMGR CACHESIZE 16G
###以下参数视情况选择###
--12c after & integrated mode
LOGALLSUPCOLS
UPDATERECORDFORMAT COMPACT
NOCOMPRESSUPDATES
2.3 配置投递进程
ADD EXTRACT DP_OYD, EXTTRAILSOURCE ./dirdat/oggyd/ma, BEGIN now
ADD RMTTRAIL ./dirdat/oggmb/mb, EXTRACT DP_OYD


edit params DP_OYD
EXTRACT DP_OYD
obey ./dirprm/dpp_set.obey

--ExtractName:EXT_OYD
--ReplicatName:RP_OMB1|RP_OMB2
RMTHOST 192.168.X.XXX MGRPORT 7809
RMTTRAIL ./dirdat/oggmb/mb
obey ./dirprm/gglist_DP_OYD_base_table.obey
###投递抽取进程参数文件###
cat dpp_set.obey

PASSTHRU

DYNAMICRESOLUTION

REPORT AT  0:00
REPORT AT  1:00
REPORT AT  2:00
REPORT AT  3:00
REPORT AT  4:00
REPORT AT  5:00
REPORT AT  6:00
REPORT AT  7:00
REPORT AT  8:00
REPORT AT  9:00
REPORT AT 10:00
REPORT AT 11:00
REPORT AT 12:00
REPORT AT 13:00
REPORT AT 14:00
REPORT AT 15:00
REPORT AT 16:00
REPORT AT 17:00
REPORT AT 18:00
REPORT AT 19:00
REPORT AT 20:00
REPORT AT 21:00
REPORT AT 22:00
REPORT AT 23:00
REPORTROLLOVER AT 00:00
STATOPTIONS RESETREPORTSTATS


GGSCI> EDIT PARAMS ./GLOBALS
GGSCHEMA ogg
CHECKPOINTTABLE ogg.checkpointtable
--添加checkpoint表:
DBLOGIN userid ogg, Password Test123
ADD CHECKPOINTTABLE ogg.checkpointtable
2.4 配置复制进程
DBLOGIN userid ogg, Password Test123
GGSCI> EDIT PARAMS ./GLOBALS
GGSCHEMA ogg
CHECKPOINTTABLE ogg.checkpointtable
--添加checkpoint表:
ADD CHECKPOINTTABLE ogg.checkpointtable
add replicat RP_OMB1, EXTTRAIL ./dirdat/oggmb/mb,checkpointtable ogg.checkpointtable
add replicat RP_OMB2, EXTTRAIL ./dirdat/oggmb/mb,checkpointtable ogg.checkpointtable
edit param RP_OMB1
REPLICAT RP_OMB1
obey ./dirprm/env_set_oggmb.obey
obey ./dirprm/rep_set.obey

--opp---oggyd-PumpName:DP_OYD--PumpHost:192.168.x.xxx--extr:--re:OMB1-rephost--OGGYD--ogg目标端

discardfile ./dirrpt/oggmb/RP_OMB1.dsc, append, megabytes 1000

--DDL config
DDLOPTIONS REPORT
DDL INCLUDE MAPPED


obey ./dirprm/oggmb/maplist_RP_OMB1_base_table.obey


edit param RP_OMB2
REPLICAT RP_OMB2
obey ./dirprm/env_set_oggmb.obey
obey ./dirprm/rep_set.obey

discardfile ./dirrpt/oggmb/RP_OMB2.dsc, append, megabytes 1000

--DDL config
DDLOPTIONS REPORT
DDL INCLUDE MAPPED


obey ./dirprm/oggmb/maplist_RP_OMB2_2022_table.obey
###通用环境变量参数文件###
vi env_set_oggmb.obey

SETENV (ORACLE_HOME = "/u01/app/oracle/product/12.2.0/db_1" )
SETENV (ORACLE_SID = "oggmb")
SETENV (NLS_LANG = "AMERICAN_AMERICA.ZHS16GBK")
UserID ogg, Password Test123
###通用复制进程参数文件###
vi rep_set.obey

SQLEXEC "ALTER SESSION SET CONSTRAINTS=DEFERRED"

--ASSUMETARGETDEFS
DBOPTIONS SUPPRESSTRIGGERS
DBOPTIONS DEFERREFCONST



GROUPTRANSOPS 10000
MAXTRANSOPS 10000


DYNAMICRESOLUTION
ALLOWNOOPUPDATES

GETTRUNCATES

--Error config
REPERROR (DEFAULT, ABEND)
--REPERROR (DEFAULT, DISCARD)
--REPERROR (01403, discard)
--REPERROR (00001, discard)
--HANDLECOLLISIONS

DISCARDROLLOVER AT 00:00
REPORT AT 0:00
STATOPTIONS RESETREPORTSTATS
REPORTCOUNT EVERY 1 MINUTES, RATE


start RP_OMB1, aftercsn 16856503485157
start RP_OMB2, aftercsn 16856503485157



本文作者:张德桥(上海新炬王翦团队)

本文来源:“IT那活儿”公众号

文章版权归作者所有,未经允许请勿转载,若此文章存在违规行为,您可以联系管理员删除。

转载请注明本文地址:https://www.ucloud.cn/yun/129165.html

相关文章

  • OGG Integrated Native DDL简单测试

    OGG Integrated Native DDL简单测试 img{ display:block; margin:0 auto !important; width:100%; } body{ width:75%;...

    IT那活儿 评论0 收藏1085
  • 那是我在夕阳下的奔跑:边跑边学习html5之audio与video

    摘要:尤其是乔布斯在年发布的一篇的文章。乔布斯在里面写下了关于的一点看法,说明自己为什么不使用,谈到关于的一些问题,比如开放性,安全性,对于设备续航的影响,不利于触摸屏,等等。终于,于年月日,爸爸也放弃治疗了,宣布将于年正式退休。 今天为大家分享一下html5中的视频(video)与音频(audio)。在进入主题之前我们先了解一下Flash与html5这两种技术的时代背景与发展历史。 1.前...

    gself 评论0 收藏0

发表评论

0条评论

IT那活儿

|高级讲师

TA的文章

阅读更多
最新活动
阅读需要支付1元查看
<