- 最后登录
- 2015-9-19
- 在线时间
- 79 小时
- 威望
- 0
- 金钱
- 368
- 注册时间
- 2012-4-12
- 阅读权限
- 10
- 帖子
- 48
- 精华
- 0
- 积分
- 0
- UID
- 343
|
1#
发表于 2013-1-10 15:49:36
|
查看: 6839 |
回复: 3
本帖最后由 cargoo 于 2013-1-10 15:59 编辑
Oracle DB:10.2.0.4 windows 64位
OGG:11.2.1.0.1
4 Oracle:安装Sequence 复制特性
4.1 特性安装
要求:源端数据库、目标端数据库均需安装。
GGSCI > EDIT PARAMS ./GLOBALS
GGSCHEMA OGG
SQL> CONNECT / AS SYSDBA
SQL > @$GG_HOME/sequence.sql -- 输入:OGG
4.2 源数据库端
SQL > GRANT EXECUTE ON OGG.UPDATESEQUENCE TO OGG;
SQL > ALTER TABLE SYS.SEQ$ ADD SUPPLEMENTAL LOG DATA (PRIMARY KEY) COLUMNS;
4.3 目标数据库端
SQL > GRANT EXECUTE ON OGG.REPLICATESEQUENCE TO OGG;
没有安装DDL特性
抽取进程配置:
EXTRACT EXT_01
SETENV (ORACLE_HOME=E:\Oracle\10.2.0\dbhome)
SETENV (NLS_LANG = AMERICAN_AMERICA.ZHS16GBK)
SETENV (ORACLE_SID=GGS)
USERID OGG, PASSWORD OGG
REPORT AT 01:59
REPORTROLLOVER AT 02:00
EXTTRAIL .\DIRDAT\41\TR
DISCARDFILE .\DIRRPT\EXT_01.DSC, APPEND, MEGABYTES 100
DYNAMICRESOLUTION
GETTRUNCATES
SEQUENCE SCOTT.TEST_SEQ;
TABLE SCOTT.TEST_OBJECTS;
投递进程配置:
EXTRACT DLV_01
SETENV (ORACLE_HOME=E:\Oracle\10.2.0\dbhome)
SETENV (NLS_LANG = AMERICAN_AMERICA.ZHS16GBK)
SETENV (ORACLE_SID=GGS)
USERID OGG, PASSWORD OGG
REPORT AT 01:59
REPORTROLLOVER AT 02:00
PASSTHRU
RMTHOST 192.168.70.108, MGRPORT 8809, COMPRESS
RMTTRAIL .\DIRDAT\41\TR
SEQUENCE SCOTT.TEST_SEQ;
TABLE SCOTT.TEST_OBJECTS;
复制进程配置:
REPLICAT REP_01
SETENV (ORACLE_HOME= E:\Oracle\10.2.0\dbhome)
SETENV (NLS_LANG = AMERICAN_AMERICA.ZHS16GBK)
SETENV (ORACLE_SID=GGT)
USERID OGG, PASSWORD OGG
REPORT AT 01:59
REPORTROLLOVER AT 02:00
REPERROR DEFAULT, DISCARD
DISCARDFILE .\DIRRPT\REP_01.DSC, APPEND, MEGABYTES 50
DYNAMICRESOLUTION
ASSUMETARGETDEFS
MAP SCOTT.*, TARGET SCOTT.*;
此配置数据复制已成功、truncate操作也成功。
源端、目标端Sequence创建:
CREATE SEQUENCE TEST_SEQ INCREMENT BY 1 MINVALUE 1 MAXVALUE 99999 START WITH 1 NOCACHE ORDER;
设置源端Sequence值为10、目标端Sequence值为15
在源端执行select test_seq.nextval from dual;
在目标端查询select last_number from user_sequences where sequence_name='TEST_SEQ';
发现目标端Sequence值没有增长。
一直在源端执行select test_seq.nextval from dual;直至Sequence达到20,目标端值也无变化。
Discard文件报告:
Operation failed at seqno 5 rba 2600
Discarding record on action DISCARD on error 20783
Problem replicating SCOTT.TEST_SEQ to SCOTT.TEST_SEQ
Mapping problem with compressed update record (target format)...
*
|
|