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.
To Use FLUSH SEQUENCE
The following Oracle procedures are used by FLUSH SEQUENCE:
Table 1-19 Procedures That Support FLUSH SEQUENCE
| Database | Procedure | User and Privileges |
|---|---|---|
|
Source |
|
Grants |
|
Target |
|
Grants |
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 using FLUSH SEQUENCE. If sequence.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 a GGSCHEMA parameter that specifies the schema in which the procedures are installed. This user must have CONNECT, RESOURCE, and DBA privileges.
Before using FLUSH SEQUENCE, issue the DBLOGIN command as the database user that has EXECUTE privilege on the updateSequence procedure. If logging into a multitenant container database, log into the pluggable database that contains the sequence that is to be flushed.
Note:
For full instructions on configuring Oracle GoldenGate to support sequences, see Installing and Configuring Oracle GoldenGate for Oracle Database.
Syntax
FLUSH SEQUENCE owner.sequence
Example
FLUSH SEQUENCE scott.seq*