DBA_Oracle GoldenGate三步骤Dump / Extract / Relicat

占位符

 

1. Source创建Extract

add extract ext1,tranlog, begin now

add exttrail /u01/ggate/dirdat/lt, extract ext1

view params ext1

 

2. Source创建Pump

add extract dpump,exttrailsource /u01/ggate/dirdat/lt

add rmttrail /u01/ggate/dirdat/lt, extract dpump

view params dpump

 

3. Target创建Replicat

3.1 配置进程的checkpoint

edit params ./GLOBAL

GGSCHEMA ggate

CHECKPOINTTABLE ggate.checkpoint

3.2 连接DB的ggate用户,在DB中创建checkpoint表

add checkpoint tableggate.checkpoint

 

3.3 创建replicat group

add replicatrep1,exttrail /u01/ggate/dirdat/lt, checkpointtable ggate.checkpoint

 

3.4 修改参数

view params rep1

 

4. 启动Extract / Dump / Replicat 进程

 

5. 测试

start ext1

 

info ext1

 

info dpump

 

start rep1

 

info rep1

 

验证一下:

--Source DB:

SQL> conn dave/dave;      

Connected.

 

SQL> select count(*) from pdba;

 COUNT(*)

----------

  2706623

 

--Target DB:

SQL> select count(*) from pdba;

 COUNT(*)

----------

  2706623

 

在Source DB insert 一条数据:

SQL> insert into pdba values(2,sysdate);

1 row created.

 

SQL> commit;

Commit complete.

 

SQL> select count(*) from pdba;

 COUNT(*)

----------

  2706624

 

到Target DB 查询:

SQL> select count(*) from pdba;

 COUNT(*)

----------

  2706624



参考http://www.cnblogs.com/shined/archive/2012/07/12/2587648.html

 

郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。