Installing Trigger-Based DDL Capture
To configure Oracle GoldenGate to capture and replicate DDL, see Configuring DDL Support.
Note:
DDL support for sequences (CREATE
, ALTER
, DROP
, RENAME
) is compatible with, but not required for, replicating the sequence values themselves. To replicate just sequence values, you do not need to install the Oracle GoldenGate DDL support environment. You can just use the SEQUENCE
parameter in the Extract configuration.
When to Use Trigger-based DDL Capture
This topic describes the configuration where you must use trigger-based DDL Extract.
You must use trigger-based DDL capture when Extract will operate in the following configurations:
Extract operates in classic capture mode against any version of Oracle Database.If Extract will run in integrated mode against a version 11.2.0.4 or later Oracle Database, the DDL trigger is not required. By default, DDL capture is handled transparently through the database logmining server.
If Extract will capture from a multitenant container database, integrated capture mode must be used with the native DDL capture method.
See About Extract for more information about capture modes.
See Configuring DDL Support for more information about configuring DDL support.
Overview of the Objects that Support Trigger-based DDL Capture
This topic lists the requirements for installing Oracle GoldenGate trigger-based DDL environment.
To install the Oracle GoldenGate trigger-based DDL environment, you will be installing the database objects listed in the following table.
Object | Purpose | Default name |
---|---|---|
DDL marker table |
Stores DDL information. This table only receives inserts. |
|
Sequence on marker table |
Used for a column in the marker table. |
|
DDL history table |
Stores object metadata history. This table receives inserts, updates, deletes. |
|
Object ID history table |
Contains object IDs of configured objects. |
|
DDL trigger |
Fires on DDL operations. Writes information about the operation to the marker and history tables. Installed with the trigger are some packages. |
|
DDL schema |
Contains the DDL synchronization objects. |
None; must be specified during installation and in the |
User role |
Establishes the role needed to execute DDL operations. |
|
Internal setup table |
Database table for internal use only. |
|
|
Pins DDL tracing, the DDL package, and the DDL trigger for performance improvements. |
|
|
Removes the DDL trace file. |
|
|
Verifies that the Oracle GoldenGate DDL objects are installed |
|
|
Verifies that the marker table is installed. |
|
|
Sets the level for DDL tracing. |
|
Installing the DDL Objects
To install DDL objects, you need scripts to perform various tasks during the installation.
oggma_install_home/lib/sql/legacy
.
Follow these steps to install the database objects that support Oracle GoldenGate DDL capture.
Note:
When using Extract in classic mode to capture in an Active Data Guard environment, the DDL objects must be installed on the source database, not the standby.
To Install and Use the Optional Performance Tool
To improve the performance of the DDL trigger, make the ddl_pin
script part of the database startup. It must be invoked with the Oracle GoldenGate DDL user name, as in:
@ddl_pin DDL_user
This script pins the PL/SQL package that is used by the trigger into memory. If executing this script from SQL*Plus, connect as SYSDBA
from the Oracle GoldenGate installation directory. This script relies on the Oracle dmbs_shared_pool
system package, so install that package before using ddl_pin
.