ogg 12c 学习

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
 


SQL> show parameter enable

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
enable_ddl_logging                   boolean     FALSE
enable_goldengate_replication        boolean     FALSE


SQL> alter system set enable_goldengate_replication=true sid='*';

System altered.

SQL> alter system set enable_ddl_logging=true sid='*';

System altered.

SQL> show parameter undo

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
undo_management                      string      AUTO
undo_retention                       integer     900
undo_tablespace                      string      UNDOTBS1
SQL> alter system set undo_retention=86400 sid='*';

System altered.

SQL> show parameter undo

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
undo_management                      string      AUTO
undo_retention                       integer     86400
undo_tablespace                      string      UNDOTBS1

grant flashback any table to ogg;
grant flashback on schema.table to db_user;

EXTRACT extnd
setenv (NLS_LANG = "AMERICAN_AMERICA.ZHS16GBK")
SETENV (ORACLE_HOME = "/oracle/db")
SETENV (ORACLE_SID = "orcl1")
USERID ogg@rac, PASSWORD ogg
LOGALLSUPCOLS --trail 记录所有修改的列以及pkukfk列的日志,前映像,12c之前的版本用GETUPDATEBEFORES and NOCOMPRESSDELETES
UPDATERECORDFORMAT COMPACT -结合前映像和后映像写入到trail 中的一个recoi,11.2.0.4后 支持replicat,提升rep性能
DDL INCLUDE MAPPES
TABLE ds.*;
sequence ds.*;

采用classic mode
如果有checkpoint table,replicat asnc commit,也就是commit with nowait;
如果没有checkpoint table,checkponts用文件来维护,也就是commit with wait;


replcicat
1.none -integrated mode
replicat repone
userid ogg@rac,password rac
ASSUMETARGETDEFS
MAP hr.*,TARET hr2.*

2.intergrated mode
eplicat repone
DBOPTIONS INTERGRATEDPARAMS(parallelism 6)
userid ogg@rac,password rac
ASSUMETARGETDEFS
MAP hr.*,TARET hr2.*


MAP geo.st_rdt,TARGET geo.st_rdt,REPERROR(-1403,DISCARD);

timestamp
extrace
TRANLOGOPTIONS
INCLUDEREGIONID target version >source version
INLCUDEREGIONIDWITHOFFSET target <10g or from oracle source to none-oracle target
SOURCETIMEZONE  --<12.1.2
replicat
SOURCETIMEZONE xxx
PRESERVETARGETTIMEZONE

LOB
TRANLOGOPTIONS FETCHPARTIALLOB --update获取所有列的信息

XML
TRANLOGOPTIONS FETCHPARTIALXML --FETCH full document

UDT
HAVEUDTWITHCHAR NLS_LANG=AL32UTF8

interval partitioning
WILDCARDRESOLVE

virtual columns
没有日志,不运行有dml on 虚拟了
TABLE TETCHCOLS  从数据库里面读

inherently updateable view
keycols

BIDRECTIONAL -双向复制
RELICAT
DBOPTIONS SETTAG
EXTRACT
TRANLOGOPTIONS EXCLUDETAG

clissc catpure
TRANLOGOPTIONS EXCLUDEUSER
GETREPLICATES INGOREREPLICATES

rac
THREADOPTIONS
INQUESIZE OUTQUEUESIZE

 TRANLOGOPTIONS
 PURGEORPHANEDTRANSACTION|NOPURGEIRPHANEDTRANSACTIONS
 and TRANSCLENUPFEREQUENCT 处理failover 事物,默认清楚
 
 ALO 
 phsysic standby  默认使用archivedlogonly
 
 TRIGGER ADN FK
 DBOPTIONS NOSUPPRESSTRIGGERS 11.2.0.2 以后
 
 DBMS_DDL.SET_TRIGGER_FIRING_PROPERTY(TRIGGER_OWNER"TRIGGER_NAME",FALSE)
 
 DBOPTIONS DEFEREFCONST  提交时检查约束
 
 其余的版本需要disable trigeer也不能用replicat 用户维护
 
EXTRACT extitg
USERID ogg@rac, PASSWORD ogg
TRANLOGOPTIONS DBLOGREADER
TRANLOGOPTIONS INTEGRATEDPARAMS (max_sga_size 300, _LOGMINER_READ_BUFFERS 128, parallelism 2)
--DDL INLCUDE ALL
EXTTRAIL ./dirdat/nd
TABLE ogg_test.*;

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

转载于:http://blog.itpub.net/24577884/viewspace-1063396/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值