Chapter 29 Quiz: HADR and Replication
Instructions
Answer all 20 questions. Each question has one correct answer unless stated otherwise. Review the explanations after completing the quiz to reinforce your understanding.
Question 1
What does HADR stand for?
A) High Availability Data Recovery B) High Availability Disaster Recovery C) Host-Attached Data Replication D) Hierarchical Asynchronous Data Routing
Question 2
In HADR SYNC mode, the primary waits for the standby to:
A) Replay the log records and update its database pages B) Receive the log records in memory C) Write the log records to its local disk and acknowledge receipt D) Forward the log records to an auxiliary standby
Question 3
Which HADR synchronization mode provides zero RPO with the least commit latency?
A) SYNC B) NEARSYNC C) ASYNC D) SUPERASYNC
Question 4
What is the maximum number of standby databases supported in an HADR configuration (DB2 11.1+)?
A) 1 B) 2 C) 3 D) Unlimited
Question 5
When starting HADR, which database must be started first?
A) The primary B) The standby C) Either — the order does not matter D) Both must be started simultaneously
Question 6
Automatic Client Reroute (ACR) is:
A) A server-side feature that redirects TCP connections at the network level B) A client driver feature that reconnects to an alternate server when the connection fails C) A load balancer appliance that sits between the client and database D) A z/OS-only feature requiring VTAM
Question 7
Which SQL error code indicates that an automatic client reroute has occurred?
A) SQL0204N B) SQL0803N C) SQL30108N D) SQL20542N
Question 8
On an HADR standby with reads-on-standby enabled, which isolation levels are supported?
A) All four: UR, CS, RS, RR B) Only UR and CS C) Only UR D) Only CS and RS
Question 9
A delayed standby in HADR is useful for protecting against:
A) Hardware failures B) Network partitions C) Logical data corruption (e.g., accidental DROP TABLE) D) Coupling facility failures
Question 10
What is the purpose of HADR_PEER_WINDOW?
A) The maximum time to wait for standby acknowledgment during commit B) The time window after disconnection during which the primary maintains PEER behavior C) The interval between heartbeat messages to the standby D) The maximum allowed log gap in seconds
Question 11
Db2 pureScale provides continuous availability through:
A) Log shipping from primary to standby B) Multiple active read/write members sharing the same data C) Automatic backup and restore D) Bidirectional replication between two databases
Question 12
In a Db2 pureScale cluster, the Cluster Caching Facility (CF) is responsible for:
A) Storing user data on shared disk B) Managing global locks and page coherency between members C) Routing TCP/IP connections to members D) Performing log replay on standby members
Question 13
Q Replication uses which transport mechanism for shipping change data?
A) TCP/IP sockets B) Shared disk C) IBM MQ (Message Queue) D) HTTP/REST API
Question 14
In Q Replication bidirectional mode, what happens when the same row is updated at both sites simultaneously?
A) The transaction is automatically rolled back at one site B) A conflict is detected and resolved using a configurable strategy C) Both updates are applied, resulting in inconsistent data D) Bidirectional replication does not support concurrent updates
Question 15
Change Data Capture (CDC) reads changes from:
A) Database triggers on each table B) Periodic polling of table rows C) The DB2 transaction log D) Shadow tables maintained by the application
Question 16
Which statement about CDC integration with Apache Kafka is TRUE?
A) CDC requires Kafka Connect to function B) CDC publishes change messages to Kafka topics for downstream consumption C) Kafka replaces the DB2 transaction log in CDC mode D) CDC can only write to Kafka, not read from it
Question 17
For a database requiring zero RPO and sub-second RTO, the best technology choice is:
A) HADR SYNC with automatic failover B) HADR ASYNC with manual takeover C) Db2 pureScale D) Q Replication bidirectional
Question 18
The LOGINDEXBUILD ON parameter is recommended for HADR because:
A) It improves query performance on the primary B) It ensures index operations are logged and replayed on the standby C) It reduces log file size D) It enables reads-on-standby for index-only access
Question 19
In Meridian Bank's LUW HA design, the auxiliary standby at the DR site uses ASYNC mode because:
A) ASYNC mode is required for auxiliary standbys B) The 400 km distance introduces network latency that would degrade SYNC/NEARSYNC performance C) ASYNC mode provides better data protection than NEARSYNC D) The DR site uses a different DB2 version
Question 20
When combining HADR with CDC in Meridian Bank's architecture, CDC captures changes from:
A) The HADR standby database only B) The HADR primary database's transaction log C) Both the primary and standby databases simultaneously D) A separate replication database
Answer Key
| Question | Answer | Explanation |
|---|---|---|
| 1 | B | HADR = High Availability Disaster Recovery, DB2 LUW's primary HA feature for database-level failover. |
| 2 | C | In SYNC mode, the primary waits for the standby to write log records to disk and acknowledge, guaranteeing zero data loss. |
| 3 | B | NEARSYNC provides near-zero RPO (data loss only if both primary and standby crash simultaneously) with less latency than SYNC because the standby acknowledges after memory receipt, not disk write. |
| 4 | C | DB2 11.1+ supports up to 3 standbys: 1 principal, and up to 2 auxiliary (which can include delayed standbys). |
| 5 | B | The standby must be started first (START HADR AS STANDBY) so it is listening when the primary initiates the connection. |
| 6 | B | ACR is built into the DB2 client driver. When a connection fails, the driver automatically reconnects to the alternate server specified in the configuration. |
| 7 | C | SQL30108N (-30108) indicates that the client connection was rerouted to an alternate server. Applications should catch this and retry the failed transaction. |
| 8 | B | Only UR (Uncommitted Read) and CS (Cursor Stability) are supported on the standby. RS and RR require lock management that conflicts with log replay. |
| 9 | C | A delayed standby replays log records after a configurable delay. If someone accidentally drops a table, the delayed standby still has the table for the duration of the delay. |
| 10 | B | HADR_PEER_WINDOW defines how long the primary maintains PEER behavior after losing contact with the standby. During this window, the primary continues as if it were still synchronized. |
| 11 | B | pureScale uses multiple active read/write members that share the same data via shared disk and a cluster caching facility, providing continuous availability without failover. |
| 12 | B | The CF manages global locks and page coherency, similar to the coupling facility in z/OS data sharing (Chapter 28). |
| 13 | C | Q Replication uses IBM MQ as its message transport, providing guaranteed delivery and buffering capabilities. |
| 14 | B | Q Replication detects conflicts (same row modified at both sites) and resolves them using configurable strategies: source wins, target wins, timestamp-based, or custom stored procedure. |
| 15 | C | CDC reads changes directly from the DB2 transaction log — no triggers or polling required. This minimizes overhead on the source database. |
| 16 | B | CDC captures changes from the DB2 log and publishes them as messages to Kafka topics. Downstream consumers subscribe to these topics. |
| 17 | C | pureScale provides zero RPO (shared data, no replication delay) and sub-second RTO (multiple active members, no failover needed). HADR SYNC provides zero RPO but RTO is 10+ seconds for failover. |
| 18 | B | LOGINDEXBUILD ON ensures that CREATE INDEX and REORG INDEX operations generate log records that can be replayed on the standby. Without it, indexes on the standby may not be usable after a takeover. |
| 19 | B | The 400 km distance introduces approximately 4-6 ms of network round-trip latency. With SYNC or NEARSYNC, this would add 4-6 ms to every commit on the primary, which is unacceptable for high-throughput OLTP. |
| 20 | B | CDC captures changes from the primary database's transaction log. It operates independently of HADR — the CDC engine reads the same log that HADR ships to the standby. |