- 最后登录
- 2023-8-16
- 在线时间
- 1686 小时
- 威望
- 2135
- 金钱
- 50532
- 注册时间
- 2011-10-12
- 阅读权限
- 200
- 帖子
- 5207
- 精华
- 39
- 积分
- 2135
- UID
- 2
|
16#
发表于 2013-4-22 18:55:09
_NOAUTOMATICSEQUENCEFLUSH
Oracle GoldenGate - Version 11.2.1.0.4 and later
Information in this document applies to any platform.
Goal
I am using GoldenGate to replicate sequence last_number. As this is for failover purpose, the DDL setup (including DDL trigger) is enabled in target database. during sequence replication by replicat, I saw lots of following DDLs captured in ggs_ddl_trace.log:
alter sequence .... cycle; ---- for the sequence with cycle option
alter sequence ... nocycle; ---- for the sequence without cycle option
What is this DDL for, and can I disable them to improve the purpose?
Fix
The replicat changes the last_number in target sequence by querying the nextval, but this change is not secured if the target database goes down. The observed DDL will move the high water mark (HWM) of target sequence and make sure sequences replicate reliably for each sequence record.
The DDL may be skipped with replicat parameter:
DBOPTIONS _NOAUTOMATICSEQUENCEFLUSH
However, if target db goes down, the sequence number may be out of sync with source. then you will need to use FLUSH to make sure they are in sync (or FLUSH it before the target goes down, for scheduled shutdown).
Other options to reduce the overhead from target DDL trigger:
1. disable the target DDL trigger if possible, and enable it only before the failover happens.
2. increase the cach size (e.g., from default 20 to 2000), which will reduce the number of sequence records to be replicated.
3. modify ddl_filter.sql in target to filter out the DDL (note 1420197.1 shows how to use ddl_filter.sql). |
|