Damon
Damon

Reputation: 21

Database sequences -- Oracle golden gate bi-directional replication

I have a golden gate BI-Directional replication setup which is working fine,

But i am looking to create database sequences in ODD-EVEN distribution on both sites as explained something like here --- http://www.dba-oracle.com/t_goldengate_sequences.htm

Example:

Say Current sequences are like below ... can i drop and recreate them, will there be any impact ??

DROP SEQUENCE @SCHEMA@seq_org;

DROP SEQUENCE @SCHEMA@seq_scrub;

CREATE SEQUENCE @SCHEMA@seq_org START WITH 2600000000000 INCREMENT BY 1 NOMAXVALUE NOCACHE NOCYCLE; 

CREATE SEQUENCE @SCHEMA@seq_scrub START WITH 880000000000 INCREMENT BY 1 NOMAXVALUE CACHE 500 NOCYCLE;

NOTE: My doubt is will i need to worry about current val, next sequence etc ... or just simply drop all the DB schema's sequences and recreate all those ODD on site A and EVEN on site B.

Will there be any impact, if so what would it be and how to handle the sequences in such case.

Any better SQL commands and steps to create ODD-EVEN number distribution on both sites to handle existing database sequences would help.

Upvotes: 1

Views: 363

Answers (1)

Shahed Mahmoudi
Shahed Mahmoudi

Reputation: 281

With respect to a sequence, the cache option specifies how many sequence values will be stored in memory for faster access.

The downside of creating a sequence with a cache is that if a system failure occurs, all cached sequence values that have not be used, will be "lost". This results in a "gap" in the assigned sequence values. When the system comes back up, Oracle will cache new numbers from where it left off in the sequence, ignoring the so called "lost" sequence values.

Upvotes: 0

Related Questions