32 Preparing the System for Oracle GoldenGate

This chapter contains guidelines for preparing the system to support Oracle GoldenGate:

Topics:

Export All Variables

Ensure that the required system environment variables are set before proceeding.
  • Oracle TimesTen Client Libraries path. Example:
    export LD_LIBRARY_PATH=/installpath/tt18.1.2.2.0/lib:$LD_LIBRARY_PATH
  • TimesTen Instance path. Example:
    export TIMESTEN_HOME=/instancepath/tt181

Configuring the TimesTen Client ODBC Driver

The following steps show how to configure TimesTen Client ODBC driver to connect to an Oracle TimesTen target database, which is required forOracle GoldenGate connectivity. Prior to beginning these steps, ensure that you have completed the System Requirements and Preinstallation Instructions in Installing Oracle GoldenGate .

Configuring ODBC on Linux

The following steps provide minimum settings required to connect Oracle GoldenGate processes. For more detailed information on the Oracle TimesTen Client and Server configuration and information, review the following Oracle TimesTen documentation:

https://docs.oracle.com/database/timesten-18.1/TTOPR/client_server.htm#TTOPR177

  1. Edit the $TIMESTEN_HOME/conf/sys.odbc.ini file.

    vi $TIMESTEN_HOME/conf/sys.odbc.ini

  2. Describe the data source in the template file. In the following example, TTCS_181 is used as the client name for which DBLOGIN and SOURCEDB and TARGETDB are used to connect to the database.
    [ODBC Data Sources]
        TTCS_181=TimesTen 18.1 Client Driver
  3. Set a logical server name for TTC_SERVER and use the server DSN value for the TTC_SERVER_DSN entry. The value of the TTC_SERVER_DSN must match the database specific server DSN that exists in the database server’s sys.odbc.ini file.
    [TTCS_181]
    TTC_SERVER=ttRemoteDBServer_TT_181
    TTC_SERVER_DSN=ttDatabaseDSN
  4. Edit the $TIMESTEN_HOME/conf/sys.ttconnect.ini file with the settings described in these steps.

    vi $TIMESTEN_HOME/conf/sys.ttconnect.ini

  5. Create an entry of the same logical server name that was used as the value of TTC_SERVER within the sys.odbc.ini file. In this example, ttRemoteDBServer_TT_181 is the entry name. Include an optional description value, and the required Network_Address and TCP_PORT values that point to the Oracle TimesTen database server and port.
    [ttRemoteDBServer_TT_181]
    Description=TimesTen 
    ServerNetwork_Address=server.company.com
    TCP_PORT=6625
  6. From the Oracle GoldenGate directory on the target, verify the connection settings by running GGSCI and issuing the DBLOGIN command to log into the target database.
    DBLOGIN SOURCEDB database, USERID db_user [, PASSWORD pw [encryption options]]
    In this example:
    • SOURCEDB database specifies the new Data Source Name.

    • USERID db_user, PASSWORD pw are the Replicat database user profile and password.

    • encryption options is optional password encryption

Preparing Tables for Processing

This section describes the table attributes you must address in an Oracle GoldenGate environment with TimesTen.

Topics:

Disabling Triggers and Cascade Constraints

Disable triggers, cascade delete constraints, and cascade update constraints on the target tables, or alter them to ignore changes made by the Oracle GoldenGate database user. Oracle GoldenGate replicates DML that results from a trigger or cascade constraint. If the same trigger or constraint gets activated on the target table, it becomes redundant because of the replicated version, and the database returns an error. Consider the following example, where the source tables are emp_src and salary_src and the target tables are emp_targ and salary_targ.

  1. A delete is issued for emp_src.
  2. It cascades a delete to salary_src.
  3. Oracle GoldenGate sends both deletes to the target.
  4. The parent delete arrives first and is applied to emp_targ.
  5. The parent delete cascades a delete to salary_targ.
  6. The cascaded delete from salary_src is applied to salary_targ.
  7. The row cannot be located because it was already deleted in step 5.

Assigning Row Identifiers

Oracle GoldenGate requires some form of unique row identifier on the source and target tables to locate the correct target rows for replicated updates and deletes.

Configuring Oracle GoldenGate

Learn about the prerequisites and tasks for configuring Oracle GoldenGate Replicat for Oracle TimesTen database.

Topics:

Configuring Oracle GoldenGate Replicat

This section describes the Replicat parameters that are required for most target database types. For additional parameters that may be required, see the Oracle GoldenGate installation and configuration documentation for your target database and the Reference for Oracle GoldenGate.

Perform these steps on the target replication server or target database.

  1. Configure the Manager process according to the instructions in Administering Oracle GoldenGate.
  2. In the Manager parameter file, use the PURGEOLDEXTRACTS parameter to control the purging of files from the local trail.
  3. Create a Replicat checkpoint table. There are multiple options for this purpose, see Administering Oracle GoldenGate.
  4. Create a Replicat group. For documentation purposes, this group is called rep.
    ADD REPLICAT rep, EXTTRAIL remote_trail, CHECKPOINTTABLE owner.table

    Use the EXTTRAIL argument to link the Replicat group to the remote trail that you specified for the data pump on the source server.

  5. Use the EDIT PARAMS command to create a parameter file for the Replicat group. Include the parameters shown in Example 29-1 plus any others that apply to your database environment.

Example 32-1 Parameters for the Replicat Group

-- Identify the Replicat group:
REPLICAT rep
-- Specify database login information as needed for the database:
TARGETDB target_dsn_name, [USERIDALIAS, [USERID userid, PASSWORD pw]]
-- Specify tables for delivery:
MAP owner.sourcetable, TARGET owner.targettable;

Additional Oracle GoldenGate Configuration Guidelines

The following are additional considerations to make once you have installed and configured your Oracle GoldenGate environment.

Performing Initial Synchronization

Perform an initial synchronization of the source and target data before using Oracle GoldenGate to transmit transactional changes for the first time to configure an initial load. See Initial Synchronization in Administering Oracle GoldenGate.