ITPub博客

首页 > 数据库 > Oracle > ogg-integrated mode 学习

ogg-integrated mode 学习

原创 Oracle 作者:yu5782647 时间:2013-12-16 19:25:24 0 删除 编辑

ogg integrated 其实就是整合stream  logminr capture redo log

1.Grant permissions to the user (for local integrated capture one user will suffice although you can use two dedicated users).
2.While logged in with dblogin add trandata for the source tables.
3.Register extract for integrated capture while logged in with dblogin
4.Create an extract for integrated capture
5.Create a source and target definition file using DEFGEN.
6.Create a parameter file for the extract using local integrated capture
7.Create a trail for the extract
8.Create a replicat
9.Start OGG extract and replicat
10.Troubleshooting tips/tricks for extract

exec DBMS_GOLDENGATE_AUTH.GRANT_ADMIN_PRIVILEGE (grantee=>'ogg_extract', privilege_type=>'capture',grant_select_privileges=>true, do_grants=>TRUE);
exec DBMS_GOLDENGATE_AUTH.GRANT_ADMIN_PRIVILEGE(grantee=>'DBAGGS',grant_select_privileges=> true);
exec DBMS_GOLDENGATE_AUTH.REVOKE_ADMIN_PRIVILEGE(grantee=>'DBAGGS',REVOKE_SELECT_PRIVILEGES=>true);
select * from DBA_GOLDENGATE_PRIVILEGES;
 
register extract extint database

defsfile ./dirdef/source_int.def, purge
userid ogg, password ogg
table ogg_test.test1;

./defgen paramfile ./dirprm/defgensource.prm
 
add extract extint, integrated tranlog, begin now
add exttrail ./dirdat/aa,extract extint,megabytes 100
 
EXTRACT extint
TRANLOGOPTIONS INTEGRATEDPARAMS (max_sga_size 300, parallelism 3)
USERID ogg_extract, PASSWORD ogg
GETTRUNCATES
REPORTCOUNT EVERY 1 MINUTES, RATE
DISCARDFILE ./dirrpt/extint.dsc,APPEND,MEGABYTES 1024
DBOPTIONS  ALLOWUNUSEDCOLUMN
WARNLONGTRANS 2h,CHECKINTERVAL 3m
EXTTRAIL ./dirdat/aa
--TRANLOGOPTIONS EXCLUDEUSER USERNAME
DYNAMICRESOLUTION
TABLE ogg_test.*;

add extract dpint,exttrailsource ./dirdat/aa
add rmttrail ./dirdat/aa , extract dpint

edit params dpint

EXTRACT dpint
SETENV (NLS_LANG = "AMERICAN_AMERICA.ZHS16GBK")
USERID ogg_extract, PASSWORD ogg
PASSTHRU
RMTHOST 192.168.0.21, MGRPORT 7839, compress
RMTTRAIL ./dirdat/aa
TABLE ogg_test.*;
 
 edit params ./GLOBALS
GGSCHEMA ogg
CHECKPOINTTABLE ogg.checkpoint

dblogin userid ogg,password ogg
add checkpointtable ogg.checkpoint

add replicat repint,exttrail ./dirdat/aa,checkpointtable ogg.checkpoint
edit params repint

REPLICAT repint
SETENV (NLS_LANG = "AMERICAN_AMERICA.ZHS16GBK")
USERID ogg,PASSWORD ogg
DYNAMICRESOLUTION
ASSUMETARGETDEFS
REPERROR default,discard
DISCARDFILE ./dirrpt/repint.dsc,append,megabytes 50
map ogg_test.*,target ogg_test2.*;

alter system set memory_max_target=3g scope=spfile sid=’*';
alter system set memory_target=3g scope=spfile sid=’*';
alter system set streams_pool_size=1g scope=spfile sid=’*';
alter system set compatible=’11.2.0.3.0′ scope=spfile sid=’*';

-----------------------------------------------
dblogin userid ogg,password ogg
register replicat repint,database

add replicat repint,integrated,exttrail ./dirdat/aa,checkpointtable ogg.checkpoint_rep

edit params repint

REPLICAT repint
SETENV (NLS_LANG = "AMERICAN_AMERICA.ZHS16GBK")
DBOPTIONS INTEGRATEDPARAMS(parallelism 2)
DBOptions DeferrefConst
DBOptions SuppressTriggers
USERID ogg,PASSWORD ogg
DYNAMICRESOLUTION
ASSUMETARGETDEFS
REPERROR default,discard
DISCARDFILE ./dirrpt/repint.dsc,append,megabytes 50
map ogg_test.*, target ogg_test2.*;


--integrated mode replicat 默认SuppressTriggers

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/24577884/viewspace-1063398/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: mysql 启动和停止
下一篇: mysql备份(一)
请登录后发表评论 登录
全部评论

注册时间:2013-05-15

  • 博文量
    32
  • 访问量
    238186