Understanding And Using Q Replication For High . - IBM Redbooks

Transcription

IBM Information Management SoftwareFront coverUnderstanding and UsingQ Replication for High AvailabilitySolutions on the IBM z/OS PlatformSelecting an appropriate replicationdeployment scenarioManaging replication in a DB2environmentAchieving minimumreplication latencyChuck BallardJason ArnoldRich BriddellHeverson CampeloCecile MadsenJayanti MahapatraEduardo Pingarilhoibm.com/redbooks

International Technical Support OrganizationUnderstanding and Using Q Replication for HighAvailability Solutions on the IBM z/OS PlatformJanuary 2014SG24-8154-00

Note: Before using this information and the product it supports, read the information in“Notices” on page ix.First Edition (January 2014)This edition applies to Versions 10 and 10.2.1 of Q Replication, and versions 10 and 11 of DB2 forz/OS. Copyright International Business Machines Corporation 2014. All rights reserved.Note to U.S. Government Users Restricted Rights -- Use, duplication or disclosure restricted by GSA ADPSchedule Contract with IBM Corp.

ContentsNotices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ixTrademarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xPreface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiAuthors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiiNow you can become a published author, too! . . . . . . . . . . . . . . . . . . . . . . . . xvComments welcome. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvStay connected to IBM Redbooks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xviChapter 1. High Availability scenarios . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21.1.1 How the book is organized . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21.2 Terminology. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31.2.1 High availability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31.2.2 Data replication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41.3 Business challenges and solutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61.4 Business scenarios . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61.4.1 High Availability and Q Replication . . . . . . . . . . . . . . . . . . . . . . . . . . . 71.4.2 Q Replication at-a-glance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91.4.3 Conflict avoidance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111.5 Four client implementation scenarios . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121.5.1 The two-node scenario . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141.5.2 The advanced two-node scenario . . . . . . . . . . . . . . . . . . . . . . . . . . . 141.5.3 The partially connected three-node scenario . . . . . . . . . . . . . . . . . . 141.5.4 The fully connected three-node scenario . . . . . . . . . . . . . . . . . . . . . 151.5.5 Added Q Replication functionality . . . . . . . . . . . . . . . . . . . . . . . . . . . 151.5.6 Q Replication scenario environment . . . . . . . . . . . . . . . . . . . . . . . . . 16Chapter 2. IIDR Q Replication overview . . . . . . . . . . . . . . . . . . . . . . . . . . . 192.1 Q Replication objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202.1.1 Q Replication control tables and their architecture level . . . . . . . . . . 202.1.2 Q Replication queue maps and WebSphere MQ objects . . . . . . . . . 212.1.3 Q subscriptions and choosing a replication topology . . . . . . . . . . . . 252.2 The Q Capture program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282.2.1 The DB2 IFI Filtering option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 302.2.2 Heartbeat message and heartbeat interval . . . . . . . . . . . . . . . . . . . . 302.3 The Q Apply program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 312.3.1 Conflict detection and conflict resolution . . . . . . . . . . . . . . . . . . . . . . 322.3.2 The Q Apply oldest committed transaction time for a queue . . . . . . 33 Copyright IBM Corp. 2014. All rights reserved.iii

2.42.52.62.7Administration tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34The Data Replication Dashboard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34Utilities. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37Load processing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 372.7.1 Internal and external load options . . . . . . . . . . . . . . . . . . . . . . . . . . . 382.7.2 External load considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 382.7.3 Subscription State Transition during load . . . . . . . . . . . . . . . . . . . . . 392.7.4 Referential Integrity considerations . . . . . . . . . . . . . . . . . . . . . . . . . . 412.7.5 Spill queue considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42Chapter 3. The two-node scenario. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 433.1 Introduction to Q Replication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 443.2 Scenario architecture and topology. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 443.3 Replicating simple tables. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 463.3.1 Preparing your environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 463.3.2 Replicating DB2 Add Column automatically . . . . . . . . . . . . . . . . . . . 613.3.3 Configuring bidi for optimal performance . . . . . . . . . . . . . . . . . . . . . 613.3.4 Starting the Q Replication programs . . . . . . . . . . . . . . . . . . . . . . . . . 623.3.5 Checking the status of Q Replication . . . . . . . . . . . . . . . . . . . . . . . . 653.3.6 Replicating add column. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 663.3.7 Replicating alter column set data type . . . . . . . . . . . . . . . . . . . . . . . 673.4 Using non-persistent queues. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 683.4.1 Simulating a lost message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 683.5 Replicating temporal tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 703.5.1 Creating temporal tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 703.5.2 Creating the stored procedure for Q Apply . . . . . . . . . . . . . . . . . . . . 723.5.3 Creating Q Subscriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 723.5.4 Starting Q Subscriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 733.5.5 Checking the status of Q Replication . . . . . . . . . . . . . . . . . . . . . . . . 743.6 Using parallel send queues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 763.6.1 Configuring WebSphere MQ for parallel send queues . . . . . . . . . . . 773.6.2 Starting WebSphere MQ communications . . . . . . . . . . . . . . . . . . . . 823.6.3 Creating Q Map for parallel send queues . . . . . . . . . . . . . . . . . . . . . 833.6.4 Reviewing SENDQ and RECVQ parallel send queue columns . . . . 843.6.5 Creating Q Subscriptions for parallel send queues . . . . . . . . . . . . . . 843.6.6 Activating new Q Maps/Q Subscriptions replication . . . . . . . . . . . . . 853.6.7 Replicating data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 863.6.8 Checking the status of Q Replication . . . . . . . . . . . . . . . . . . . . . . . . 88Chapter 4. The advanced two-node scenario . . . . . . . . . . . . . . . . . . . . . . . 894.1 Introduction to the advanced two-node scenario. . . . . . . . . . . . . . . . . . . . 904.2 Scenario architecture and topology. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 904.3 Replicating four simple tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93ivUnderstanding and Using Q Replication for High Availability Solutions on the IBM z/OS Platform

4.3.1 Preparing your environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 934.3.2 Starting the replication programs . . . . . . . . . . . . . . . . . . . . . . . . . . 1114.3.3 Checking the status of Q Replication . . . . . . . . . . . . . . . . . . . . . . . 1154.4 Altering a replication key . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117Chapter 5. The three-node scenarios . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1215.1 Introduction to three-site replication . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1225.2 The three-node partially connected scenario . . . . . . . . . . . . . . . . . . . . . 1225.2.1 Scenario architecture and topology. . . . . . . . . . . . . . . . . . . . . . . . . 1235.2.2 Q Replication V10.2.1 and DB2 for z/OS V10 NFM . . . . . . . . . . . . 1245.2.3 Conflict avoidance strategy using DB2 for z/OS . . . . . . . . . . . . . . . 1255.2.4 Recapturing of transactions at the primary node . . . . . . . . . . . . . . 1265.2.5 Filtering transactions by using the IBMQREP IGNTRAN table . . . 1265.2.6 Managing exceptions and the IBMQREP EXCEPTIONS table . . . 1275.2.7 Q Apply program exploiting DB2 for z/OS MRI function . . . . . . . . . 1285.3 The three-node fully connected scenario . . . . . . . . . . . . . . . . . . . . . . . . 1305.3.1 Scenario architecture and topology. . . . . . . . . . . . . . . . . . . . . . . . . 1305.3.2 Application key partitioning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1325.3.3 DDL replication and the fully connected topology . . . . . . . . . . . . . . 1355.3.4 Planned outages with the fully connected topology . . . . . . . . . . . . 1365.3.5 Unplanned outages with the fully connected topology . . . . . . . . . . 1365.3.6 Moving from bidi to multi-uni topologies . . . . . . . . . . . . . . . . . . . . . 137Chapter 6. Latency analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1396.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1406.1.1 How this chapter is organized . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1416.1.2 The end-to-end latency of a replicated transaction . . . . . . . . . . . . . 1426.1.3 The statistics and the monitor tables. . . . . . . . . . . . . . . . . . . . . . . . 1436.2 Q Capture latency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1486.2.1 The Q Capture latency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1486.2.2 Determine if Q Capture is keeping up with the DB2 log activity . . . 1496.2.3 DB2 IFI time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1496.2.4 Determine why (what) Q Capture is waiting (on) . . . . . . . . . . . . . . 1506.2.5 WebSphere MQ PUT time and MQ COMMIT Time . . . . . . . . . . . . 1506.2.6 Determine if Q Capture spilled a transaction . . . . . . . . . . . . . . . . . 1516.2.7 Determine if the transmit queue is becoming a bottleneck . . . . . . . 1526.2.8 Tuning the Q Capture program . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1536.3 Q Apply latency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1546.3.1 The Q Apply latency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1556.3.2 Why Q Apply waits for transaction dependencies . . . . . . . . . . . . . . 1556.3.3 Determine why Q Apply is waiting for agents . . . . . . . . . . . . . . . . . 1566.3.4 Determine why Q Apply is retrying so many SQL statements . . . . 1566.3.5 DB2 DBMS Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158Contentsv

6.3.6 Monster transactions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1596.3.7 Tuning the Q Apply program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1616.4 Queue latency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1626.4.1 The Q Capture COMMIT INTERVAL . . . . . . . . . . . . . . . . . . . . . . . 1656.4.2 The WebSphere MQ transport delay . . . . . . . . . . . . . . . . . . . . . . . 1656.4.3 The Q Apply MQGET TIME . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1666.4.4 Tuning WebSphere MQ . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1686.5 Batch workloads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1716.6 The Data Replication Dashboard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1726.6.1 Live monitoring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1736.6.2 Generating a latency report. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175Chapter 7. Managing Q Replication in the DB2 for z/OS Environment. . 1777.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1787.1.1 The Q Capture versioning tables and schema evolution . . . . . . . . 1787.2 DB2 utilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1817.2.1 CAPSTARTing a subscription . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1827.2.2 Replicating DB2 utilities and the CAPTURE LOAD option. . . . . . . 1837.2.3 The LOAD and CHECKDATA utilities and DB2 RI constraints . . . . 1847.2.4 DB2 utilities and the data compression dictionary . . . . . . . . . . . . . 1857.3 DB2 commands and statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1867.3.1 An alternative to the TRUNCATE command . . . . . . . . . . . . . . . . . . 1877.3.2 Q Replication and the EXCHANGE statement . . . . . . . . . . . . . . . . 1877.3.3 The START tablespace RREPL option . . . . . . . . . . . . . . . . . . . . . . 1887.3.4 Replicating ARCHIVE tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1897.4 DB2 DDL Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1907.4.1 ALTER ADD COLUMN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1927.4.2 RENAME COLUMN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1937.4.3 ALTER COLUMN SET DATA TYPE . . . . . . . . . . . . . . . . . . . . . . . . 1937.4.4 DROP COLUMN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1937.4.5 DROP TABLE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1957.4.6 Add a column to a replication index . . . . . . . . . . . . . . . . . . . . . . . . 1967.4.7 Add a unique index to a target table . . . . . . . . . . . . . . . . . . . . . . . . 1977.4.8 The ROTATE PARTITION DDL statement . . . . . . . . . . . . . . . . . . . 1977.5 DB2 maintained tables and columns. . . . . . . . . . . . . . . . . . . . . . . . . . . . 198Chapter 8. Recovery procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1998.1 Data that is needed to recover . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2008.1.1 The Q Capture start lsn and commit lsn values . . . . . . . . . . . . . . . 2018.1.2 The Q Capture restart file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2028.2 Starting Q Capture from an earlier point in the DB2 log . . . . . . . . . . . . . 2028.2.1 Manually updating the Q Capture program restart file . . . . . . . . . . 2048.2.2 The Recovery Advisor of the Data Replication Dashboard . . . . . . . 205viUnderstanding and Using Q Replication for High Availability Solutions on the IBM z/OS Platform

8.3 Starting Q Capture from the current point of the DB2 log . . . . . . . . . . . . 2088.4 Stopping Q Capture (or a send queue) at a particular point in DB2 log . 2108.5 Recovering from LOAD spill queue full conditions . . . . . . . . . . . . . . . . . 2128.5.1 Preventing spill queue full condition . . . . . . . . . . . . . . . . . . . . . . . . 2138.5.2 Recuperating from spill queue full condition . . . . . . . . . . . . . . . . . . 213Appendix A. Using ASNCLP on z/OS . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215A.1 ASNCLP on z/OS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216A.1.1 History of ASNCLP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216A.1.2 ASNCLP Technologies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216A.1.3 Configuring command-line ASNCLP . . . . . . . . . . . . . . . . . . . . . . . 217A.1.4 Configuring Batch JCL ASNCLP . . . . . . . . . . . . . . . . . . . . . . . . . . 221Appendix B. Additional material . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227Locating the Web material . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 227Using the Web material . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228Related publications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229IBM Redbooks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229Online resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 229Help from IBM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230Contentsvii

viiiUnderstanding and Using Q Replication for High Availability Solutions on the IBM z/OS Platform

NoticesThis information was developed for products and services offered in the U.S.A.IBM may not offer the products, services, or features discussed in this document in other countries. Consult yourlocal IBM representative for information on the products and services currently available in your area. Anyreference to an IBM product, program, or service is not intended to state or imply that only that IBM product,program, or service may be used. Any functionally equivalent product, program, or service that does not infringeany IBM intellectual property right may be used instead. However, it is the user's responsibility to evaluate andverify the operation of any non-IBM product, program, or service.IBM may have patents or pending patent applications covering subject matter described in this document. Thefurnishing of this document does not grant you any license to these patents. You can send license inquiries, inwriting, to:IBM Director of Licensing, IBM Corporation, North Castle Drive, Armonk, NY 10504-1785 U.S.A.The following paragraph does not apply to the United Kingdom or any other country where suchprovisions are inconsistent with local law: INTERNATIONAL BUSINESS MACHINES CORPORATIONPROVIDES THIS PUBLICATION "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS ORIMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF NON-INFRINGEMENT,MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Some states do not allow disclaimer ofexpress or implied warranties in certain transactions, therefore, this statement may not apply to you.This information could include technical inaccuracies or typographical errors. Changes are periodically made to theinformation herein; these changes will be incorporated in new editions of the publication. IBM may makeimprovements and/or changes in the product(s) and/or the program(s) described in this publication at any timewithout notice.Any references in this information to non-IBM websites are provided for convenience only and do not in anymanner serve as an endorsement of those websites. The materials at those websites are not part of the materialsfor this IBM product and use of those websites is at your own risk.IBM may use or distribute any of the information you supply in any way it believes appropriate without incurring anyobligation to you.Any performance data contained herein was determined in a controlled environment. Therefore, the resultsobtained in other operating environments may vary significantly. Some measurements may have been made ondevelopment-level systems and there is no guarantee that these measurements will be the same on generallyavailable systems. Furthermore, some measurements may have been estimated through extrapolation. Actualresults may vary. Users of this document should verify the applicable data for their specific environment.Information concerning non-IBM products was obtained from the suppliers of those products, their publishedannouncements or other publicly available sources. IBM has not tested those products and cannot confirm theaccuracy of performance, compatibility or any other claims related to non-IBM products. Questions on thecapabilities of non-IBM products should be addressed to the suppliers of those products.This information contains examples of data and reports used in daily business operations. To illustrate them ascompletely as possible, the examples include the names of individuals, companies, brands, and products. All ofthese names are fictitious and any similarity to the names and addresses used by an actual business enterprise isentirely coincidental.COPYRIGHT LICENSE:This information contains sample application programs in source language, which illustrate programmingtechniques on various operating platforms. You may copy, modify, and distribute these sample programs in anyform without payment to IBM, for the purposes of developing, using, marketing or distributing application programsconforming to the application programming interface for the operating platform for which the sample programs arewritten. These examples have not been thoroughly tested under all conditions. IBM, therefore, cannot guarantee orimply reliability, serviceability, or function of these programs. You may copy, modify, and distribute these sampleprograms in any form without payment to IBM for the purposes of developing, using, marketing, or distributingapplication programs conforming to IBM's application programming interfaces. Copyright IBM Corp. 2014. All rights reserved.ix

TrademarksIBM, the IBM logo, and ibm.com are trademarks or registered trademarks of International BusinessMachines Corporation in the United States, other countries, or both. These and other IBM trademarkedterms are marked on their first occurrence in this information with the appropriate symbol ( or ),indicating US registered or common law trademarks owned by IBM at the time this information waspublished. Such trademarks may also be registered or common law trademarks in other countries. A currentlist of IBM trademarks is available on the Web at http://www.ibm.com/legal/copytrade.shtmlThe following terms are trademarks of the International Business Machines Corporation in the United States,other countries, or both:DB2 GDPS Geographically DispersedParallel Sysplex IBM IMS Informix InfoSphere MVS Parallel Sysplex Redbooks Redbooks (logo)System z WebSphere z/OS The following terms are trademarks of other companies:Evolution, and Kenexa device are trademarks or registered trademarks of Kenexa, an IBM Company.Linux is a trademark of Linus Torvalds in the United States, other countries, or both.Windows, and the Windows logo are trademarks of Microsoft Corporation in the United States, othercountries, or both.Java, and all Java-based trademarks and logos are trademarks or registered trademarks of Oracle and/or itsaffiliates.UNIX is a registered trademark of The Open Group in the United States and other countries.Other company, product, or service names may be trademarks or service marks of others.xUnderstanding and Using Q Replication for High Availability Solutions on the IBM z/OS Platform

PrefaceWith ever-increasing workloads on production systems from transaction, batch,online query and reporting applications, the challenges of high availability andworkload balancing are more important than ever.This IBM Redbooks publication provides descriptions and scenarios for highavailability solutions using the Q Replication technology of the IBM InfoSphere Data Replication product on the IBM z/OS platform. Also included are keyconsiderations for designing, implementing, and managing solutions for thetypical business scenarios that rely on Q Replication for their high availabilitysolution.This publication also includes sections on latency analysis, managing QReplication in the IBM DB2 for z/OS environment, and recovery procedures.These are topics of particular interest to clients who implement the Q Replicationsolution on the z/OS platform.Q Replication is a high-volume, low-latency replication solution that usesIBM WebSphere MQ message queues to replicate transactions betweensource and target databases or subsystems. A major business benefit of the lowlatency and high throughput solution is timely availability of the data where thedata is needed.High availability solutions are implemented to minimize the impact of plannedand unplanned disruptions of service to the applications. Disruption of servicecan be caused by software maintenance and upgrades or by software andhardware outages. As applications' high availability requirements evolve towardscontinuous availability, that is availability of the data 24 hours a day and 7 days aweek, so does the Q Replication solution, to meet these challenges.If you are interested in the Q Replication solution and how it can be used toimplement some of the high availability requirements of your business scenarios,this book is for you. Copyright IBM Corp. 2014. All rights reserved.xi

AuthorsThis book was produced by a team of specialists from around the world workingwith the International Technical Support Organization, in San Jose, California.Chuck Ballard is a Project Manager at theInternational Technical Support organization inSan Jose, California. He has over 35 years ofexperience, holding positions in the areas ofproduct engineering, sales, marketing, technicalsupport, and management. His expertise is in theareas of database, data management, datawarehousing, business intelligence, and processre-engineering. He writes extensively about thesesubjects, teaches classes, and presents atconferences and seminars worldwide. Chuck hasboth a Bachelor’s degree and a Master’s degree inIndustrial Engineering from Purdue University.Jason Arnold is an IBM Technical Specialist forInfoSphere software on IBM System z . He hasseven years of experience with data replication,including DB2 z/OS, IBM IMS , and VSAM. Heholds a Bachelor's degree in Mathematics fromNorthern Illinois University and is a PhD candidatein Computer Science at Illinois Institute ofTechnology. His interests include data replication,data integration, data warehousing, and exascalecomputing.xiiUnderstanding and Using Q Replication for High Availability Solutions on the IBM z/OS Platform

Rich Briddell is Senior Consulting IT Specialistand Application Architect with IBM SoftwareGroup, Silicon Valley Lab, specializing inmainframe and distributed DB2 replication,working out of St. Louis, MO. He has 24 years ofexperience in the DBMS field and has been adevelopment team lead and independentconsultant. He holds a Master of Arts degree inOperations Management from the University ofArkansas and a Master of Science from WebsterUniversity in Computer Resources and InformationManagement. He is an IBM Certified SolutionsExpert for Informix Dynamic Server, an IBMCertified Advanced Database Administrator forDB2 UDB database systems, an IBM CertifiedApplication Developer for DB2 UDB Family, and anIBM Certified Specialist for WebSphereApplication Server.Heverson Campelo is a Senior IT Specialist atIBM Brasil with experience in DB2 for z/OSdatabase administration, system administration,Data Replication solutions, and DB2 AnalyticsAccelerator. He is a member of the DB2 for z/OSsupport team, which provides analysis andsolutions for clients exploring how to maximizedata availability for their business with DB2products. Those products are primarily InfoSphereData Replication and the IBM DB2 AnalyticsAccelerator. Heverson provides assistance on theinstallation, configuration, and implementation ofsolutions for database availability, failover, anddata warehousing issues.Cecile Madsen is a Senior Software Engineer atthe IBM Silicon Valley laboratory in San Jose, CA.She has extensive experience in the DB2database replication solutions (over 15 years in theSQL Replication and Q Replication developmentorganization) and DB2 database products (overfive years in the DB2 for z/OS developmentorganization). She holds a Master’s degree inComputer Science from the University of SouthernCalifornia.Prefacexiii

Jayanti Mahapatra is Senior Software Engineer atthe IBM Silicon Valley laboratory in San Jose, CA.She has extensive experience in deployingdatabase replication solutions, provides analysisto help clients design and implement solutions forcontinuous availability, and supports clientsworldwide to solve various large-scale databaseavailability, failover, and data warehousing issues.Eduardo Pingarilho is a Database Administratorat Banco Do Brasil with extensive experience inDB2 for z/OS, Database Utilities, and datareplication in a ma

ibm.com/redbooks IBM Information Management Software Understanding and Using Q Replication for High Availability Solutions on the IBM z/OS Platform Chuck Ballard Jason Arnold Rich Briddell Heverson Campelo Cecile Madsen Jayanti Mahapatra Eduardo Pingarilho Selecting an appropriate replication deployment scenario Managing replication in a DB2 environment