How Do I Configure a Secondary Db2 Archive Location When Using a Third-Party Log Archive?
Question
My primary archive method (LOGARCHMETH1) uses a third-party vendor that doesn't retain logs long enough for Fivetran incremental syncs. Does Fivetran support reading from a secondary archive location (LOGARCHMETH2) in Db2 for LUW?
For example:
LOGARCHMETH1 = VENDOR:/usr/local/avamar/...
Environment
Connector: Db2 for LUW
Answer
Yes, Fivetran supports reading archived logs from a secondary Db2 archive location (LOGARCHMETH2). When LOGARCHMETH1 archives logs directly to a third-party vendor, the vendor may not retain archived logs long enough for Fivetran incremental syncs. If Db2 cannot retrieve the required log file from the archive, it may return errors such as:
SQLP_LOG_NOT_IN_ARCHIVE SQL2657N – Log extent not found in archive
Db2 supports a secondary archive method (LOGARCHMETH2). When Db2 cannot retrieve a required log file from the primary archive, it checks the secondary archive location. Configuring LOGARCHMETH2 to use a disk-based path lets Db2 and Fivetran access archived logs even when the vendor archive has limited retention.
We do not require additional configuration. We read Db2 changes through the Db2 Log Read API and follow the archive search order defined by Db2.
Setup steps
Check your current archive configuration:
db2 get db cfg for <database_name> | grep -i LOGARCHConfigure a secondary archive location:
db2 update db cfg for <database_name> using LOGARCHMETH2 DISK:/db2_archivesVerify that the archive path is accessible:
- The path must be mounted.
- The Db2 instance owner must be able to read the path.
- Archived logs must remain available until Fivetran incremental syncs complete.
Key notes
- Db2 writes archived logs to both archive methods when both are configured and not set to
OFF. - Db2 checks
LOGARCHMETH1first, then checksLOGARCHMETH2according to the Db2 Log Read API archive search order. - We read Db2 changes through the Db2 Log Read API, so we automatically use the same archive search order.
- We recommend configuring a secondary archive location when you use vendor-managed archives with limited retention.