2.40 FLUSH SEQUENCE
Use FLUSH SEQUENCE
immediately after you start Extract
for the first time during an initial synchronization or a re-synchronization. This
command updates an Oracle sequence so that initial redo records are available at the
time that Extract starts to capture transaction data. Normally, redo is not
generated until the current cache is exhausted. The flush gives Replicat an initial
start point with which to synchronize to the correct sequence value on the target
system. From then on, Extract can use the redo that is associated with the usual
cache reservation of sequence values.
-
The following Oracle procedures are used by
FLUSH SEQUENCE
:Database Procedure User and Privileges Source
updateSequence
Grants
EXECUTE
to the owner of the Oracle GoldenGate DDL objects, or other selected user if not using DDL support.Target
replicateSequence
Grants
EXECUTE
to the Oracle GoldenGate Replicat user.The
sequence.sql
script installs these procedures. Normally, this script is run as part of the Oracle GoldenGate installation process, but make certain that was done before usingFLUSH SEQUENCE
. Ifsequence.sql
was not run, the flush fails and an error message similar to the following is generated:Cannot flush sequence {0}. Refer to the Oracle GoldenGate for Oracle documentation for instructions on how to set up and run the sequence.sql script. Error {1}.
-
The
GLOBALS
file must contain aGGSCHEMA
parameter that specifies the schema in which the procedures are installed. This user must haveCONNECT
,RESOURCE
, andDBA
privileges. -
Before using
FLUSH SEQUENCE
, issue theDBLOGIN
command as the database user that hasEXECUTE
privilege on theupdateSequence
procedure. If logging into a multitenant container database, log into the pluggable database that contains the sequence that is to be flushed.
Syntax
FLUSH SEQUENCE owner.sequence
Example
FLUSH SEQUENCE scott.seq
Parent topic: Common Command Line Interface Commands