1.--Goldgate单向复制(支持DDL)
OGG单向复制(支持DDL)
./ggsci -v
Oracle GoldenGate Command Interpreter for Oracle
Version 11.2.1.0.1 OGGCORE_11.2.1.0.1_PLATFORMS_120423.0230_FBO
Linux, x64, 64bit (optimized), Oracle 11g on Apr 23 2012 08:32:14
1. 配置环境变量(源端、目标端)>grant execute on utl_file to goldengate;
成都创新互联公司专注为客户提供全方位的互联网综合服务,包含不限于网站设计、做网站、察雅网络推广、重庆小程序开发公司、察雅网络营销、察雅企业策划、察雅品牌公关、搜索引擎seo、人物专访、企业宣传片、企业代运营等,从售前售中售后,我们都将竭诚为您服务,您的肯定,是我们最大的嘉奖;成都创新互联公司为所有大学生创业者提供察雅建站搭建服务,24小时服务热线:18980820575,官方网址:www.cdcxhl.com
SQL>@marker_setup.sql
SQL>@ddl_setup.sql
SQL>@role_setup.sql
SQL>GRANT GGS_GGSUSER_ROLE TO goldengate;>@?/rdbms/admin/dbmspool
SQL >@ddl_pin goldengate;
1.@ddl_setup.sql
5.4源端配置抽取进程
DataPump进程
GGSCI (test01) 1> edit param PTEST01
extract PTEST01
setenv (NLS_LANG = AMERICAN_AMERICA.ZHS16GBK)
setenv (ORACLE_HOME = /oracle/app/oracle/product/11.2.4/db_1)
setenv (ORACLE_SID = testdb)
userid goldengate, password goldengate
PASSTHRU
REPORT AT 01:59
REPORTROLLOVER at 02:00
RMTHOST 10.18.4.41, MGRPORT 7809, COMPRESS
RMTTRAIL ./dirdat/rep
DYNAMICRESOLUTION
NUMFILES 2000
gettruncates
------lizhen-------
TABLE DEMO.TEST_TABLE_FOR_OGG;
GGSCI > ADD EXTRACT PTEST01, EXTTRAILSOURCE ./dirdat/exp
GGSCI > ADD RMTTRAIL ./dirdat/rep, EXTRACT PTEST01, MEGABYTES 200
6. 配置目标端
6.1配置全局变量
同源端
6.2创建检查点表
同源端
6.3 配置mgr
同源端
6.4 配置目标端复制进程
GGSCI (test01) 23> view param RTEST01
replicat RTEST01
setenv (NLS_LANG = AMERICAN_AMERICA.ZHS16GBK)
userid goldengate, password goldengate
REPORTCOUNT EVERY 30 MINUTES,RATE
REPORT AT 01:59
REPORTROLLOVER at 02:00
DISCARDROLLOVER on friday
HANDLECOLLISIONS
REPERROR DEFAULT,ABEND
DISCARDFILE ./DIRRPT/RTEST01.DSC,APPEND, MEGABYTES 1000
ASSUMETARGETDEFS
CHECKSEQUENCEVALUE
ALLOWNOOPUPDATES
DYNAMICRESOLUTION
NUMFILES 2000
DDL INCLUDE MAPPED
DDLOPTIONS REPORT
GROUPTRANSOPS 500
MAXTRANSOPS 500
------lizhen--------
MAP DEMO.TEST_TABLE_FOR_OGG,TARGET TEST.TEST_TABLE_FOR_OGG;
ggsci >add replicat RTEST01 ,exttrail ./dirdat/rep
7. 启动源端和目标端的ogg进程
---源端
GGSCI (test01) 50> start ETEST01
GGSCI (test01) 51> start PTEST01
GGSCI (test01) 53> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
EXTRACT RUNNING ETEST01 00:00:00 00:00:01
EXTRACT RUNNING PTEST01 00:00:00 00:00:03
---目标端
GGSCI (test02) 24> start RTEST01
GGSCI (test02) 24> info all
Program Status Group Lag at Chkpt Time Since Chkpt
MANAGER RUNNING
REPLICAT RUNNING RTEST01 00:00:00 00:00:05
分享标题:1.--Goldgate单向复制(支持DDL)
标题链接:http://scyanting.com/article/gcsjpj.html