Using HADR Standby as replication source

Rui Chen

Using HADR Standby as replication source

Hi folks,

I'm trying to figure out if there's way to replicate a subset of tables (columns) from HADR Standby, with ROS enabled. Latency of O(10) sec can be tolerated. We are using luw (linux) V10.5FP8 right now and will upgrade to V11 at some point.

I understand the read-only limitation on HADR Standby, and that eliminates some options, eg. QRepl / infosphere CDC, which write monitoring/metadata back to source.

Furthermore, assuming we still limit ourselves to db2 heterogeneous env and the repl user have read access to all the tables/columns, is there a replication tool that doesn't depends on constant source db connection? Meaning such tool only scans transaction log files, and writes to its own external metadata/file, without bothering with source db at all? It would be even better if it can capture once, and replay in multiple targets. 

Really appreciate your inputs.

Edited By:
Rui Chen[Organization Members] @ Oct 17, 2017 - 12:12 PM (America/Eastern)
Rui Chen[Organization Members] @ Oct 17, 2017 - 12:14 PM (America/Eastern)
Rui Chen[Organization Members] @ Oct 17, 2017 - 01:44 PM (America/Eastern)

Greg Palgrave

RE: Using HADR Standby as replication source
(in response to Rui Chen)

I don't think it is possible, as the readlog api is not available on the standby:

https://www.ibm.com/support/knowledgecenter/en/SSEPGG_10.5.0/com.ibm.db2.luw.admin.ha.doc/doc/c0054258.html


Under Operations:
 
  -The db2ReadLog API cannot be called on the standby.

Is there a reason you can't replicate from the Primary database?

 

Cheers

Greg


In Reply to Rui Chen:

Furthermore, assuming we still limit ourselves to db2 heterogeneous env and the repl user have read access to all the tables/columns, is there a replication tool that doesn't depends on constant source db connection? Meaning such tool only scans transaction log files,

Rui Chen

RE: Using HADR Standby as replication source
(in response to Greg Palgrave)

Thanks a lot Greg. 

Guess the Standby restriction on db2ReadLog API and the fact that db2ReadLog API depends on db connection (ref. link) prevents any replication from using Standby as the source..... Though i don't understand why there's such limitations, there's must be a good reason to it..... (#RFE ?)

We certainly can replicate from the Primary, but there's always the performance concern of having multiple QCapture (for QRepl) running on Primary transactional db, and we are trying to see if the replication load could be distributed across different dbs/nodes. Also from the replication operation perspective, the fact that we could only replicate from a single source still seems like a single point of failure. 

Rui Chen

RE: Using HADR Standby as replication source
(in response to Greg Palgrave)

[FYI] actually mao (link) reminded us maybe repl tool using db2ReadLogNoConn API would work, and it sounds that's the api RecoveryExpert / db2LogScanner (ref.link) calls..... 

 

i could try to play with this api, but probably won't be savvy enough to write my own tool..... just wondering if anybody may have any recommendations on such repl tool? thanks for your input.

Edited By:
Rui Chen[Organization Members] @ Oct 19, 2017 - 01:55 PM (America/Eastern)