Logging of sequence information

Individual sequence changes are not logged in the Oracle database log file. However, changes to Oracle sequences do impact (update) the Oracle sys.seq$ table. These changes do not occur with each new sequence value generated; instead, the sys.seq$ table is updated periodically, based on refresh activity for sequence caching or other system changes. The value for a sequence stored in the sys.seq$ table is the “next” value to be assigned after the existing cache of values has been exhausted.

As an example, a newly created sequence starts with a value of 1, increments by 1, and has a cache value of 20. (These are all default values that you can customize.) The value stored in the sys.seq$ record for this new sequence is 21. This indicates that, after the existing cache of 20 numbers is used, the “next” value to be used is 21. The record in sys.seq$ does not change until the sequence value hits 21. At that time, Oracle caches the next 20 values for the sequence, and the sys.seq$ record is updated to 41. It is this value (41), which is recorded as a change to the sequences sys.seq$ record, that will be used for replication. The key point is to realize that not every individual sequence update is recorded in the log, and therefore is not available for replication.