Registering Extract with the Mining Database

You need to create a database logmining server to capture redo data when using a downstream database.

The creation of the logmining server captures a snapshot of the source database in the redo stream of the source database. In a source multitenant container database, you register Extract with each of the pluggable databases that you want to include for Extract.

WARNING:

Make certain that you know the earliest SCN of the log stream at which you want Extract to begin processing. Extract cannot have a starting SCN value that is lower than the first SCN that is specified when the underlying database capture process is created with the REGISTER EXTRACT command. You can use the SCN option

  1. Log into the mining database then use the commands appropriate to your environment. The use of DBLOGIN always refers to the source database.

    Command for source database deployment:

    DBLOGIN USERIDALIAS ggeast
    

    Command for downstream mining database deployment:

    DBLOGIN USERIDALIAS ggwest
    MININGDBLOGIN USERIDALIAS dbnorth
    

    Where: alias specifies the alias of the database login credential that is assigned to Extract. This credential must exist in the Oracle GoldenGate credential store. For more information, see Establishing Oracle GoldenGate Credentials. For more information about DBLOGIN and MININGDBLOGIN, see Parameters and Functions Reference for Oracle GoldenGate.

  2. Register the Extract process with the mining database.
    REGISTER EXTRACT group DATABASE [CONTAINER (container[, ...])] [SCN system_change_number]
    

    Where:

    • group is the name of the Extract group.

    • CONTAINER (container[, ...]) specifies a pluggable database (PDB) within a multitenant container database, or a list of PDBs separated with commas. The specified PDBs must exist before the REGISTER command is executed. Extract will capture only from the PDBs that are listed in this command. For example, the following command registers PDBs mypdb1 and mypdb4. Changes from any other PDBs in the multitenant container database are ignored by Oracle GoldenGate.

      REGISTER EXTRACT exte DATABASE CONTAINER (pdbeast, pdbwest, dbnorth)
      

      You can add or drop pluggable databases at a later date by stopping Extract, issuing a DBLOGIN command, and then issuing REGISTER EXTRACT with the {ADD | DROP} CONTAINER option of DATABASE.

      Note:

      Adding CONTAINERs at particular SCN on an existing Extract is not supported.

    • Registers Extract to begin capture at a specific SCN in the past. Without this option, capture begins from the time that REGISTER EXTRACT is issued. The specified SCN must correspond to the begin SCN of a dictionary build operation in a log file. You can issue the following query to find all valid SCN values:

      SELECT first_change#
         FROM v$archived_log 
         WHERE dictionary_begin = 'YES' AND 
            STANDBY_DEST = 'NO' AND
            NAME IS NOT NULL AND 
            STATUS = 'A';
      
  3. To register additional Extracts with a downstream database for the same source database, issue this REGISTER command.

    If you want to have more than one extract per source database, you can do that using the SHARE with REGISTER EXTRACT for better performance and metadata management. The specified SCN must correspond to the SCN where mining should begin in the archive logs.

    REGISTER EXTRACT group DATABASE [CONTAINER (container[, ...])] 
    [SCN system_change_number] SHARE

Note:

The register process may take a few to several minutes to complete, even though the REGISTER command returns immediately.