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