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
LOGARCHMETHparameters as follows:-
Set
LOGARCHMETH1toLOGRETAIN. -
Set
LOGARCHMETH2toOFF.
Alternatively, you can use any other
LOGARCHMETHoptions, as long as forward recovery is enabled. For example, the following is valid:-
Set
LOGARCHMETH1toDISK. -
Set
LOGARCHMETH2toTSM.
-
To determine the log retention parameters:
-
Connect to the database.
db2 connect to
databaseuserusernameusingpassword -
Get the database name.
db2 list db directory
-
Get the database configuration for the database.
db2 get db cfg fordatabaseThe 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 todatabasedb2 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.