28 Preparing the System for Oracle GoldenGate
Topics:
- Preparing Tables for Processing
- ODBC Configuration for Teradata
- Database User for Oracle GoldenGate Processes for Teradata
Parent topic: Using Oracle GoldenGate for Teradata
Preparing Tables for Processing
The following table attributes must be addressed in an Oracle GoldenGate environment.
Parent topic: Preparing the System for Oracle GoldenGate
Disabling Triggers and Cascade Constraints
Disable triggers, cascade delete constraints, and cascade update constraints on target Teradata tables. 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 unique row identifiers on the source and target tables to locate the correct target rows for replicated updates and deletes. Source tables can have any kind of key listed in How Oracle GoldenGate Determines the Kind of Row Identifier to Use. If there is no primary key identified on a table that has fixed-length columns, the length of one of the fixed-length columns must be below 3800 bytes.
- How Oracle GoldenGate Determines the Kind of Row Identifier to Use
- Using KEYCOLS to Specify a Custom Key
Parent topic: Preparing Tables for Processing
How Oracle GoldenGate Determines the Kind of Row Identifier to Use
Unless a KEYCOLS
clause is used in the TABLE
or MAP
statement, Oracle GoldenGate selects a row identifier to use in the following order of priority:
Parent topic: Assigning Row Identifiers
Using KEYCOLS to Specify a Custom Key
If a table does not have an applicable row identifier, or if you prefer that
identifiers are not used, you can define a substitute key, providing that the table has
columns that always contain unique values. You define this substitute key by including a
KEYCOLS
clause within the Extract TABLE
parameter
and the Replicat MAP
parameter. The specified key overrides any
existing primary or unique key that Oracle GoldenGate finds.
Parent topic: Assigning Row Identifiers
ODBC Configuration for Teradata
Configure ODBC on each target system including the creation of a data source name (DSN). A DSN stores information about how to connect to the database. See the ODBC Driver for Teradata User Guide for complete information and setup steps:
Parent topic: Preparing the System for Oracle GoldenGate
Database User for Oracle GoldenGate Processes for Teradata
Follow these requirements for the database user for Oracle GoldenGate processes:
-
Create a database user that is dedicated to Oracle GoldenGate. It can be the same user for all of the Oracle GoldenGate processes that must connect to a database:
-
Replicat (target database)
-
The
DEFGEN
utility (target database)
-
-
To preserve the security of your data, and to monitor Oracle GoldenGate processing accurately, do not permit other users, applications, or processes to log on as, or operate as, the Oracle GoldenGate database user.
-
For Oracle GoldenGate to replicate to a target Teradata database, grant
SELECT
,INSERT
,UPDATE
, andDELETE
on all of the target tables to the Replicat database user.
Parent topic: Preparing the System for Oracle GoldenGate