Add the Primary Extract

The primary Extract writes to a trail. These steps add the primary Extract that captures change data.

  1. If using downstream capture, set the RMAN archive log deletion policy to the following value in the source database:
    CONFIGURE ARCHIVELOG DELETION POLICY TO APPLIED ON ALL STANDBY
    

    This must be done before you add the primary Extract.

  2. Run GGSCI.
  3. If using integrated capture, issue the DBLOGIN command.
    DBLOGIN USERIDALIAS alias
    

    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.

  4. Issue the ADD EXTRACT command to add the primary Extract group.
    ADD EXTRACT group name 
    {, TRANLOG | , INTEGRATED TRANLOG}
    {, BEGIN {NOW | yyyy-mm-dd[ hh:mi:[ss[.cccccc]]]} | SCN value} 
    [, THREADS n]
     

    Where:

    • group name is the name of the Extract group.

    • TRANLOG specifies the transaction log as the data source; for classic capture only. See Example 5-1.

    • INTEGRATED TRANLOG specifies that Extract receives logical change records through a database logmining server; for integrated capture only. See Example 5-2. Before issuing ADD EXTRACT with this option, make certain you logged in to the database with the DBLOGIN command and that you registered this Extract with the database. See Registering Extract with the Mining Database for more information.

    • BEGIN specifies to begin capturing data as of a specific time:

      • NOW starts at the first record that is time stamped at the same time that ADD EXTRACT is issued.

      • yyyy-mm-dd[ hh:mi:[ss[.cccccc]]] starts at an explicit timestamp. Logs from this timestamp must be available. For Extract in integrated mode, the timestamp value must be greater than the timestamp at which the Extract was registered with the database.

      • SCN value starts Extract at the transaction in the redo log that has the specified Oracle system change number (SCN). For Extract in integrated mode, the SCN value must be greater than the SCN at which the Extract was registered with the database. See Registering Extract with the Mining Database for more information.

    • THREADS n is required in classic capture mode for Oracle Real Application Cluster (RAC), to specify the number of redo log threads being used by the cluster. Extract reads and coordinates each thread to maintain transactional consistency. Not required for integrated capture.

    Note:

    Additional options are available. See Reference for Oracle GoldenGate.

Example 5-1 Classic capture with timestamp start point

ADD EXTRACT finance, TRANLOG, BEGIN 2011-01-01 12:00:00.000000

Example 5-2 Integrated capture with timestamp start point

DBLOGIN USERIDALIAS myalias
ADD EXTRACT finance, INTEGRATED TRANLOG, BEGIN NOW