REGISTER EXTRACT

Use REGISTER EXTRACT to register a primary Extract group with an Oracle database to:

  • Enable integrated capture mode

  • Specify options for integrated capturing from a multitentant container database

  • Enable Extract in classic capture mode to work with Oracle Recovery Manager to retain the archive logs needed for recovery

REGISTER EXTRACT is not valid for a data pump Extract.

To unregister an Extract group from the database, use the UNREGISTER EXTRACT command (see "UNREGISTER EXTRACT").

See Installing and Configuring Oracle GoldenGate for Oracle Database for more information about using REGISTER EXTRACT.

Syntax

For classic Extract:

REGISTER EXTRACT group_name LOGRETENTION

For integrated Extract:

REGISTER EXTRACT group_mame DATABASE
[CONTAINER (container[, ...]) |
   ADD CONTAINER (container[, ...]) |
   DROP CONTAINER (container[, ...])]
[SCN system_change_number]
{SHARE [
           AUTOMATIC | 
   extract | 
   NONE]}
group_name

The name of the Extract group that is to be registered. Do not use a wildcard.

DATABASE [
CONTAINER (container[, ...]) |
ADD CONTAINER (container[, ...]) |
DROP CONTAINER (container[, ...])
[

Without options, DATABASE enables integrated capture from a non-CDB database for the Extract group. In this mode, Extract integrates with the database logmining server to receive change data in the form of logical change records (LCR). Extract does not read the redo logs. Extract performs capture processing, transformation, and other requirements. The DML filtering is performed by the Logmining server. For support information and configuration steps, see Installing and Configuring Oracle GoldenGate for Oracle Database.

Before using REGISTER EXTRACT with DATABASE, use the DBLOGIN command for all extracts with the privileges granted using the dbms_goldengate_auth.grant_admin_privilege procedure. If you have a downstream configuration, then you must also issue the MININGDBLOGIN command. If the source database you are registering is a CDB database and Extract will fetch data, then grant_admin_privilege must be called with the CONTAINER=>'ALL' parameter.

After using REGISTER EXTRACT, use ADD EXTRACT with the INTEGRATED TRANLOG option to create an Extract group of the same name. You must register an Extract group before adding it.

CONTAINER (container[, ...])

Applies the registration to a list of one or more pluggable databases (containers) of a multitentant container database (CDB). Specify one or more pluggable databases as a comma-delimited list within parentheses, for example: CONTAINER (pdb1, pdb2, pdb3). All of the pluggable databases must exist in the database, and all names must be explicit, not wildcarded.

ADD CONTAINER (container[, ...])

Adds the specified pluggable database to an existing Extract capture configuration. Specify one or more pluggable databases as a comma-delimited list within parentheses, for example: ADD CONTAINER (pdb1, pdb2, pdb3). Before issuing REGISTER EXTRACT with this option, stop the Extract group.

For Oracle, adding CONTAINERs at particular SCN on an existing Extract is not supported.

DROP CONTAINER (container[, ...])

Drops the specified pluggable database from an existing Extract capture configuration. Specify one or more pluggable databases as a comma-delimited list within parentheses, for example: DROP CONTAINER (pdb1, pdb2, pdb3). Before issuing REGISTER EXTRACT with this option, stop the Extract group.

LOGRETENTION

Valid for classic Extract only. Enables an Extract group in classic capture mode to work with Oracle Recovery Manager (RMAN) to retain the logs that Extract needs for recovery. LOGRETENTION is ignored if the Extract group is configured for integrated capture.

LOGRETENTION creates an underlying Oracle Streams capture process that is dedicated to the Extract group and has a similar name. This capture is used only for the purpose of log retention.

The logs are retained from the time that REGISTER EXTRACT is issued, based on the current database SCN. The log-retention feature is controlled with the LOGRETENTION option of the TRANLOGOPTIONS parameter.

Before using REGISTER EXTRACT with LOGRETENTION, issue the DBLOGIN command with the privileges shown in "DBLOGIN".

SCN system_change_number

Registers Extract to begin capture at a specific system change number (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';

When used alone, the SCN value is the beginning SCN of the dictionary build operation in a log file.

When used in conjunction with SHARE AUTOMATIC or SHARE extract_name, then the specified SCN is the start_scn for the capture session and has the following restrictions:

  • Should be lesser than or equal to the current SCN.

  • Should be greater than the minimum (first SCN) of the existing captures.

{SHARE [
AUTOMATIC |
extract |
NONE]}

Registers the extract to return to an existing LogMiner data dictionary build with a specified SCN creating a clone. This allows for faster creation captures by leveraging existing dictionary builds.

SHARE cannot be used on a CDB.

The following GGSCI commands are supported:

REGISTER EXTRACT extract with database SCN #### SHARE AUTOMATIC 
REGISTER EXTRACT extract with database SCN #### SHARE extract 
REGISTER EXTRACT extract with database SHARE NONE 
REGISTER EXTRACT extract with database SCN #### SHARE NONE

Or

REGISTER EXTRACT extract WITH DATABASE SHARE NONE
REGISTER EXTRACT extract WITH DATABASE SCN #### SHARE NONE

In contrast, the following GGSCI commands are not supported in a downstream configuration:

REGISTER EXTRACT extract WITH DATABASE SHARE AUTOMATIC
REGISTER EXTRACT extract WITH DATABASE SHARE extract
AUTOMATIC

Clone from the existing closest capture. If no suitable clone candidate is found, then a new build is created.

extract

Clone from the capture session associated for the specified extract. If this is not possible, then an error occurs the register does not complete.

NONE

Does not clone or create a new build; this is the default.

In a downstream configuration, the SHARE clause must be used in conjunction with the SCN clause when registering for Extract.

Examples

Example 1   
REGISTER EXTRACT sales LOGRETENTION
Example 2   
REGISTER EXTRACT sales DATABASE
Example 3   
REGISTER EXTRACT sales DATABASE CONTAINER (sales, finance, hr)
Example 4   
REGISTER EXTRACT sales DATABASE ADD CONTAINER (customers)
Example 5   
REGISTER EXTRACT sales DATABASE DROP CONTAINER (finance)
Example 6   
REGISTER EXTRACT sales DATABASE SCN 136589

The beginning SCN of the dictionary build is 136589.

Example 7   
REGISTER EXTRACT sales DATABASE SCN 67000 SHARE ext2

The valid start SCN, 67000 in this case; it is not necessarily the current SCN.

Example 8   
REGISTER EXTRACT sales DATABASE CONTAINER (sales, finance, hr) SCN 136589