SAP On DB2 For Z/OS And OS/390: High Availability And .

Transcription

Front coverSAP on DB2 for z/OS and OS/390:High Availability and PerformanceMonitoring with Data SharingArchitecture and design choicesaffecting availability and performanceWorkload monitoring and systemhealthcheck for high availabilitySysplex, DB2 data sharingand SAP tuningViviane Anavi-ChaputDavid BellionTim BohlsenHumberto CarrascoMike GordonFlavio LimaMary SiartMike Zazulakibm.com/redbooks

International Technical Support OrganizationSAP on DB2 for z/OS and OS/390: High Availabilityand Performance Monitoring with Data SharingDecember 2003SG24-6950-00

Note: Before using this information and the product it supports, read the information in“Notices” on page ix.First Edition (December 2003)This edition applies to DB2 for z/OS Version 7 and 8, and SAP for DB2 on z/OS Version 6.2. Copyright International Business Machines Corporation 2003. 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 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiThe team that wrote this redbook. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiBecome a published author . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xivComments welcome. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xivPart 1. Architecture and design choices affecting availability and performance . . . . . . . . 1Chapter 1. Introduction to SAP high availability and performancearchitecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31.1 Why Parallel Sysplex and data sharing for SAP? . . . . . . . . . . . . . . . . . . . . 41.1.1 Continuous availability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41.1.2 Processor scalability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51.2 Parallel Sysplex architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51.3 DB2 data sharing architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61.4 SAP Sysplex failover architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7Chapter 2. Architecture options and trade-offs . . . . . . . . . . . . . . . . . . . . . 112.1 DB2 data sharing design options for SAP . . . . . . . . . . . . . . . . . . . . . . . . . 122.1.1 Option 0 - Single member with passive (inactive) standby member . 122.1.2 Option 1: Two active members without passive standby members . 132.1.3 Option 2: Two active members, each with a passive standby member inthe same LPAR. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 162.1.4 Option 3: Two active members, with a passive standby member in anindependent LPAR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172.1.5 How many data sharing groups? . . . . . . . . . . . . . . . . . . . . . . . . . . . 172.1.6 How many data sharing members? . . . . . . . . . . . . . . . . . . . . . . . . . 182.2 Failover design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202.3 ICLI design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212.3.1 How many ICLI servers?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222.3.2 Transition from ICLI to DRDA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23Chapter 3. Workload splitting andlogon load balancing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253.1 Workload splitting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263.2 Logon load balancing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 263.2.1 Core R/3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 Copyright IBM Corp. 2003. All rights reserved.iii

3.2.2 BW, CRM, APO. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 273.3 SAP scheduling and dispatching. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283.3.1 Update (VB) Dispatching. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283.3.2 Batch classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 323.3.3 RFC groups. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33Chapter 4. MCOD with data sharing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354.1 Basic principles of MCOD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 364.2 Performance versus high availability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 364.3 Design choices with data sharing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36Chapter 5. Coupling facility design considerations. . . . . . . . . . . . . . . . . . 395.1 Coupling facility structure duplexing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 405.2 CF sizing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 415.2.1 MIPS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 415.2.2 DB2 structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41Part 2. High availability considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43Chapter 6. Single point of failure avoidance. . . . . . . . . . . . . . . . . . . . . . . . 456.1 SPOF candidates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 466.1.1 Database server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 466.1.2 Application server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 466.1.3 Disk subsystem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 476.2 Design principles to avoid SPOF. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48Chapter 7. SAP Sysplex failover . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 497.1 SAP Sysplex failover triggers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 507.2 Important failover scenarios and system impact . . . . . . . . . . . . . . . . . . . . 507.3 Planned outage avoidance example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51Chapter 8. Automation architectures for availability in data sharing . . . . 578.1 What is automation? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 588.2 Starting and stopping DB2 and SAP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 588.3 Remote application server failover and failback . . . . . . . . . . . . . . . . . . . . 608.4 Local application server failover and failback . . . . . . . . . . . . . . . . . . . . . . 618.5 High availability enqueue failover and failback . . . . . . . . . . . . . . . . . . . . . 628.6 Nondisruptive system-level copy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 648.6.1 Nondisruptive system-level copy job flow . . . . . . . . . . . . . . . . . . . . . 668.7 Automation for monitoring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 688.7.1 Archive log process. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 698.7.2 Resource unavailable . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 718.7.3 Long-running units of recovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 718.7.4 SAP health check . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72ivSAP on DB2 for z/OS: High Availability and Performance Monitoring with Data Sharing

Chapter 9. Backup and recovery architecture in data sharing . . . . . . . . . 759.1 Data sharing backup-recovery considerations . . . . . . . . . . . . . . . . . . . . . 769.1.1 Data sharing recovery environment . . . . . . . . . . . . . . . . . . . . . . . . . 769.1.2 Tablespace recovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 789.1.3 Recovering pages on the logical page list. . . . . . . . . . . . . . . . . . . . . 809.1.4 Data sharing impact on SAP recovery procedures . . . . . . . . . . . . . . 829.1.5 Object-based backup: online and offline . . . . . . . . . . . . . . . . . . . . . . 829.1.6 Volume-based backup: online. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 839.1.7 Establishing a group-level point of consistency . . . . . . . . . . . . . . . . 869.1.8 Recovery to the current state . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 869.1.9 Recovery to a previous point in time . . . . . . . . . . . . . . . . . . . . . . . . . 879.1.10 New utilities in DB2 V8 for online backup and point-in-time recovery .919.2 Data sharing considerations for disaster recovery . . . . . . . . . . . . . . . . . . 949.2.1 Configuring the recovery site . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 949.2.2 Remote site recovery using archive logs . . . . . . . . . . . . . . . . . . . . . 959.2.3 Using a tracker site for disaster recovery . . . . . . . . . . . . . . . . . . . . . 979.2.4 GDPS infrastructure for disaster recovery . . . . . . . . . . . . . . . . . . . . 989.3 Homogeneous system copy in data sharing . . . . . . . . . . . . . . . . . . . . . . 1029.3.1 Planning for homogeneous system copy in data sharing . . . . . . . . 1039.3.2 Designing homogeneous system copy in data sharing. . . . . . . . . . 105Part 3. Performance considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109Chapter 10. Sysplex performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11110.1 What to measure: defining a baseline . . . . . . . . . . . . . . . . . . . . . . . . . . 11210.2 CF performance monitoring and tuning. . . . . . . . . . . . . . . . . . . . . . . . . 11210.2.1 CF processor monitoring . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11210.2.2 CF storage utilization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11310.2.3 CF link performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11310.2.4 CF signalling path length monitoring . . . . . . . . . . . . . . . . . . . . . . . 11510.3 WLM policies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11610.4 RMF Monitor III - Work Delay Monitor . . . . . . . . . . . . . . . . . . . . . . . . . . 11910.5 RMF Postprocessor reports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12210.6 RMF Spreadsheet Reporter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123Chapter 11. Data sharing performance . . . . . . . . . . . . . . . . . . . . . . . . . . . 12511.1 What to measure: defining a baseline . . . . . . . . . . . . . . . . . . . . . . . . . . 12611.2 Local buffer pool performance. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12711.3 Group buffer pool performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12811.3.1 Caching pages in the GBP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12811.3.2 Calculating GBP hit ratios . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12911.3.3 Castout efficiency . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13011.4 Dynamic statement cache . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132Contentsv

11.5 Lock performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13311.5.1 DB2 locking mechanisms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13411.5.2 Global locking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13611.6 DB2PM statistics batch report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14011.7 Tablespace partitioning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14111.7.1 Partitioning to improve tablespace management . . . . . . . . . . . . . 14211.7.2 Partitioning to avoid I/O contention . . . . . . . . . . . . . . . . . . . . . . . . 14211.7.3 Improving I/O performance for nonpartitioning indexes . . . . . . . . 14511.7.4 Partitioning to distribute workload around the members . . . . . . . . 14611.8 SAP update table partitioning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14811.8.1 Analyzing the effectiveness of update table partitioning . . . . . . . . 14811.9 Configuring for query parallelism. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14911.10 Managing DBM1 virtual storage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15011.10.1 Managing SAP work processes . . . . . . . . . . . . . . . . . . . . . . . . . 15111.10.2 Monitoring work process utilization . . . . . . . . . . . . . . . . . . . . . . . 15211.10.3 Managing the DSC size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15311.10.4 Managing open data sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15511.10.5 Monitoring storage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15511.10.6 SAP-related enhancements in DB2 Version 7 . . . . . . . . . . . . . . 15711.10.7 SAP-related enhancements in DB2 V8 . . . . . . . . . . . . . . . . . . . . 15911.11 Configuring DB2 sort pool and workfiles . . . . . . . . . . . . . . . . . . . . . . . 16211.12 Backup policies: avoiding disruptive backups . . . . . . . . . . . . . . . . . . . 164Chapter 12. SAP performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16712.1 Performance problem analysis route map. . . . . . . . . . . . . . . . . . . . . . . 16812.2 Route map for server-wide and system-wide performance analysis . . . 16912.3 Route map for process-specific performance analysis . . . . . . . . . . . . . 17212.4 ST04 and DB2 performance monitoring tools . . . . . . . . . . . . . . . . . . . . 17412.4.1 Installation checks. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17612.4.2 Dynamic Statement Cache analysis . . . . . . . . . . . . . . . . . . . . . . . 17612.4.3 DB2 subsystem activity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17812.5 STAT and STAD statistics records . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17912.6 ST05 SQL trace. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18312.7 ST10 statistics analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188Appendix A. Checking SAP data sharing setup . . . . . . . . . . . . . . . . . . . . 193Check ICLI setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194Check for buffer pool tuning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194VB update tables setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194Check that logon load balancing has been implemented . . . . . . . . . . . . . . . . 195Check batch scheduling groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195Check that VB dispatching has been implemented . . . . . . . . . . . . . . . . . . . . 196DBM1 virtual storage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196viSAP on DB2 for z/OS: High Availability and Performance Monitoring with Data Sharing

Sysplex failover setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196Appendix B. Systems managed duplexing . . . . . . . . . . . . . . . . . . . . . . . . 197Activating a policy including system duplexing. . . . . . . . . . . . . . . . . . . . . . . . 198ICF failure. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202Related publications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237IBM Redbooks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237Other IBM publications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237SAP publications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238Online resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238How to get IBM Redbooks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241Contentsvii

viiiSAP on DB2 for z/OS: High Availability and Performance Monitoring with Data Sharing

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. Consultyour local IBM representative for information on the products and services currently available in your area.Any reference to an IBM product, program, or service is not intended to state or imply that only that IBMproduct, program, or service may be used. Any functionally equivalent product, program, or service thatdoes not infringe any IBM intellectual property right may be used instead. However, it is the user'sresponsibility to evaluate and verify 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.The furnishing of this document does not give you any license to these patents. You can send licenseinquiries, in writing, 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 such provisionsare inconsistent with local law: INTERNATIONAL BUSINESS MACHINES CORPORATION PROVIDESTHIS PUBLICATION "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF NON-INFRINGEMENT,MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Some states do not allow disclaimerof express 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 madeto the information herein; these changes will be incorporated in new editions of the publication. IBM maymake improvements and/or changes in the product(s) and/or the program(s) described in this publication atany time without notice.Any references in this information to non-IBM Web sites are provided for convenience only and do not in anymanner serve as an endorsement of those Web sites. The materials at those Web sites are not part of thematerials for this IBM product and use of those Web sites is at your own risk.IBM may use or distribute any of the information you supply in any way it believes appropriate withoutincurring any obligation to you.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 confirmthe accuracy of performance, compatibility or any oth

SAP on DB2 for z/OS and OS/390: High Availability and Performance Monitoring with Data Sharing December 2003 International Technical Support Organization