设为首页 加入收藏

TOP

GoldenGate配置(三)之DDL复制配置(二)
2015-07-24 10:45:35 来源: 作者: 【 】 浏览:4
Tags:GoldenGate 配置 DDL 复制
e parameter file to capture

-- TCUSTMER and TCUSTORD changes

EXTRACT EORA_1

SETENV (NLS_LANG=AMERICAN_AMERICA.AL32UTF8)

USERID ogg, PASSWORD Welcome1

EXTTRAIL ./dirdat/aa

DDL INCLUDE OBJNAME "scott.*"

TABLE scott.TCUSTMER;

TABLE scott.TCUSTORD;?

GGSCI(gc1) 5> START EORA_1

Sending START request to MANAGER ...

EXTRACT EINI_1 starting?

gc2:配置extract

GGSCI(gc2) 3> stop EORA_1 --关闭EORA_1进程

Sending STOP request to MANAGER ...

Request Processed.

GGSCI(gc2) 4> EDIT PARAMS EORA_1 --添加红字部分

-- Change Capture parameter file to capture

-- TCUSTMER and TCUSTORD changes

EXTRACT EORA_1

SETENV (NLS_LANG=AMERICAN_AMERICA.AL32UTF8)

USERID ogg, PASSWORD Welcome1

EXTTRAIL ./dirdat/aa

DDL INCLUDE OBJNAME "scott.*"

TABLE scott.TCUSTMER;

TABLE scott.TCUSTORD;

GGSCI(gc2) 5> START EORA_1

Sending START request to MANAGER ...

EXTRACT EINI_1 starting?

gc1:配置Replicat进程

GGSCI(gc1) 9> stop RORA_1

Sending STOP request to REPLICAT RORA_1 ...

Request processed.

GGSCI(gc1) 10> info all

Program Status Group Lag Time Since Chkpt

MANAGER RUNNING

EXTRACT RUNNING EORA_1 00:00:00 00:00:07

EXTRACT RUNNING PORA_1 00:00:00 00:00:02

REPLICAT STOPPED RORA_1 00:00:00 00:00:31

GGSCI(gc1) 11> EDIT PARAMS RORA_1 --添加红色部分

DDLERROR DEFAULT IGNORE RETRYOP

--

-- Change Delivery parameter file to apply

-- TCUSTMER and TCUSTORD Changes

--

REPLICAT RORA_1

SETENV (NLS_LANG=AMERICAN_AMERICA.ZHS16GBK)

USERID ogg, PASSWORD Ogg

HANDLECOLLISIONS

ASSUMETARGETDEFS

DISCARDFILE ./dirrpt/RORA_aa.DSC, PURGE

DDL INCLUDE ALL

DDLERROR DEFAULT IGNORE RETRYOP MAXRETRIES 3 RETRYDELAY 5

DDLERROR DEFAULT DISCARD

DDLERROR DEFAULT IGNORE RETRYOP

MAP scott.tcustmer, TARGET scott.tcustmer;

MAP scott.tcustord, TARGET scott.tcustord;

~

"dirprm/rora_1.prm" 16L, 458C written

GGSCI(gc1) 12> start RORA_1

Sending START request to MANAGER ...

REPLICAT RORA_1 starting

GGSCI(gc1) 13> info all

Program Status Group Lag Time Since Chkpt

MANAGER RUNNING

EXTRACT RUNNING EORA_1 00:00:00 00:00:06

EXTRACT RUNNING PORA_1 00:00:00 00:00:02

REPLICAT RUNNING RORA_1 00:00:00 00:00:02?

gc2:配置Replicate进程

配置过程,同gc1?

验证ddl:create操作

gc1:

SQL>create table test1 as select * from emp;

Table created.

gc2:

SQL>select * from test1;

EMPNOENAME JOB MGR HIREDATE SAL COMM DEPTNO

---------- ---------- --------- ---------------------- ---------- ---------- ----------

7369SMITH CLERK 7902 17-DEC-80 800 20

7499ALLEN SALESMAN 7698 20-FEB-81 1600 300 30

......

7902FORD ANALYST 7566 03-DEC-81 3000 20

7934MILLER CLERK 7782 23-JAN-82 1300 10

14 rows selected.

gc2:

SQL>create table test2 as select * from emp;

Table created.

gc1:

SQL>select * from test2;

EMPNOENAME JOB MGR HIREDATE SAL COMM DEPTNO

---------- ---------- --------- ---------------------- ---------- ---------- ----------

7369SMITH CLERK 7902 17-DEC-80 800 20

7499 ALLEN SALESMAN 7698 20-FEB-81 1600 300 30

......

7902FORD ANALYST 7566 03-DEC-81 3000 20

7934MILLER CLERK 7782 23-JAN-82 1300 10

14 rows selected.?

验证ddl:alter操作

gc1:

SQL>alter table test1 rename column mgr to manager;

Table altered.

gc2:

SQL>select * from test1;

EMPNOENAME JOB MANAGER HIREDATE SAL COMM DEPTNO

---------- ---------- --------- ---------------------- ---------- ---------- ----------

7369SMITH CLERK 7902 17-DEC-80 800 20

7499ALLEN SALESMAN 7698 20-FEB-81 1600 300 30

7521WARD SALESMAN 7698 22-FEB-81 1250 500 30

......

gc2:

SQL>alter table test1 rename column m

首页 上一页 1 2 3 下一页 尾页 2/3/3
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇三种东西永远不要放到数据库里 下一篇记一次离奇的TNS-12545TNS-12560T..

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容:

·在 Redis 中如何查看 (2025-12-26 03:19:03)
·Redis在实际应用中, (2025-12-26 03:19:01)
·Redis配置中`require (2025-12-26 03:18:58)
·Asus Armoury Crate (2025-12-26 02:52:33)
·WindowsFX (LinuxFX) (2025-12-26 02:52:30)