FLUSH SEQUENCE

Use FLUSH SEQUENCE to generate the initial redo log information for sequence in the source database. The Extract retrieves this information when the sequence is updated or in the case of a failover. A record is written to the trail file and this record is then used by Replicat to synchronize the source and target sequences properly.

  1. 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 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}.
  2. 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.

  3. 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.

Syntax

FLUSH SEQUENCE owner.sequence
owner.sequence

The owner and name of a sequence. The schema name cannot be null and is required You can use an asterisk (*) wildcard for the sequence name, but not for the owner name.

Example

FLUSH SEQUENCE scott.seq