32 Preparing the System for Oracle GoldenGate
Topics:
- Export All Variables
- Configuring the TimesTen Client ODBC Driver
- Preparing Tables for Processing
- Configuring Oracle GoldenGate
Learn about the prerequisites and tasks for configuring Oracle GoldenGate Replicat for Oracle TimesTen database.
Parent topic: Using Oracle GoldenGate for Oracle TimesTen
Export All Variables
-
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
Parent topic: Preparing the System for Oracle GoldenGate
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
-
Edit the
$TIMESTEN_HOME/conf/sys.odbc.ini
file.vi $TIMESTEN_HOME/conf/sys.odbc.ini
-
Describe the data source in the template file. In the following example,
TTCS_181
is used as the client name for whichDBLOGIN
andSOURCEDB
andTARGETDB
are used to connect to the database.[ODBC Data Sources] TTCS_181=TimesTen 18.1 Client Driver
-
Set a logical server name for
TTC_SERVER
and use the server DSN value for theTTC_SERVER_DSN
entry. The value of theTTC_SERVER_DSN
must match the database specific server DSN that exists in the database server’ssys.odbc.ini
file.[TTCS_181] TTC_SERVER=ttRemoteDBServer_TT_181 TTC_SERVER_DSN=ttDatabaseDSN
-
Edit the
$TIMESTEN_HOME/conf/sys.ttconnect.ini
file with the settings described in these steps.vi $TIMESTEN_HOME/conf/sys.ttconnect.ini
-
Create an entry of the same logical server name that was used as the value of
TTC_SERVER
within thesys.odbc.ini
file. In this example,ttRemoteDBServer_TT_181
is the entry name. Include an optional description value, and the requiredNetwork_Address
andTCP_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
-
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
-
Parent topic: Configuring the TimesTen Client ODBC Driver
Preparing Tables for Processing
This section describes the table attributes you must address in an Oracle GoldenGate environment with TimesTen.
Topics:
Parent topic: Preparing the System for Oracle GoldenGate
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
.
- A delete is issued for
emp_src
.
- It cascades a delete to
salary_src
. - Oracle GoldenGate sends both deletes to the target.
- The parent delete arrives first and is applied to
emp_targ
. - The parent delete cascades a delete to
salary_targ
. - The cascaded delete from
salary_src
is applied tosalary_targ
.
- The row cannot be located because it was already deleted in step 5.
Parent topic: Preparing Tables for Processing
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.
Parent topic: Preparing Tables for Processing
Configuring Oracle GoldenGate
Topics:
Parent topic: Preparing the System for Oracle GoldenGate
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.
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;
Parent topic: Configuring Oracle GoldenGate
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.
Parent topic: Configuring Oracle GoldenGate