Configuring the Transaction Logs for Oracle GoldenGate
To capture DML operations, Oracle GoldenGatereads the Db2 LUW online logs by default. However, it reads the archived logs if an online log is not available. To ensure the continuity and integrity of Oracle GoldenGateprocessing, configure the logs as follows.
Retaining the Transaction Logs
Configure the database to retain the transaction logs for roll forward recovery by enabling one of the following parameter sets, depending on the database version.
-
Db2 LUW 10.1 and later:
Set the
LOGARCHMETH
parameters as follows:-
Set
LOGARCHMETH1
toLOGRETAIN
. -
Set
LOGARCHMETH2
toOFF
.
Alternatively, you can use any other
LOGARCHMETH
options, as long as forward recovery is enabled. For example, the following is valid:-
Set
LOGARCHMETH1
toDISK
. -
Set
LOGARCHMETH2
toTSM
.
-
To determine the log retention parameters:
-
Connect to the database.
db2 connect to
database
userusername
usingpassword
-
Get the database name.
db2 list db directory
-
Get the database configuration for the database.
db2 get db cfg for
database
The fields to view are:
Log retain for recovery status = RECOVERY User exit for logging status = YES
To set the log retention parameters:
Specifying the Archive Path
Set the Db2 LUW OVERFLOWLOGPATH
parameter to the archive log
directory. The node attaches automatically to the path variable that you specify.
db2 connect todatabase
db2 update db cfg using overflowlogpath "path
"
Exclude the node itself from the path. For example, if the full path to the archive log directory is /sdb2logarch/oltpods1/archive/OLTPODS1/NODE0000
, then the OVERFLOWLOGPATH
value should be specified as /sdb2logarch/oltpods1/archive/OLTPODS1.