Redbookdb 2
Redbookdb 2
Redbookdb 2
ibm.com/redbooks
International Technical Support Organization Application Recovery Tool for IMS and DB2 Databases A Data Recovery Guide November 2002
SG24-6837-00
Note: Before using this information and the product it supports, read the information in Notices on page xiii.
First Edition (November 2002) This edition applies to Version 1.2.0 of IBM Application Recovery Tool for IMS and DB2 Databases (program number 5697-F56) for usage with Version 7 of IBM DATABASE 2 Universal Database Server for z/OS and OS/390 (program number 5675-DB2) and Version 7 of IMS/ESA (program number 5655-B01) as well as Version 6 of both products.
Copyright International Business Machines Corporation 2002. All rights reserved. Note to U.S. Government Users Restricted Rights -- Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
Contents
Figures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi Notices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii Trademarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiv Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The team that wrote this redbook. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Become a published author . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Comments welcome. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...... ...... ...... ...... . . . . . . . .xv . . . . . . . .xv . . . . . . . xvi . . . . . . . xvii
Part 1. The recovery functions of DB2 and IMS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Chapter 1. Overview of DB2 data recovery. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.1 Basics of DB2 data recovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.1.1 DB2 recovery components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.1.2 Changing data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.1.3 DB2 data recovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 1.2 Examples of DB2 data recovery functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 1.2.1 Default recovery using the latest full copy and log . . . . . . . . . . . . . . . . . . . . . . . . 15 1.2.2 TOCOPY recovery using the latest full copy. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 1.2.3 TOCOPY recovery using an incremental copy . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 1.2.4 TOLOGPOINT recovery using log RBA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 1.2.5 MERGECOPY utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 Chapter 2. Overview of IMS data recovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.1 Overview of IMS data recovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.1.1 The need for recovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.1.2 The database utilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2 Examples of backup and recovery utilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2.1 Database Image Copy utilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2.2 Database Change Accumulation utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2.3 Database Batch Backout utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2.4 Database Recovery utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2.5 Impact of recovery variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.3 Overview of Database Recovery Control: DBRC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.3.1 DBRC usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Chapter 3. IMS Online Recovery Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.1 ORS overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2 Installation considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2.1 Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2.2 Operational conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2.3 Defining the ORS environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.3 Operating and administering ORS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.3.1 Database administrator roles with ORS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.3.2 Database availability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Copyright IBM Corp. 2002. All rights reserved.
21 22 22 23 24 24 25 26 27 30 35 35 39 40 41 41 42 42 43 45 45 iii
3.3.3 ORS and IMS shutdown . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.3.4 Performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.4 Sample operation procedures and outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.4.1 Displaying database information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.4.2 Stopping and deallocating the database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.4.3 Building the recovery lists . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.4.4 ORS: displaying the databases status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.4.5 Starting the recovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.4.6 Displaying database status during recovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.4.7 Completing the recovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Chapter 4. Recovering IMS and DB2 data. . . . . . . . . . . . . . . . . . . . . . . 4.1 Consistency of application data across IMS and DB2 . . . . . . . . . . . . 4.1.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.1.2 Two-phase commit protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2 Maintaining consistency after termination or failure . . . . . . . . . . . . . . 4.3 LOG protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.3.1 Termination . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...... ...... ...... ...... ...... ...... ...... ....... ....... ....... ....... ....... ....... .......
45 45 46 46 46 47 48 48 49 50 51 52 52 53 55 56 57
Part 2. IBM Application Recovery Tool for IMS and DB2 Databases . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 Chapter 5. ARTs overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.1 The IBM Data Management tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.1.1 Recovery and replication area . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.2 Application Recovery Tool for IMS and DB2 Databases. . . . . . . . . . . . . . . . . . . . . . . . 5.2.1 The recovery process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.2.2 The use of a VIC point . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.3 The new release . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Chapter 6. ARTs installation and customization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.1 Installation and customization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.1.1 Overall installation process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.1.2 ISPF Primary Panel and Installation Main Panel . . . . . . . . . . . . . . . . . . . . . . . . . 6.2 Prepare ART under DB2 Environment (DB2 bind) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.2.1 DB2 binding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.2.2 Verifying DB2 installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.3 Prepare ART under IMS Environment (ACB generation) . . . . . . . . . . . . . . . . . . . . . . . 6.3.1 IMS ACB generation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.3.2 Verifying the IMS installation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.4 Delete and define ART RECON for IMS and DB2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.5 Adding DRMEXEC to a menu or CLIST . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.6 Replacing the current parmlib . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Chapter 7. Using ART for DB2 recovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.1 ART and DB2 utilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.1.1 Online verses batch invocation of ART DB2 utility control . . . . . . . . . . . . . . . . . . 7.1.2 DRMFIC: Full Image Copy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.1.3 DRMIIC: Incremental Image Copy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.1.4 DRMMERGE: Mergecopy utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.1.5 DRMDLET2: Modify Recovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.1.6 DRMMDISK: Manage disk space . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.2 Primary panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.2.1 DRMVIC: Virtual Image Copy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.2.2 DRMMAP: Recovery map . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 62 62 65 65 66 66 67 68 68 74 76 76 77 78 79 81 81 82 82 85 86 86 86 87 89 91 92 92 93 96
iv
7.2.3 DRMRECOV: Recovery utility. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97 7.2.4 DRMDCHEK: Check data utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 7.2.5 DRMAOP: Auto operator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 7.3 Scenarios using ART . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 7.3.1 Recovery to a VIC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 Chapter 8. Using ART for IMS recovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.1 ART and IMS utilities. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.1.1 DRMINIT: DBRC INIT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.1.2 DRMIC: IMS Image Copy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.1.3 DRMCA: IMS DBRC CA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.1.4 DRMRROEG: Reorg IMS RECON data sets . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.1.5 DRMDLET1: IMS DBRC cleanup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.1.6 DRMMDISK: Disk management of database . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.2 IMS primary panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.2.1 DRMVIC: Virtual Image Copy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.2.2 DRMMAP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.2.3 DRMRECOV . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Chapter 9. Using ART for IMS and DB2 recovery. . . . . . . . . . . . . . . . . 9.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9.1.1 Image copies in IMS and DB2 . . . . . . . . . . . . . . . . . . . . . . . . . . 9.1.2 Concurrent Image Copies in IMS and DB2 . . . . . . . . . . . . . . . . . 9.2 DRMVIC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9.3 DRMRECOV . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9.4 DRMRECOV examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9.4.1 Invoking the DRMRECOV function . . . . . . . . . . . . . . . . . . . . . . . 9.5 DRMRECOV and IMS/ORS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9.5.1 About the interface routine: $AORS . . . . . . . . . . . . . . . . . . . . . . 9.5.2 Sample execution . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... ...... 103 104 104 105 107 107 108 108 108 109 111 112 115 116 116 116 117 119 120 120 123 124 126
Part 3. Appendixes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133 Appendix A. Sample JCL and output for DB2 Recovery . . . . . . . . . . . . . . . . . . . . . . . 135 A.1 DB2 COPY utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136 A.2 ART DRMMAP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138 Appendix B. Sample JCL and output for IMS recovery . . . . . . . . . . . . . . . . . . . . . . . . B.1 Image Copies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B.1.1 Standard Image Copy. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B.1.2 Concurrent Image Copy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B.1.3 Image Copy Type 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B.2 Change Accumulation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B.3 Batch Back-out . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B.4 Database Recovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B.5 Recovering VSAM files for IMS database. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B.6 Dsect listing for I/C and C/A header record . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Appendix C. Additional material . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Locating the Web material . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Using the Web material . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . System requirements for downloading the Web material . . . . . . . . . . . . . . . . . . . . . . . How to use the Web material . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 141 142 142 143 143 146 147 148 149 151 155 155 155 155 156
Related publications . . . . . . . . . . . . . . . . . . . . . . . . . . . IBM Redbooks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Other resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Referenced Web sites . . . . . . . . . . . . . . . . . . . . . . . . . . . How to get IBM Redbooks . . . . . . . . . . . . . . . . . . . . . . . . IBM Redbooks collections. . . . . . . . . . . . . . . . . . . . . .
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
vi
Figures
1-1 1-2 1-3 1-4 1-5 1-6 1-7 1-8 1-9 1-10 1-11 2-1 2-2 2-3 2-4 2-5 2-6 2-7 2-8 2-9 2-10 2-11 3-1 3-2 3-3 3-4 3-5 3-6 3-7 3-8 3-9 3-10 4-1 4-2 4-3 5-1 6-1 6-2 6-3 6-4 6-5 6-6 6-7 6-8 6-9 6-10 6-11 6-12 DB2 update components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 DB2 log and its data sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Taking Image Copies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Image Copy SHRLEVEL REFERENCE. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Image Copy SHRLEVEL CHANGE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Standard recovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Recover to CURRENT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Recover to COPY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Using the TOCOPY recovery. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Recover to LOGPOINT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 The overview of the DB2 TOLOGPOINT recovery . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Overview of IMS database Recovery utilities. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 IMS database Image Copy utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 IMS database Change Accumulation utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 IMS database Batch Backout utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 IMS database Recovery utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 Recovery Example 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 Recovery Example 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 Recovery Example 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 Recovery example 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 Recovery Example 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 Recovery Example 6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 ORS components. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 Display database output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 Recovery database output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 Recovery list for full function databases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 Recovery list for Fast Path databases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 Display database output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 Recovery command output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 Display database after DBR and REC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 Display database after recovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 Completing the recovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 Unit of recovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 Two-phase commit protocol. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 Log protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 The DM Tools categories. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 Installation and customization steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 TSO invoked dialog function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 Product information message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 ART primary panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76 ART main installation panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76 ART DB2 installation panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 ART DB2 primary panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78 ART DB2 FIC utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78 ART DB2 FIC test result . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78 ART IMS installation panel. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 ART IMS Image Copy panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 ART IMS Image Copy test result . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
vii
6-13 6-14 7-1 7-2 7-3 7-4 8-1 8-2 8-3 8-4 8-5 8-6 8-7 8-8 9-1 9-2 9-3 9-4 9-5 9-6 9-7
ART Recon Define panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 ART User Profile Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 Option 2 runs DB2 utilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 ARTs IMS and DB2 panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 Maximum loss is the acceptable loss of processing . . . . . . . . . . . . . . . . . . . . . . . . . 97 VIC scenario . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 IMS ART primary menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104 ART IMS INIT example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 ART JCL for Offline Image Copy with AUTO=Y . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 ART IMS REORG RECON data set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 ART Recovery primary panel. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109 IMS VIC samples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110 Case study of replacing Image Copy with VIC. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111 ART IMS MAP function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112 IMS Offline Image Copy and DB2 Full Image Copy. . . . . . . . . . . . . . . . . . . . . . . . . 116 IMS Concurrent Image Copy and DB2 Concurrent Image Copy . . . . . . . . . . . . . . . 117 ART sequence for VIC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118 ART steps for database recovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120 Application cycle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121 Data Flow for Interface between ART and IMS/ORS. . . . . . . . . . . . . . . . . . . . . . . . 126 The application activities for both IMS and DB2 objects under ART environment. . 127
viii
Tables
1-1 2-1 3-1 3-2 DB2 Image Copy with and without Concurrent Copy. . . . . Types of Image Copy utilities. . . . . . . . . . . . . . . . . . . . . . . The recovery options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Sample databases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ....... ....... ....... ....... ...... ...... ...... ...... ....... ....... ....... ....... . 9 24 44 46
ix
Examples
1-1 1-2 1-3 1-4 1-5 1-6 1-7 1-8 1-9 1-10 3-1 6-1 6-2 6-3 6-4 6-5 6-6 6-7 6-8 6-9 7-1 7-2 7-3 7-4 7-5 7-6 7-7 7-8 7-9 7-10 7-11 7-12 7-13 7-14 8-1 8-2 9-1 9-2 9-3 9-4 9-5 9-6 9-7 9-8 9-9 A-1 A-2 A-3 Default RECOVER SYSIN parm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 Standard RECOVER output. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 TOCOPY SYSIN parm. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 TOCOPY recovery sysout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 TOCOPY recovery sysin with an incremental copy . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Sysout for the recovery utility with full and incremental copies . . . . . . . . . . . . . . . . . 17 TOLOGPOINT recovery. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Sysout from the recovery utility using TOLOGPOINT . . . . . . . . . . . . . . . . . . . . . . . . 17 MERGECOPY creates a single incremental Image Copy . . . . . . . . . . . . . . . . . . . . . 18 MERGECOPY creates a new full copy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 Starting RDM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42 DRM#XINS JCL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 DRMXPROD JCL. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 DRM#XIN1 JCL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 DRMXSYSS sample . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 DRMXIMSS sample . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 DRMXDB2S sample . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 DRMXDSGS sample . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 ART DB2 bind statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 ART IMS Gen sample . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80 DRMFIC generates the Image Copy JCL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87 Attempted incremental copy under ART . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 Successful DB2 incremental Image Copy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 Output of MERGECOPY utility. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 DRMMERGE deletes incrementals removed from the DB2 catalog . . . . . . . . . . . . . 91 Restricted status refuses to allow VIC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 Lock, quiesce and commit for VIC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94 VIC generated DB2 log switch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 Map showing outdated VICs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 Map with recovery points and usable VICs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 DRMMAP report for . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 100 ART DRMREOCV job stream . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101 DB2 recovery job stream generated by ART DRMRECOV . . . . . . . . . . . . . . . . . . . 101 Results of executing ART DRMREOCV . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102 DRMMAP for Recovering IMS DB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 DRMRECOV for IMS DB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 Job output for a VIC for IMS and DB2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119 ART father process for DRMRECOV. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121 SYSIN to DRMRECOV function. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121 JCL for DB2 Recovery created by ART . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122 SYSIN DB2 Recovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122 ART generated IMS recovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123 JCL streams required to execute the $AORS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124 JCL streams built to execute the $AORS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128 SYSUT2 outputs from ART and IMs/ORS Interface routine: $AORS . . . . . . . . . . . 128 Job stream to create DB2 full copy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136 Output for JCL stream in Example A-1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136 Job stream to create DB2 incremental Image Copy . . . . . . . . . . . . . . . . . . . . . . . . 136
xi
A-4 A-5 B-1 B-2 B-3 B-4 B-5 B-6 B-7 B-8 B-9 B-10 B-11 B-12 B-13 B-14
Output for JCL stream in Example A-3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . DRMMAP output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . IMS Image Copy JCL stream. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Output from job in Example B-1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . IMS concurrent Image Copy JCL stream. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Output from job in Example B-3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . IMS Type 2 Image Copy JCL stream . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Output from job in Example B-5. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . IMS Change Accumulation JCL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Output from Example B-7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . IMS Batch Back-out JCL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Output from Example B-9 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . IMS Database Recovery JCL. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Output from Example B-11 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Resetting the high used RBA. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Dsect for header records: Image Copy and Change Accumulation. . . . . . . . . . . . .
137 138 142 142 143 143 143 144 146 146 147 147 148 148 149 151
xii
Notices
This 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 your 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 IBM product, program, or service may be used. Any functionally equivalent product, program, or service that does not infringe any IBM intellectual property right may be used instead. However, it is the user's responsibility 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 license inquiries, 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 provisions are inconsistent with local law: INTERNATIONAL BUSINESS MACHINES CORPORATION PROVIDES THIS 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 disclaimer of 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 made to the information herein; these changes will be incorporated in new editions of the publication. IBM may make improvements and/or changes in the product(s) and/or the program(s) described in this publication at any time without notice. Any references in this information to non-IBM Web sites are provided for convenience only and do not in any manner serve as an endorsement of those Web sites. The materials at those Web sites are not part of the materials 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 without incurring any obligation to you. Information concerning non-IBM products was obtained from the suppliers of those products, their published announcements or other publicly available sources. IBM has not tested those products and cannot confirm the accuracy of performance, compatibility or any other claims related to non-IBM products. Questions on the capabilities 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 as completely as possible, the examples include the names of individuals, companies, brands, and products. All of these names are fictitious and any similarity to the names and addresses used by an actual business enterprise is entirely coincidental. COPYRIGHT LICENSE: This information contains sample application programs in source language, which illustrates programming techniques on various operating platforms. You may copy, modify, and distribute these sample programs in any form without payment to IBM, for the purposes of developing, using, marketing or distributing application programs conforming to the application programming interface for the operating platform for which the sample programs are written. These examples have not been thoroughly tested under all conditions. IBM, therefore, cannot guarantee or imply reliability, serviceability, or function of these programs. You may copy, modify, and distribute these sample programs in any form without payment to IBM for the purposes of developing, using, marketing, or distributing application programs conforming to IBM's application programming interfaces.
xiii
Trademarks
The following terms are trademarks of the International Business Machines Corporation in the United States, other countries, or both:
Redbooks(logo) IBM eServer AIX CICS DataJoiner DataPropagator DB2 DB2 Universal Database DFS DFSMSdfp DRDA Enterprise Storage Server FFST FlashCopy IBM IMS IMS/ESA Language Environment MVS OS/2 OS/390 OS/400 Parallel Sysplex Perform PTX QMF RACF RAMAC Redbooks RETAIN RMF S/390 SP System/390 TME WebSphere z/OS z/VM
The following terms are trademarks of International Business Machines Corporation and Lotus Development Corporation in the United States, other countries, or both:
Lotus Notes Lotus Notes Word Pro
The following terms are trademarks of other companies: ActionMedia, LANDesk, MMX, Pentium and ProShare are trademarks of Intel Corporation in the United States, other countries, or both. Microsoft, Windows, Windows NT, and the Windows logo are trademarks of Microsoft Corporation in the United States, other countries, or both. Java and all Java-based trademarks and logos are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States, other countries, or both. C-bus is a trademark of Corollary, Inc. in the United States, other countries, or both. UNIX is a registered trademark of The Open Group in the United States and other countries. SET, SET Secure Electronic Transaction, and the SET Logo are trademarks owned by SET Secure Electronic Transaction LLC. Other company, product, and service names may be trademarks or service marks of others.
xiv
Preface
In todays fast-moving online transaction environment, many businesses have applications that need to access and update data from both IBM DB2 for OS/390 and IMS databases, in order to make critical information instantly available throughout the enterprise. DB2 and IMS both coordinate data changes. However, if users later need to recover both databases to the same point, they must recover data separately dealing with different logs, different utilities, and possibly complex recovery scenarios that can be time consuming and error prone. IBM Application Recovery Tool for IMS and DB2 Databases is the new name of the tool previously called DB2 Recovery Manager. This tool simplifies and coordinates the recovery of both DB2 and IMS data to a common point, cutting the time and cost of data recovery and availability. It eliminates the error-prone complexity of managing different logs, utilities, and processes to do recovery from both databases. This new release, as announced by IBM in September 2002, is also a replacement for IBM IMS Recovery Saver (program number 5655-E19.) Application Recovery Tool for IMS and DB2 Databases (often abbreviated to the acronym ART throughout this redbook) works with either DB2 or IMS or with both. It uses Image Copies for both databases and establishes synchronization points in each called a Virtual Image Copy (VIC) to which recovery may be done. After an application is run where both DB2 and IMS are accessed, Application Recovery Tool for IMS and DB2 Databases is invoked to establish a VIC. It also establishes a quiesce point and notes where the point is located on the respective logs. During recovery, the user specifies the need to recover to this VIC, and Application Recovery Tool for IMS and DB2 Databases applies the appropriate Image Copies and causes the log to be applied up to this point. If users prefer, rather than using VIC for recovery, they can use Application Recovery Tool for IMS and DB2 Databases to automate the recovery of resources. The tool will generate the Job Control Language, locate the proper Image Copies, and control the execution of jobs for either DB2 or IMS. This IBM Redbook provides an overview of the application recovery capabilities of both IMS and DB2, as well as a detailed description of the IBM Application Recovery Tool for IMS and DB2 Databases, and illustrates through recovery scenarios the operational improvements that the tool can offer.
xv
Key-Soo Rho has been a systems programmer and DBA since IMS 1.1.4 and DB2 1.3. He is currently working for IBM Canada, in the Security Industry Service division, as a freelance consultant. His areas of expertise include database design, performance, and recovery. He was involved in the support of the first group of IMS Fast Path (IMS 1.1.4) customers in the Communication and Finance Institute in Canada. Key-Soo has written several exits for IMS DB/DC and for monitoring DB2 buffer pools for sizing, allocation, and objects placement. He has also developed a tool which recovers both IMS DLI database and Fast Path DEDB to any valid point-in-time rather than the DBRC RCVTIME timestamp. Warren Weigel, at the time of leaving IBM near the end of this project, was an IT Architect Systems Integration with IBM Global Services Strategic Outsourcing based in Southbury, Connecticut. He had been a DBA for 13 years working with IMS and DB2 databases in all phases of design, physical modeling, and implementation, and supporting several customers applications. For the last 6 years Warren was responsible for the recovery of both IMS and DB2 databases, and was also the focal point for database disaster recovery support activity with health care customers. Thanks to the following people for their contributions to this project: Maritza Dubec Emma Jacobs Jouko Jantti Bart Steegmans International Technical Support Organization, San Jose Center Rich Conway International Technical Support Organization, Poughkeepsie Center Ignacio Herrera Mark Leshinsky Dave Moore Steve Perry Charlie Roskosz Dave Schwartz Ann Thompson Greg Vance IBM Silicon Valley Lab Patrick Allouche Thierry Hubert Infotel, France
xvi
Comments welcome
Your comments are important to us! We want our Redbooks to be as helpful as possible. Send us your comments about this or other Redbooks in one of the following ways: Use the online Contact us review redbook form found at:
ibm.com/redbooks
Mail your comments to: IBM Corporation, International Technical Support Organization Dept. QXXE Building 80-E2 650 Harry Road San Jose, California 95120-6099
Preface
xvii
xviii
Part 1
Part
Chapter 1.
Active logs
The active log data sets, standard VSAM ESDS, are used for data recovery and to ensure data integrity in case of software or hardware errors. DB2 uses active log data sets to record all updates to user and system data. The active log data sets are open as long as DB2 is active. Active log data sets are reused when the total active log space is used up, but only after the active log (to be overlaid) has been copied to an archive log.
DB2 supports dual active logs. It is strongly recommended to make use of dual active logs for all DB2 production environments.
Update
Buffer Pool
TABLE SPACE
BSDS BSDS
Archive LOGS
Active Log
SYSCOPY
Assume any type of program that is going to update data contained in a table space. At the first open of the page set containing the table space, a record is written to SYSLGRNX, and an analogous record will be written at (pseudo) close time. This will help DB2 in narrowing down the range of log records to apply at recovery time. Every change to the data takes place in the pages contained in buffer pool, and the pages will be externalized asynchronously to disk when the buffer pool write thresholds are reached. The changed records are also logged synchronously at commit time on both copies of the active log data sets after having temporarily transited through the log output buffer.
It is the overall size of all active log data sets that is important for the DB2 DBA: this size plays a critical role in the backup and recovery strategy, besides being a critical factor in the system availability. Note: PTF UQ54646 for APAR PQ48126 increases the usable size of active and archive log data sets from 2 to 4 GB. The number of active log data sets, multiplied by the space of each active log, defines an amount of log information most readily available: the capacity of the active log. This capacity defines the time period that has the best recovery performance and the highest data availability service level. The reason is that the DB2 RECOVER utility generally performs better with an active log than with an archive log.
Start Time
Time 1
Time 2
Current Time
DB2 LOG
ACTIVE LOG
Archive logs
Archive log data sets are DB2 managed backups of the active log data sets. Archive log data sets are created automatically by DB2 whenever an active log is filled. They may also be created with the -ARCHIVE command for operational requirements. Additional circumstances may trigger the archiving process. The DB2 for OS/390 Administration Guide, SC26-8957, describes these circumstances in detail. DB2 supports dual archive logs and it is highly recommended to use dual archive log data sets for all production environments. When dual archive log is specified during the archiving, the primary active log is read and two archive log data sets are written in parallel. For better archive log availability, you should define both copies on different devices (or SMS classes) to physically separate the dual data sets. Archive log data sets are required for any recovery that spans a period of time in excess of the time covered by the active logs. Archive log data sets are sequential data sets that can be: Defined on disk or on tape Migrated Deleted with standard procedures The use of disk for archive logs is becoming more popular for ease of access and performance, especially in data sharing environments. Archive log data sets are required for data integrity. Procedures are required to ensure that archive log data sets are only deleted when they are not going to be required anymore. This book contains references related to archive log deletes in the sections: Deleting Image Copies and archive logs on page 10 Impact of log size on backup and recovery strategy on page 6
Image copies
The concept of a table space backup is the same as any other data backup: taking a copy of the data and then storing it on a different medium in case of failure or damage to the original. The simplest case of a taking a backup involves restricting the table space to ensure that no
further transactions occur, and then simply backing it up. Image copies are the backup of user and system data. DB2 for OS/390 Version 6 has introduced the possibility of taking Image Copy also for indexes in order to speed up recovery. Figure 1-3 shows the process of taking an Image Copy of a table space. The copy can be full or incremental, and, once completed, the copies are recorded in the SYSIBM.SYSCOPY catalog table. For a well-managed backup and recovery policy, it is recommended that the amount of data in Image Copy data sets should cover at least three generations of Image Copies in order to guarantee recoverability, one of which possibly executed with the CHECK DATA option for COPY. This means that in large DB2 installations a large number of Image Copy data sets is required and needs to be managed. Image copies ensure user and system data integrity. Their availability is critical for DB2 system and application availability. DB2 can optionally generate up to four Image Copies of a table space, index space, or data set (for a multiple data set table space or index space) during one execution. Two of these copies are intended for a disaster recovery at a remote site. For better Image Copy availability, users should define the copies on different devices (or SMS classes) to physically separate the data sets. For sample jobs on executing full or incremental Image Copies, refer to Appendix A.1, DB2 COPY utility on page 136.
COPY
The SHRLEVEL option is used to specify application access during the copy. SHRLEVEL REFERENCE creates a consistent copy. During the SHRLEVEL REFERENCE copy, only 8
Application Recovery Tool
Y P OC S Y S
EC A P S EL BA T
MERGE COPY
INCR Copy
Full Copy
gi t c e go L e vo LA vit c A
read access is allowed. SHRLEVEL CHANGE creates a copy while the data is updated. Figure 1-4 and Figure 1-5 on page 9 illustrate the impact these copies have on application read and write processing.
APPLICATION WRITE
IMAGE COPY
Figure 1-4 Image Copy SHRLEVEL REFERENCE
The DB2 RECOVER utility can handle the updates not reflected in a SHRLEVEL CHANGE copy by applying the log records corresponding to those updates. .
IMAGE COPY
Another option for Image Copies is the use of the CONCURRENT copy feature, with or without hardware functions like SnapShot (for RVA) or FlashCopy (for ESS). These functions allow DB2 to create full Image Copies with only a very short time interval of data unavailability. The DB2 RECOVER utility is able to handle these copies. Table 1-1 shows the different options available for an Image Copy with and without the concurrent option.
Table 1-1 DB2 Image Copy with and without Concurrent Copy
CONCURRENT option Type of Image Copy FULL CONCURRENT(YES) CONCURRENT(NO) YES YES INCR NO YES SHRLEVEL option REFERENCE YES YES CHANGE YES a, b YES
a. Short unavailability at data set level b. Not valid for page size larger than 4 KB
Other copies
DB2 table and index spaces can be copied by other utilities, not under DB2 control. This can include both IBM (DFSMSdfp, DSN1COPY) and non-IBM products. DB2 has a limited support for these copies since they are not under its direct control. The copies must be restored outside of DB2, and the user must execute a RECOVER with option LOGONLY to apply the changes not reflected in the external copy in order to maintain data integrity and consistency.
For more in depth information about DB2 table space recovery, including system and disaster recovery, refer to DB2 UDB for OS/390 and z/OS Version 7 Utility Guide and Reference, SC26-9945, and DB2 UDB for OS/390 and z/OS Version 7 Administration Guide, SC26-9931. The rebuilding of a table space, if it becomes damaged or corrupted in some way, is called recovery. Since DB2 has logged all changes to your data, as long as all the needed log data sets (active and archived) are available, the DB2 utility RECOVER can take care of this critical task by looking for the necessary logs and re-applying all the changed records up to the moment of failure. This process can be accelerated if Image Copies, full and incremental, are available. In this case RECOVER, instead of going back to the first changes ever recorded in the log, will request and directly apply the most recent Image Copy. Figure 1-6 depicts the standard recovery process.
Archive Logs
RECOVERY
During the straight recovery process to the moment of failure (or to current), DB2 uses the entries in SYSCOPY to identify and locate the most recent copy, will restore it, then it will access SYSLGRNX and check if recovery related log ranges exist, then access the BSDS to determine which log data sets are needed, and then it will apply the log records to the data following the log sequence.
QUIESCE utility
QUIESCE utility is used to establish a point of consistency for a table space or a set of logically related table spaces. It waits till the current unit of work is completed, and during its execution it prevents new units of work from starting. It updates the SYSLGRNX and it will force the pending writes to the table spaces involved if the WRITE(YES) option is specified. Its successful execution is recorded in SYSCOPY, just like an Image Copy, and the entry con be used for recovery.
Y PO C S Y S
EC A P S X EDN I EC A P S E L B A T
SD S SD S B B go L e vit c A go L evitc A XN RG L S Y S
Incr Copy Full Copy
11
Image Copy
All log records applied to current point in time
Log
Image Copy Restore
Recovery Point
To a specific point-in-time This applies mostly to application related problems and it terminates the recovery at the specified point. Because it recovers data to a prior time, and not to the present (current) time, it is referred to as point-in-time recovery. A recovery to a prior point-in-time will use either the TOCOPY, TORBA, or TOLOGPOINT options of RECOVER. Care must be taken when dealing with data which is either logically or referential integrity related. The COPY you are recovering to must be in sync across the involved set of table spaces.
12
When recovering DB2 data to a specific point-in-time, two types of options are available: TOCOPY TOCOPY identifies an Image Copy. See Figure 1-8. .
Image Copy
No log records applied after copy restore
Log
Image Copy Restore
Recovery Point
This recovery is the restoration of a previous version of the table space, using an image that was created during a backup operation. It is often used when a long running job goes wrong and a precautionary Image Copy was taken before starting the execution. Recovery is restored to the value of that copy, without applying subsequent changes from the log. It is recommended that the copies are taken with SHRLEVEL REFERENCE. If the Image Copy in TOCOPY cannot be applied, RECOVER TOCOPY uses an earlier full Image Copy and applies logged changes up to the specified point. If the Image Copy data set is cataloged when the Image Copy is made, then the entry for that copy in SYSIBM.SYSCOPY does not record the volume serial numbers of the data set. Identify that copy by its name, using TOCOPY data set name. If the Image Copy data set was not cataloged when created, then you can identify the copy by its volume serial identifier, using TOVOLUME volser. In this case the table space is restored from the latest backup image, but all units of work processed between the backup and the restore are lost, as shown in Figure 1-9.
13
BACKUP Database
Units of Work
RESTORE Database
Create
Time
TORBA or TOLOGPOINT This recovery is the re-application of transactions recorded in the table space log files after a table space backup image has been restored up to a specific point-in-time identified by an RBA or an LRSN value. It may be used to synchronize the updates of a table space with those of other logically related table spaces. See Figure 1-10.
Image Copy
Log records applied to specific RBA or LOGPOINT
Log
Image Copy Restore
Recovery Point
In a non-data-sharing environment, TORBA and TOLOGPOINT are interchangeable keywords that identify an RBA on the log at which recovery stops. Once data sharing is implemented, only the TOLOGPOINT keyword can be used. TORBA can be used in a data sharing environment only if the TORBA value is before the point at which data sharing was enabled. With TORBA and TOLOGPOINT, the most recent full Image Copy taken before that point on the log is restored, and logged changes are applied up to, and including, the record that contains the specified log point. If no full Image Copy exists before the 14
Application Recovery Tool
chosen log point, recovery is attempted entirely from the log, applying the log from page set creation to the chosen log point. This assumes you have not used the MODIFY RECOVERY utility to delete SYSIBM.SYSLGRNX records for the page set. Table space will be recovered to the RBA of the quiesce point using first the full Image Copy, the incremental Image Copy, and finally applying the records from the DB2 logs (see Figure 1-11).
L o g S ta rt
F u ll Im a g e Copy
In c re m e n ta l Im a g e C o p y Q u ie s c e
T im e L in e
RBA 0
In this case the table space is being restored to RBA XC0040 in the DB2 catalog. The table space is restored from the latest full backup image, subsequent incremental Image Copies are applied and log records are applied up to the quiesce point, so that all units of work processed between the backup and the quiesce are preserved.
1.2.1 Default recovery using the latest full copy and log
The statement in Example 1-1 shows the input for the default, standard TO CURRENT recovery execution.
15
The sysout from the DB2 standard RECOVER (see Example 1-2) lists the UTILID used, the Image Copy that was used, and the forward log processing if any.
Example 1-2 Standard RECOVER output
OUTPUT START FOR UTILITY, UTILID = TEMP RECOVER TABLESPACE DSNDB04.DEPT SYSCOPY P RECORD ENCOUNTERED FOR TABLESPACE DSNDB04.DEPT , PIT RBA=0002B01CF937 THE IMAGE COPY DATA SET PAOLOR3.T194406.DSNDB04.DEPT WITH DATE=20020510 AND TIME IS PARTICIPATING IN RECOVERY OF TABLESPACE DSNDB04.DEPT MERGE STATISTICS FOR TABLESPACE DSNDB04.DEPT NUMBER OF COPIES=1 NUMBER OF PAGES MERGED=3 ELAPSED TIME=00:00:01 RECOVERY COMPLETE, ELAPSED TIME=00:00:02 UTILITY EXECUTION COMPLETE, HIGHEST RETURN CODE=0
The sysout from the DB2 TOCOPY recovery job (see Example 1-4) lists the UTILID (utility identifier) used, the contents of the recovery parm, and the data set actually used along with the date and time of its creation. If the Image Copy you have specified in your sysin statement is unavailable, DB2 will automatically fall back to the next available full Image Copy and attempt to log forward to the point-in-time that the unavailable Image Copy was taken.
Example 1-4 TOCOPY recovery sysout
OUTPUT START FOR UTILITY, UTILID = PAOLOR3 RECOVER TABLESPACE DSNDB04.DEPT DSNUM 1 TOCOPY PAOLOR3.T212930.DSNDB04.DEPT THE IMAGE COPY DATA SET PAOLOR3.T212930.DSNDB04.DEPT WITH DATE=20020506 AND TIME=172930 IS PARTICIPATING IN RECOVERY OF TABLESPACE DSNDB04.DEPT DSNUM 1 MERGE STATISTICS FOR TABLESPACE DSNDB04.DEPT DSNUM 1 NUMBER OF COPIES=1 NUMBER OF PAGES MERGED=3 ELAPSED TIME=00:00:01 - RECOVER TO A PRIOR POINT IN TIME MAY LEAVE TABLESPACE DSNDB04.DEPT INCONSISTENT RECOVERY COMPLETE, ELAPSED TIME=00:00:01 UTILITY EXECUTION COMPLETE, HIGHEST RETURN CODE=4
apparent in studying the sysout generated by the job using this statement as sysin (see the Example 1-6). Data set PAOLOR3.T230045.DSNDB04.DEPT is an incremental DB2 Image Copy.
Example 1-5 TOCOPY recovery sysin with an incremental copy
RECOVER TABLESPACE DSNDB04.DEPT DSNUM 1 TOCOPY PAOLOR3.T230045.DSNDB04.DEPT
Instead of one copy data set being applied, we have two DB2 Image Copies used to recover the table space. The first copy is the most recent full copy created prior to the incremental copy referenced in the parm.TOCOPY recovery job output (see the Example 1-6).
Example 1-6 Sysout for the recovery utility with full and incremental copies
OUTPUT START FOR UTILITY, UTILID = PAOLOR3 RECOVER TABLESPACE DSNDB04.DEPT DSNUM 1 TOCOPY PAOLOR3.T230045.DSNDB04.DEPT THE IMAGE COPY DATA SET PAOLOR3.T225841.DSNDB04.DEPT WITH DATE=20020506 AND TIME=185842 IS PARTICIPATING IN RECOVERY OF TABLESPACE DSNDB04.DEPT DSNUM 1 THE IMAGE COPY DATA SET PAOLOR3.T230045.DSNDB04.DEPT WITH DATE=20020506 AND TIME=190045 IS PARTICIPATING IN RECOVERY OF TABLESPACE DSNDB04.DEPT DSNUM 1 MERGE STATISTICS FOR TABLESPACE DSNDB04.DEPT DSNUM 1 NUMBER OF COPIES=2 NUMBER OF PAGES MERGED=3 ELAPSED TIME=00:00:01 - RECOVER TO A PRIOR POINT IN TIME MAY LEAVE TABLESPACE DSNDB04.DEPT INCONSISTENT RECOVERY COMPLETE, ELAPSED TIME=00:00:01 UTILITY EXECUTION COMPLETE, HIGHEST RETURN CODE=4
Output from the TOLOGPOINT recovery lists all Image Copies applied, both the full copy and any subsequent incremental copies, as well as the RBA range of the DB2 logs applied in the recovery process (see Example 1-8). The recovery process terminates with the last log record whose RBA is not greater than byte-string, which is a string of up to 12 hexadecimal characters. If byte-string is the RBA of the first byte of a log record, that record is included in the recovery.
Example 1-8 Sysout from the recovery utility using TOLOGPOINT
OUTPUT START FOR UTILITY, UTILID = PAOLOR3 RECOVER TABLESPACE DSNDB04.DEPT DSNUM 1 TOLOGPOINT X'0002AF2387CA' THE IMAGE COPY DATA SET PAOLOR3.T231138.DSNDB04.DEPT WITH DATE=20020506 AND TIME=191139 IS PARTICIPATING IN RECOVERY OF TABLESPACE DSNDB04.DEPT DSNUM 1 MERGE STATISTICS FOR TABLESPACE DSNDB04.DEPT DSNUM 1 -
17
NUMBER OF COPIES=1 NUMBER OF PAGES MERGED=3 ELAPSED TIME=00:00:01 - RECOVER UTILITY LOG APPLY RANGE IS RBA 0002AF23652F LRSN 0002AF23652F TO RBA 0002AF236A1F LRSN 0002AF236A1F - RECOVER TO A PRIOR POINT IN TIME MAY LEAVE TABLESPACE DSNDB04.DEPT INCONSISTENT RECOVERY COMPLETE, ELAPSED TIME=00:00:01 UTILITY EXECUTION COMPLETE, HIGHEST RETURN CODE=4
A new full Image Copy from one or more incremental Image Copies and a prior full copy
Example 1-10 MERGECOPY creates a new full copy
DSNUGUTC - OUTPUT START FOR UTILITY, UTILID = DEPT DSNUGUTC - TEMPLATE PAOLOR1 UNIT SYSDA DSN(PAOLOR3.T&TI..DSNDB04.DEPT) DISP(MOD,CATLG,CATLG) DSNUJTDR - TEMPLATE STATEMENT PROCESSED SUCCESSFULLY
18
DSNUGUTC - MERGECOPY TABLESPACE DSNDB04.DEPT NEWCOPY YES COPYDDN(PAOLOR1) DSNUGDYN - DATASET ALLOCATED. TEMPLATE=PAOLOR1 DDNAME=SYS00001 DSN=PAOLOR3.T194406.DSNDB04.DEPT DSNUYBR3 - THE PRIMARY IMAGE COPY DATA SET PAOLOR3.T194259.DSNDB04.DEPT WITH DATE=020510 AND TIME=154300 IS PARTICIPATING IN MERGECOPY. DSNUYBR3 - THE PRIMARY IMAGE COPY DATA SET PAOLOR3.T183607.DSNDB04.DEPT WITH DATE=020510 AND TIME=143607 IS PARTICIPATING IN MERGECOPY. DSNUYBR0 - COPY MERGE COMPLETE NUMBER OF COPIES=2 NUMBER OF COPIES MERGED=2 TOTAL NUMBER OF PAGES MERGED=5 ELAPSED TIME=00:00:00 DSNUGBAC - UTILITY EXECUTION COMPLETE, HIGHEST RETURN CODE=0
For a more detailed discussion of the MERGECOPY utility and options, refer to the DB2 UDB for OS/390 and z/OS Version 7 Utility Guide and Reference, SC26-9945.
19
20
Chapter 2.
21
Online programs
IMS online transactions use dynamic back out to UNDO updates done by any incomplete unit of work. Abending online programs are automatically backed out by the online system using the log records, which may reside in the WADS, OLDS, or the SLDS. If the online system failure occurred while an application program is running, then updates made by the program will be automatically backed out when the system is restarted.
22
When a BMP terminates abnormally, the changes the program has made since the last commit point are backed out. If a system failure occurs so that the IMS control region terminates abnormally while updating BMPs are running, the IMS emergency restart backs out all changes made by the programs since the last commit point. At IMS restart time, if the emergency restart cannot complete the back out for any of the individual transactions, then affected database are automatically stopped and DBRC sets on the flag BACKOUT NEEDED to warn that a recovery is needed prior to further updates. It also increments the BACKOUT NEEDED COUNTER for this IMS and builds a BACKOUT record, which contains the UOR that failed in backout, along with a list of databases needing backout.
Databases
DLI Batch
Online Logs
Batch Logs
Image copy
Database Recovery
DBRC RECONs
Batch Backout
Change Accum.
C/A (-)
C/A (+)
Recovered Databases
23
For sample jobs of Image Copy executions see Appendix B.1, Image Copies on page 142.
24
DBDLIB
RECONs
Controls
Database
Summaries
COPY OUTOUT
Figure 2-2 IMS database Image Copy utility
25
Accumulation output) span an Image Copy time or a reorganization time; in this case a purge date and time corresponding to the Image Copy or reorganization time must be specified. The user is strongly advised to establish procedures which encompass the guidelines and rules as stated in the Recovery section. The use of the DBRC will assist the user in this cases.
DBDLIB
RECONs
Controls
LOGs
Change Accum
OLD C/As
NEW C/As
Summaries
For sample jobs of Image Copy executions, see Appendix B.1, Image Copies on page 142.
26
The release of the Batch Backout utility must match the release of IMS under which the jobs creating the log data sets ran. In a data sharing environment, if the IMS job created the log data sets under IRLM control, then any Batch Backout of those logs must execute under IRLM. And also, in case of a Parallel Sysplex environment, the used structures must be included in //DFSVSAMP DD. When the Batch Backout refers to a PSB which accessed DEDBs, the region type must be DBB instead of DL/I. Also, the same ACBLIB library should be allocated by the backout that was allocated by the IMS online. Only the logs created after a reorganization will be used. For backing out the updates of a database you need to provide all data sets that are related to PCBs used for the updates.
RECONs
Controls
LOGs
Databases
Batch Backout
Summaries
New Logs
For sample jobs of Batch Backout executions, see Appendix B.3, Batch Back-out on page 147.
27
It is highly recommended that DBRC be used to create the JCL streams for each execution of this utility. DBRC will ensure that all the correct inputs are supplied. Depending upon what inputs are required for the recovery, the Recovery utility can be run in a number of ways. Generally, the main input to Recovery utility is the Image Copy data set. Other input data sets can consist of any log data sets, or Change Accumulation data sets that may be required. The utility can run using only the log information as input, in this case the existing database would be updated with the log data. The database Recovery utility is executed in a DL/I batch region. It allocates the database data sets in exclusive mode, so that there can be no other database activity at the time. Therefore, the affected the database must either be unallocated to the IMS online or deallocated by the command, /DBR. The following restrictions apply when you run the database Recovery utility (see Figure 2-5): Differently from the Image Copy utility, you can recover only one data set for each execution. The output log from the Log Merge utility (DFSLTMG0) cannot be used. For shared secondary index, specify only the first DBD. Then the utility recovers the entire data set. If the DEDB target area is not registered in DBRC RECON, and RECON has a FORCER attribute, then the utility aborts with an error message. If RECON has a NOFORCER attribute, then the ddname for the input must match the area name. If the DEDB area is registered in RECON: The ddname and data set name for the input must match the names defined for ADS in RECON. The area must be marked recovery needed in RECON. If the data set access method is OSAM, then the OSAM data sets do not need to be redefined. For recovery of a VSAM data set other than one restored from a copy created by Image Copy 2, the VSAM data set must have the HURBA reset prior to executing the database Recovery utility. This can be done by redefining the data set or by the program reported in Appendix B.5, Recovering VSAM files for IMS database on page 149. For sample jobs of Recovery execution, see Appendix B.4, Database Recovery on page 148.
28
DBDLIB
RECONs
Controls
Image Copies
LOGs
Change Accums.
Recovery Utility
Summaries
Database
The following scenarios describe the events of the Recovery processing based on different types of input data sets. The database Recovery utility is executed in a special IMS batch region. This allows the utility to be run independently of the IMS online region. The Image Copy of the data base to be supplied as input to the database Recovery utility can be: An Image Copy created by the database Image Copy Utility DFSUDMP0. An Image Copy created by the online database Image Copy utility - DFSUICP0. A HISAM unload data set created by the HISAM Reorganization Unload utility DFSURUL0. An Image Copy created by Image Copy 2 utility DFSUDMT0. The changes to the data base to be supplied as input to the Data Base Recovery utility which occurred after the Image Copy has been take can be: The system log data sets created by IMS during normal execution include both IMS online and Batch regions. An accumulation of the data base changes on the IMS system log created by the Data Base Change Accumulation utility - DFSUCUM0. The Change Accumulation and the logs created after the Change Accumulation. Note that if a fuzzy copy is used to back up a database data set, changes made concurrent with, and subsequent to, the Image Copy are required. The online Image Copy utility provides on SYSOUT the volume serial number of the first log data set that may contain applicable changes.
29
Recovery will be performed in phases according to the user inputs. Phase 1 and Phase 2 are mutually exclusive. The valid input to each phase is: Phase 1: Image Copy or Image Copy and Change Accumulation. Phase 2: Standalone data set restore plus Change Accumulation Phase 3: Log data sets If the users back up copy is a disk dump (DFSMS) of some form, the data set must be first restored, then Recovery must be executed with Change Accumulation and/or log data sets as input. The Recovery basically consists of Phases 1 and 3, or Phases 2 and 3 when recovering a complete data set. Each Image Copy and Change Accumulation input file contains a creation date/time in its header records and each log record contains a creation date/time as well. Change Accumulation contains a PURGE date/time if the user specified a purge date/time during Change Accumulation execution, or zeros in the field if no purge date/time was specified. These date/times are used as follows: Image Copy and Change Accumulation creation date/times are checked when Change Accumulation is used in input: If the Image Copy is later, then DFS2804A is issued since any records present would also be on the Image Copy. Image Copy creation date/time is checked against the Change Accumulation purge date/time. If the Image Copy is earlier, then DFS2804A is issued since potential log records produced between those times would have been purged and data base integrity cannot be guaranteed. Once the Change Accumulation file is read, the log record date/time within the Change Accumulation record is compared to the Image Copy creation time. If the log time is earlier, the Change Accumulation record is ignored. The creation date/time in the log record (from the log input, not those in the Change Accumulation input) is compared to the Image Copy creation date/time or to the latest Change Accumulation log record date/time (which ever is later). If the log date/time is earlier, the log records are ignored until a record containing an equal or higher condition is encountered.
Example 1
Figure 2-6 depicts the first example.
30
Example 1
6-1 LOG1 C/A 6-2 6-3 LOG2 I/C 6-4 6-5 LOG3 Recovery 6-6
Recovery input data consists of C/A, I/C, LOG2 and LOG3. Compare I/C to C/A creation dates. I/C later = DFS2804A message Read and count all C/A records, however, ignore them. Restore the I/C to the data base data set, and count the records. Read the log, comparing the log record date to the I/C creation date. Drop all records from LOG2, count and apply records from LOG3.
Example 2
Figure 2-7 depicts the second example.
Example 2
6-1 6-2 6-3 6-4 6-5 LOG3 C/A Recovery 6-6
Recovery input data consists of I/C, C/A and LOG3: Compare I/C to C/A creation date I/C earlier = OK Compare/merge I/C, and C/A. Restore data base data set, and count both I/C and C/A records. Read the log, apply, and count the records. This is normal or expected input. If the user were to input LOG1, LOG2 or both, Recovery will accept the log data sets, but ignore all the records, and Recovery will be successful. Recovery will first merge Image Copy and Change Accumulation logical records and create the partially restored data set, then read each log record and randomly update the data set.
Chapter 2. Overview of IMS data recovery
31
Since the log records on LOG1 and LOG2 were also on the Change Accumulation, and will be ignored, this is needless processing, Only LOG3 should be input.
Example 3
Figure 2-8 depicts the third example.
Example 3
6-1 6-2 6-3 6-4 LOG3 I/C 6-5 6-6 LOG4 Recovery 6-7
LOG1 LOG2
Recovery input data consists of I/C, C/A and LOG4: Compare I/C to C/A creation date. I/C earlier = OK Compare I/C creation date to C/A purge date. I/C later = OK Read C/A. Ignore records whose log data set earlier than I/C creation date (06/03). Compare/merge I/C and C/A. Restore the data base data set, and count both I/C, C/A records. Read the log, apply an count the records. The Change Accumulation data set contains records only from LOG2 and LOG3 because of 06/02purge date. The first phase will match these to the Image Copy which means some extra unnecessary processing is involved in handling records from LOG2 which also exist on the Image Copy data set. The purge date should have been 06/03.
Example 4
Figure 2-9 depicts the fourth example.
Example 4
6-1 6-2 6-3 6-4 LOG3 I/C
Figure 2-9 Recovery example 4
6-5
LOG1 LOG2
Recovery
32
Recovery input data consists of I/C, LOG1, LOG2 and LOG3: Restore the I/C to the data base data set and count all the records Read the log. Ignore the records from LOG1 and LOG2 because the date is earlier than I/C date. Apply and count the records from LOG3. Because there is no Change Accumulation input, each log record is compared to the Image Copy creation date until an equal or later date is encountered. In this example, LOG1 and LOG2 are ignored, however it does result in needless processing.
Example 5
Figure 2-10 depicts the fifth example.
Example 5
6-1 6-2 6-3 6-4 6-5 LOG3 Recovery 6-6
Recovery input data consists of I/C, C/A and LOG3. Compare I/C to C/A creation dates. I/C earlier - OK. Compare I/C creation to C/A purge dates. I/C earlier = DFS2804A. Compare/merge I/C and C/A. Restore the data base data set, and count both I/C and C/A records. Read the log, apply an count the records. Since the Change Accumulation purge date 06/02-12.00 is higher than the Image Copy creation date, the message DFS2804A is issued indicating potential missing log records, which are missing in this example. The purge would drop all records from LOG1 and Recovery cannot complete successfully.
Example 6
Figure 2-11 depicts the sixth example.
33
Example 6
6-1 6-2 LOG1 I/C 6-3 6-4 LOG2 Recovery 6-6
Reorganized
This example shows a situation where Recovery is very difficult at the least. If the user inputs the Image Copy and both log data sets it might appear to recover, however, the data base is not usable. LOG2 reflects the new physical location of the data base segments while the Image Copy and LOG1 reflect the old location. The user must recover to the beginning of the reorganization by executing Recovery using Image Copy and LOG1. Reorganization must then be re-executed. Recovery must then be executed. Recovery must then be executed using only LOG2 as input. If an Image Copy were taken immediately following the reorganization, Recovery would have been possible by using the Image Copy and LOG2. DBRC will protect you from this situation. From the examples above some basic rules can be drawn and the users should ensure that the operating procedures adhere to these rules: Always Image Copy the entire data base immediately after reorganization or data base load (see Example 6 on page 33.) This establishes a good starting point should Recovery be necessary. Never supply a log data set to Recovery containing the log records whose date/time is earlier than the Image Copy creation date/time if possible: Some users create Image Copy while the log data set is being created via the /DBD command. If at all possible a Change Accumulation should be executed specifying PURGE to remove the earlier records. The possible PURGE date/time should never be later than the last Image Copy creation date/time: If the PURGE date/time is later, it does not necessary mean Recovery will be unsuccessful, however, the possibility does exist, and it should be treated as an integrity exposure (see Example 5 on page 33.) Log data sets in input must be sequenced according their creation date/time. An out of sequence condition will cause needed log records to be ignored and will definitely compromise data base integrity. Note: The IMS system component, Database Recovery Control (DBRC) feature will determine the correct input to the Recovery utility, and generate and verify the required JCL streams.
34
The FORCER/NOFORCER option on the RECON header controls whether database must registered in the RECON.
Chapter 2. Overview of IMS data recovery
35
If NOFORCER is specified, database may, or may not be registered in the RECON. If a database is not registered in the RECON, and DBRC is active, then you get a warning message each time the database OPENed. If FORCER is specified and DBRC is active in the address space, all databases must be registered in the RECON, if not, DBRC rejects authorization and the job abends. If a database is registered in the RECON, and you run a job with DBRC=N, the next time you run a job with DBRC=Y, warning message is also issued flagging the fact that the database has ben accessed outside of DBRC control (normal suggestion is to take an Image Copy at this point to control this situation).
The SHARECTL option on the RECON header controls the level of information stored in the RECON (and the checks performed when the job runs). This option is be default active for all supported versions of IMS. If RECOVCTL is set, then all online IMS logs, and all batch logs for jobs that have executed with DBRC=Y, are registered in the RECON. This includes all allocations (online and batch jobs executing DBRC=Y), links to the corresponding logs, Change Accumulations, Image Copies, reorganizations and recoveries are recorded in the RECON. This gives you (providing all batch jobs execute DBRC=Y) a completed history of DB access. You can then use DBRC to generate Recovery JCL streams. This RECOVCTL option is no longer valid, it is only available for versions earlier than IMS Version 6. If SHARECTL is specified, you get all the above mentioned, but in addition DBRC will also ensure that only one address space accesses a database for update at any one time (providing the database is registered, and all jobs run with DBRC=Y) unless specifically enabled for data sharing. It also allows multiple accesses by the jobs with read intent (PROCOPT=G). DBRC will also prevent other address spaces from accessing a database that has outstanding BACKOUT action required (after address space failure).
DBRC configuration: The usage of DBRC depends on the enviroment (for instance HALDB, DEDB MADS, Data Sharing, require it) and to some degree, on the expectations placed upon the DBA and/or database recovery staffs for database recovery. If the frequency of database recovery is very high, then a fairly tight configuration should be used. IMS should be generated with DBRC usage forced in batch, and all databases should be registered in the RECON. A recommendation is that a separate IMSGEN should be run with DBRC not forced, and kept in the library only accessible to System Programmers and DBA for use as last resort to correct things. The IMSGEN does not have DBRC usage forced, but the default is DBRC=Y. Databases are registered in the RECON. If databases are regularly copied around between environments, for example test, and DBRC is causing problems with this, then copy the databases as not registered in the RECON. If they become corrupt, they are restored by copying again.
RECON data sets: The DBRC RECON data sets are the most important data sets for the operation of DBRC and data sharing. The RECON data sets hold all the resource information and event tracking information used. As mentioned, the RECON data sets can be up to three data sets: The original data set: RECON1 The copy of original data set: RECON2 The spare data set: RECON3
36
From the availability point-of-view, it is better to use all three data sets and have each in its own catalog on separate disk volumes and controllers. This is highly recommended in any production environment. Using three data sets for the RECON cause DBRC to use them in the following manner: The first data set is known as COPY1 or RECON1. It contains the current information. DBRC always reads from this data set and when some change has to applied, the change is written first to this data set. The second data set is known COPY2 or RECON2. It contains exactly the same information as the COPY1 data set. All changes to the RECON data set are applied to this COPY2 only after COPY1 has been updated. The third data set (the spare) is used in the following situation: If one RECON data set, say COPY2, has a physical I/O error, then DBRC discards the data set in error, and copies the good RECON to spare. When logically opening the COPY1 RECON data set DBRC finds out that a spare RECON has become available, and that the COPY2 RECON data set is currently not in use. The remaining valid data set (COPY1 in this case) is copied to the SPARE. When the copy is completed, the spare takes the place of the RECON data set that was lost, missing, or in error. RECON3 is now COPY2. From the DBRC RECON point-of-view, the COPY1 and COPY2 are normally identified by a 1 or 2 in the field RCR1COPY in the RECON header information. For more details, refer to the DSPRCR1 dsect, contained in the product distributed IMS.SDFSMAC library.
37
38
Chapter 3.
39
40
DBRC
/RECover ADD . . . /DBRecovery DB . . . /RECover START ..
DEDBs RDM
DLI DBs
RECON
LOGs
CAs
I/Cs
DBs
3.2.1 Requirements
The prerequisites for ORS installation include: Hardware and software requirements IMS ORS can run on any hardware environment that supports the required software. IMS ORS requires the following software: IMS Version 7 OS/390 Version 2.6 or later SMP/E Release 8 Operational requirements When using ORS, you must satisfy the following operational requirements: The ORS Recovery Data Manager (RDM) address space runs as an authorized program. Therefore, all libraries must be authorized. In ORS, recovery is controlled by using the IMS command: /RECover while some customers may choose to use the IMS Automated Operator Interface (AOI) to control
41
the ORS in order to issue the command, /RECover, database administrators need to access to an input device defined to IMS. If ORS is intended to recover full function database, the DLI/SAS address space must be running. However, the DLI/SAS JCL streams are unchanged by ORS. The ORS procedure is identified by the ORS PARMLIB member DFSORSxx, which is specified by the IMS control region EXEC parameter ORSMBR. ORS requires some Extended Common Storage area (ECSA). The amount depends on the number of database data sets and areas being recovered, and the number of log data sets required for recovery.
Note that the exec parameter BPECFG identifies the member in the PROCLIB DD statement for IMS ORS configuration information.
42
The IMS ORS can be installed as an optional product for the INSTALL/IVP base environments of IMS Version 7: DB/DC DB/DC with XRF DBCTL To configure the ORS, you must modify the DFSORSxx member in PROCLIB library.
IMS Version 7 Command Reference, SC26-9426 IMS Version 7 DBRC Guide and Reference, SC26-9428
The recovery of databases and areas is initiated in an online IMS environment via IMS command using the DBRC RECON information. This means that only resources registered to DBRC can be used for the database recovery by ORS. DBRC restricts access to database data sets and areas undergoing recovery by granting exclusive authorization to the IMS for recovery.
43
Note: The recovery list is set if IMS full function database data sets and Fast Path areas being recovered by IMS ORS in single pass of the change accumulation and IMS log data sets.
Table 3-1 The recovery options
Option
ADD
Description
Uses to add database data sets and areas to a recovery list of database data sets and areas to be recovered using ORS. The database data sets and areas can be specified as database data sets, areas, databases, or groups. After this point, the Recovery Data Manger address space started. Removes some or all database data sets and areas from recovery list. It can only be issued before recovery starts. Use the /RECover STOP command to remove entire after recovery has started. Begins recovery for all database data sets and areas from specified in the preceding /RECover ADD command with same recovery token that was specified in this command. Uses for shutdown the ORS address space. All resources, such as Tracker data spaces, ART control blocks will be released.
REMOVE
START
TERMINATE
44
3.3.4 Performance
Performance of each recovery depends on the execution environment at the time of the recovery. Improvement in performance depends on the number of log data sets required for recovery, the number of tape units available to IMS ORS to read data sets, and number of database data sets areas being recovered. The elapsed time of IMS ORS should be less than the traditional method because: Multiple database data sets and areas are recovered simultaneously. Input data such as Change Accumulation, and log records are read in parallel. Shared database data sets and areas do not require a change accumulation step prior to running ORS.
45
Note: The elimination of change accumulation activity during normal operating hours can be beneficial to the performance of normal IMS activity as the resources normally required for change accumulation are made available for other uses.
DBORG
HIDAM INDEX HDAM DEDB
DSORG
OSAM VSAM VSAM VSAM
# of DSG
1 1 1 2
DDN/AREA
DFSIVD1 DFSIVD1I DFSIVD2 DFSIVD3A DFSIVD3B
46
47
The sample of /RECover ADD command for Fast Path areas are shown Figure 3-5. They are used to build the recovery list.
Figure 3-7 shows the areas status after the /DBRECOVERY and /RECover commands executed.
48
determine if the database in the recovery list can be recovered. The RCVTOKEN is a required parameter. The token must point to a list which is in BEING BUILT from /DISplay RCVTOKEN ALL or specific recovery token ID. For example, /DISplay RECOVER RCVTOKEN RCV1.
49
50
Chapter 4.
51
4.1.1 Overview
In an IMS and DB2 environment a transaction may update: Resources controlled by IMS, such as DLI or Fast Path data bases. Resources controlled by DB2, such as tables We will see how the recovery of these distributed resources works during a restart operation. IMS recovers its resources. There is no difference in the way this is done as compared to an IMS only environment. The same locking protocol is used, and the IMS log contains change information for these resources only. DB2 resources are controlled and recovered by DB2. DB2 uses its own log and locking protocol, nevertheless DB2 must coordinate its recovery with that done by IMS. This coordination is implemented using the two-phase commit protocol, which is explained in 4.1.2, Two-phase commit protocol on page 53. The DB2 term unit of recovery (UR) refers to the updates performed in the subsystem between two points of consistency. The IMS sync point defines a point of consistency. We will use the term UR when referring to DB2 or to either subsystem in general. Figure 4-1 shows this relationship.
52
IMS Subsystem
IMS trans starts
DB2 Subsystem
IMS SYNCPOINT
UR 1
DLI FP DBs
IMS LOG
DB2 TABLEs
DB2 LOG
53
Figure 4-2 shows the two-phase commit protocol between IMS and DB2 in the case of positive DB2 vote. If either subsystem abends after Phase 2 commit has been started, that system must be able to recover to the synchronization point with the unit of recovery completed (the commit Phase 2 must be executed during restart.)
54
IMS Subsystem
Updates to IMS Recoverable Resources Program reaches Syncpoint Prepare to COMMIT SQL Requests
DB2 Subsystem
Updates to DB2 Resources
COMMIT PHASE 1
COMMIT PHASE 1
COMMIT PHASE 2
COMMIT PHASE 2
YES
Note that the IMS Transaction Manager component sync point process used to be done in the Control Region, the DB2 sync point must be done in the dependent region, DLI, and Fast Path (FP) sync point can be done in both. So the sync point sequence will be as follows for an IMS DB2 transaction: DB2 and DLI (if present) are invoked for Phase 1 in the dependent region. ISWITCH for Transaction Manager Phase 1, FP Phases 1 and 2 (if present) and Transaction Manager Phase 2. ISWITCH to the dependent region for processing Phase 2 for both DLI and DB2. A FP transaction does all the sync point in the dependent region. A FP transaction enters mixed mode if DLI or DB2 accessed, nevertheless, the sync point will be done entirely in the dependent region as none of these require an ISWITCH to the control region. The data controlled by both subsystems is now consistent and available to other applications. There are occasions when the coordinator invokes the participant when no participant resource has been altered since the completion of the last commit process. This can happen, for example, when SYNCPOINT is issued after performance of a series of SELECT statements or when end-of-task is reached immediately after SYNCPOINT has been issued. When this occurs, the participant performs both phases of the two-phase commit during the first commit phase and records that the user or job is read-only at the participant.
participant, it must determine after restart whether to commit or to roll back units of recovery that were active at the time of the failure. For certain units of recovery, DB2 has enough information to make the decision. For others, it does not, and must get information from the coordinator when the connection is reestablished. The status of a unit of recovery after a termination or failure depends upon the moment at which the incident occurred. The possible statuses and processing are: In-flight The participant or coordinator failed before finishing Phase 1 (period a or b); during restart, both systems back out the updates. In-doubt The participant failed after finishing Phase 1 and before starting Phase 2 (period c); only the coordinator knows whether the failure happened before or after the commit (Point 9). If it happened before, the participant must back out its changes; if it happened afterward, it must make its changes and commit them. After restart, the participant waits for information from the coordinator before processing this unit of recovery. In-commit The participant failed after it began its own Phase 2 processing (period d); it makes committed changes. In-abort The participant or coordinator failed after a unit of recovery began to be rolled back but before the process was complete (not shown in the figure). The operational system rolls back the changes; the failed system continues to back out the changes after restart. Postponed abort If LIMIT BACKOUT installation option is set to YES or AUTO, any backout not completed during restart is postponed. The status of the incomplete URs is changed from in-flight or in-abort, to postponed abort.
The BEGIN PHASE 2 DB2 log record is also forced and represents that the final direction for the commit protocol has been received from IMS. At this phase, IMS, DB2 or host system fails during this time interval, the UR remains In-doubt until both systems are running again and RECONnected. When the BEGIN PHASE 2 record is logged, then the UR is committed. When all the answers to the IMS Phase 2 commit has been received the END OF COMMIT (X56000002) log record is written, but not forced to log. This log record represents that all the participants have received and acknowledged the PHASE 2 COMMIT. The END PHASE 2 log record means that DB2 has ended any process related to this UR.
IMS Logging
SQL Requests Log Entries for IMS Recoverable Resources
DB2 Logging
Prepare to Commit
COMMIT PHASE 1
Backout
For more details on IMS log records, refer to the description of IMS log records, x37 and x56 series record. These records can be produced using IMS macro ILOGREC RECID=37,56 or ALL from the IMS Version 7 macro library, IMSVS.SDFSMAC. For DB2 log, look at the macro DSNDQJ00 in DB2.SDSNMACS library.
Backout Commit
In - Doubt
Commit
4.3.1 Termination
Termination for multiple systems is like termination for single systems, but with these added considerations: Using -STOP DB2 MODE(FORCE) could create in-doubt units of recovery for threads that are between commit processing phases. They are resolved upon RECONnection with the coordinator. Data updated by an in-doubt unit of recovery is locked and unavailable for use by others. The unit could be in-doubt when DB2 was stopped, or could be in-doubt from an earlier termination and not yet resolved. 57
A DB2 system failure can leave a unit of recovery in an in-doubt state if the failure occurs between Phase 1 and Phase 2 of the commit process.
58
Part 2
Part
59
60
Chapter 5.
ARTs overview
In this chapter we introduce the Application Recovery Tool for IMS and DB2 (ART) by describing its main objectives and functions. This chapter contains the following: The IBM Data Management tools Application Recovery Tool for IMS and DB2 Databases
61
62
Normal backup and recovery operations are handled by the Image Copy and recovery tools you choose. Many customers, however, have additional requirements or situations requiring special solutions. These might include: archiving data, point-in-time recovery, online recovery, and added Image Copy capabilities. In addition, asynchronous replication of data to where it is needed can enable your distributed applications.
Administration Tools Performance Management Tools Recovery and Replication Management Tools Application Management Tools
IBMs tools for DB2 for z/OS and OS/390 in this category are: DB2 DataPropagator IBM DB2 DataPropagator (program number 5655-E60) replicates data between your central database and regional transactional databases, making business data available to the regional databases for prompt transaction processing. DB2 DataPropagator is a component of DB2 Universal Database and DB2 DataJoiner in the UNIX, Windows, and OS/2 environments, and is a separately orderable tool or feature in the z/OS (OS/390), z/VM, VSE, and OS/400 environments. DB2 Object Restore Tool IBM DB2 Object Restore Tool (program number 5655- E72) is an affordable, robust tool that enables you to recover valuable data assets by quickly restoring dropped objects without downtime, even if they no longer exist in the DB2 catalog. Such dropped objects may include databases, table spaces, tables, indexes and data, as well as table authorizations. DB2 Log Analysis Tool IBM DB2 Log Analysis Tool (program number 5655-E66) provides you with a powerful tool to ensure high availability and complete control over data integrity. It allows you to monitor data changes by automatically building reports of changes that are made to database tables.
63
DB2 Row Archive Manager IBM DB2 Row Archive Manager (program number 5655-E65) helps you save storage and improve performance in your DB2 database environment by moving seldom-used data to a less costly storage medium. No programming is required. Data can be selected for archival at the row level, enabling the administrator to precisely control which aged data gets archived at an optimal level of granularity. DB2 Change Accumulation IBM DB2 Change Accumulation Tool (program number 5655-F55) quickly restores database objects with precision and minimal disruption, setting the scope and specificity of Image Copy creation through the use of control cards. DB2 Archive Log Compression IBM DB2 Archive Log Compression Tool (program number 5655-F54) reduces storage and I/O requirements associated with comprehensive disaster recovery preparedness and automatically compresses IBM DB2 logs at the time of storage and decompresses them at retrieval. DB2 Application Recovery Tool for IMS and DB2 Databases IBM Application Recovery Tool for IMS and DB2 Databases (program number 5697-F56), a new name and a new release of the former DB2 Recovery Manager, is a tool for synchronizing DB2 and IMS logs in order to create a common point-in-time for recovering data. It speeds and simplifies the access to and recovery of databases for productive use throughout an enterprise. DB2 Recovery Expert IBM DB2 Recovery Expert (program number 5724-B91) provides simplified, comprehensive, and automated recovery with extensive diagnostics and SMART (self managing and resource tuning) techniques to minimize outage duration. The redbook DB2 for z/OS and OS/390 Data Management Tools Update, SG24-6406 describes DB2 Archive Log Compression, DB2 Change Accumulation, DB2 Log Analysis Tool, and DB2 Object Restore. The redbook DB2 for z/OS DM Tools for Database Administration and Change Management, SG24-6420, provides useful information for DBA activity including handling DB2 changes. IBMs tools for IMS in this category are: IMS Data Propagator IBM IMS DataPropagator (IMS DPROP, program number 5655-E52) not only enables you to replicate IMS data across the DB2 family of databases, it also allows you to maintain consistency among multiple copies of data, for increased reliability and accuracy. And, with the new IMS DPROP near-real-time asynchronous propagation method, you can propagate IMS data to DB2 in as little as a few seconds. This enables you to leverage your IMS data for near-real-time business intelligence and transactional applications on DB2 and serve every part of your enterprise with the most up-to-date analysis. IMS DEDB Fast Recovery IBM IMS DEDB Fast Recovery (program number 5655-E32) assists in operating and maintaining the data integrity of IMS databases. It also shortens recovery time after an emergency restart (ERE) failure. IMS HP Change Accumulation
64
IBM IMS High Performance Change Accumulation Utility (program number 5655-F59) runs multiple change accumulation groups in parallel and streams output across all addresses simultaneously, completing jobs that used to take hours in a fraction of the time. IMS Image Copy Extensions IBM IMS Image Copy Extensions (program number 5655-E10) helps manage Image Copies more efficiently by performing one-step HASH checks, generating Image Copies in space-saving compressed formats, stacking output Image Copies, and dynamically allocating input and output data sets. IMS Online Recovery Service IBM IMS Online Recovery Service (program number 5655-E50) can be used to recover both full-function database data sets and Fast Path DEDB areas. It works in both Parallel Sysplex and non-Parallel Sysplex environments to help recover databases quickly with minimal downtime. This tool is described in Chapter 3, IMS Online Recovery Service on page 39.
65
JCL is generated under any of the following conditions: User requirements that specify: The function to implement Either the IMS or DB2 subsystem, or both The databases to process The processing parameters Specifications in the default parameter library (PARMLIB) User-requested CLIST or REXX procedures User-provided generation skeletons Generated JCL can be saved to a file or submitted by ART. When submitted by ART, the generator job of the JCL is known as the generating job, the current step of the generating job is the current step and the submitted job is the generated job. The generating job can control processing of the generated job and wait until processing of the generated job ends before continuing its own process.
66
Chapter 6.
67
68
Update the active member IKJTSOnn in SYS1.PARMLIB as follows: Add DRMAUTH under AUTHPGM NAMES Add DRMAUTH under AUTHTSF NAMES
You also need to go to edit member DRMXPROD, for setting CLOAD to point to your loadlib and TPLIB to point to your parmlib. However, the TLIB variable needs to be stated only if you use the product in test mode. In this case you use Option P on the main menu, and specify option TEST=Y. If you fail to edit member DRMXPROD, you will have unexpected results.
69
Copy the required modules to linklib Edit member DRM#XIN1 in the parmlib. Put in the name of loadlib and linklib into this JCL. After the job completes, you will see those six members copied to the linklib.
Example 6-3 DRM#XIN1 JCL
Execute job DRM#XIN2 Customize and submit this job that copies the DRMIMSRO module in linklib. Activate the linklib At this point, you should have eight members in the linklib. You can browse DRMEXEC in the loadlib and linklib, and do a search on the name of your parmlib, you should be able to find it inside the module. Do a LLA refresh. The following command will refresh the LLA. F LLA,REFRESH
70
DRMXPROD You have changed this member by putting the name of loadlib and parmlib into this member in Step 1. Browse this member to confirm the library names. DRMXSYSS Specify the MVS ID, IMS and DB2 system names in this member. If you are in a sysplex environment, you have to code all the MVS IDs.
Example 6-4 DRMXSYSS sample
DRMXIMSS Specify information about the IMS System, such as DBD lib, PSB lib, etc. The dummy DBD is used to switch the OLDS, if required. On the PSBNAME and TRNNAME, you can specify more than one. ART uses this PSBNAME and TRNNAME to communicate with IMS DC system for attaching and detaching the database. If you specify Y in DBCTL, only the PSBNAME is required. Also specify the name of the ART RECON data sets for IMS ART.
71
DRMXDB2S Specify the plan name for ART to use under DB2, also the name of the ART RECON data sets for DB2 ART.
72
DRMXDSGS Specify the information about DB2 data sharing groups. Since we are not using sysplex in our test, we do not specify NONE in DB2DSG.
73
DRMXCUST Specify information for ART to run the job, such as job cards, job name and job scheduler name. We recommend you leave the JOBNAME blank, in this case the job names of the daughter jobs will be generated by adding $ at the end of the fathers job name. DRMJOBCD (optional) This member contains the clist to generate job card. DRMXRUN (optional) Information about the default job/step lib. DRMXTHT (optional) You need this information if you have NOCOEX in DBRC. This member is used when a time change occurs (summer time, winter time). All the detail description of the above parameters can be found in the IBM Application Recovery Tool for DB2 and IMS Databases Users Guide Version 1 Release 2, SC27-0980-01. After you finished all the above setup steps, you should able to go to the ART Primary Panel.
74
4. Press Enter, you will see the Product Information message. You can also see the name of parmlib which you are working on.
5. At this stage, you should be able to see the ART primary panel.
75
From the ART primary panel, Option 1 and 2 is going to issue ART in IMS and DB2 correspondingly. Option V is used if we want to work on the recovery process for either IMS or DB2. 6. Select Option I for Main Installation Panel and the following installation panel is displayed.
76
You can select ALL in DB2ID. Keep Y on the Test Option and press Enter, the ART generate the JCL and display on the screen. If you scroll up and down, and you will see the bind statement listed in Example 6-8.
Example 6-8 ART DB2 bind statement
//SYSTSIN DD * DSN SYSTEM(DB2G) * *--- FOR DB2 DB2G * BIND PLAN(CSBPLAN) MEMBER(DRMPLAN) LIBRARY('DRM.V1R2M0.SDRMPARM') ACTION(REPLACE) VALIDATE(RUN) ISOLATION(CS) FLAG(I) ACQUIRE(USE) RELEASE(COMMIT) EXPLAIN(NO) END //*
After verifying the bind statement, hit PF3, you will see the DB2 installation panel. Change the Test Option to N and press Enter again to submit the job.
77
By selecting Option 1 for FIC, you will be in the FIC command panel and the product name. There are installation date (00/10/20) and the serial number (14.16) of the product.
Issue TS=(ZZZ),TEST=Y in the command line, you will see No TS Found. Do not put in any valid table space, at this stage, it may cause a problem, we still need to change parameter in DRMFIC.
78
The JCL will do: Create members in the parmlibs for IMS generation. Member #SMUIMSG contains information of transaction DRM1. Member #GENIMSG contains information of database, PSB and transaction. Generate the PSB into the PSBLIB and build the ACB into the ACBLIB.
The first step of the attached example will generate an IMS deck into the parmlib. If you put N in field DBCTL, you will have the database, applctn and transact statement generated, and the database is used for IMS to switch the logs. If you specify Y in field DBCTL, you only have database and applctn statements macro generated. If you specify Y in DBCTL, you need to bring up the DLI address space. In a later step, the PSB and ACB are also generated. After verifying the JCL, submit as a job by putting N into the Test Option. The sample output ART IMS Gen is listed in Example 6-9.
79
80
Issue DB=ZZZ,TEST=Y, you will see the message saying DB NOT FOUND.
6.4 Delete and define ART RECON for IMS and DB2
This step will create a JCL to delete and define ART RECON for IMS and DB2. Like for other install options, with TEST Y the JCL is generated and can be verified and modified; with TEST N, the job is directly submitted and the RECON data sets get created. They are two separated RECON data sets. The information of the RECON data sets are supplied through member DRMXIMSS(CS1RECON,CS1RECVO) and DRMXDB2S(CS2RECON, CS2RECVO). Select 3 from the main installation panel for IMS and DB2. Specify ALL in IMSID and DB2ID, Y in both IMS and DB2 CREATE VIC RECON.
81
82
The user profile of ART product is stored into your TSO ISPF profile, member name is DRMPROF. You can browse the member to ensure the parm library is changed for your profile after change in the above User Profile Configuration. For batch job, you can add a DD card CSXPLIB for pointing to your temporary parm library.
83
84
Chapter 7.
85
86
Table space availability is checked with a -DISPLAY command. You can use the FLUSH parameter to end processing if the table space is not in a state that allows copying. Otherwise, JCL is generated using the DRMRFIC function (see Example 7-1).
Example 7-1 DRMFIC generates the Image Copy JCL
APPLICATION RECOVERY TOOL ENVIRONMENT BUILDER DRMEXEC 02/03/18 16.36 PRODUCT INFOREC
DRMEXEC-001I: CURRENT PARMLIB IS DRM.V1R2M0.SDRMPARM DRMISTIM-001I: CURRENT DB2 SYSTEM DB2G HAS RELEASE LEVEL 710 DRMISTIM-003W: DEFAULT DB2 SUBSYSTEM READ IN DSNHDECP IS DSN1 DRMY69-007E:DRMXISGS MEMBER OF PARMLIB NOT FOUND DRMISTIM-006I: CURRENT IMS SYSTEM IMSG HAS RELEASE LEVEL 710 FULL IMAGE COPY UTILITY DRMFIC 02/03/18 16.40 PRODUCT DB2
DBSET=PAOLOR3A,TS=(TSACT,TSDEPT,TSEPA,TSPROJ),TEST=N,NEWCOPY=Y, FLUSH=N,UPDRCT=65,RCPRIM=NONE,RDAYS=1,FICMAX=2,ID=LOD0523A,DSSEL=ALL DRMX02-001I: THE FOLLOWING WORK DATABASE(S) HAVE BEEN SELECTED: DSNDB07 DRMX02-001I: THE FOLLOWING WORK DATABASE(S) HAVE BEEN SELECTED: DSNDB07 DRMX02-001I: THE FOLLOWING WORK DATABASE(S) HAVE BEEN SELECTED: DSNDB07 DRMX02-001I: THE FOLLOWING WORK DATABASE(S) HAVE BEEN SELECTED: DSNDB07 DRMU89-002I: THE FOLLOWING TABLESPACE(S) HAVE BEEN SELECTED: DATABASE PAOLOR3A TSACT TSDEPT TSEPA TSPROJ
DRMV50-018W: THE FOLLOWING TABLESPACES HAVE RESTRICTED STATUS IN DATABASE PAOLOR3A : NAME TYPE PART STATUS PHYERRLO PHYERRHI CATALOG PIECE -------- ---- ---- ------------------ -------- -------- -------- ----TSACT TS RW,COPY TSDEPT TS RW,COPY TSEPA TS RW,COPY TSPROJ TS RW,COPY DRMU72-001I: SKELETON MEMBER DRMSFIC HAS BEEN TAILORED: DRMU71-001I: THE JOB PAOLOR5$ HAS BEEN SUBMITTED. DRMV39-001I: WAITING FOR JOB PAOLOR5$ QUEUED THE 24/05/02 AT 13:09:26.8 UNTIL THE LIMIT QUEUE TIME 13:14:26.8 DRMU44-001I: *** WAIT MODE ENTERED DURING 00:00:10.00 (HH:MM:SS.DC) AT TIME 13:09:27.4 JOBNAME STATUS Q-DATE Q-TIME S-TIME FUNCTION COMMENT E-TIME CHECKED -----------------------------------------------------------------------------------------PAOLOR5$ ENDED 24/05/02 13:09:26.8 13:09:29.6 FIC TS=(TSACT, 13:09:37.1 Y
The DRMFIC function can also generate dual Image Copies (local and recovery site) for off site storage and or disaster recovery. Your need for dual copies will of course depend upon your applications requirements for disaster recovery, resources available (such as tape drives), and use of the COPYTOCOPY utility in DB2 V7.
87
(see Example 7-2). The DRMIIC function worked as expected against a table space where a quiesce or a VIC had been issued prior to the copy. This is working as designed since the product reads the space map directly. Because this leaves a potential risk of data loss in case of a recovery, we recommend to use extreme caution when using the DRMIIC function of ART to generate and run incremental Image Copies. We also recommend to ALWAYS issue either a VIC or a quiesce prior to running incremental copies through ART to ensure full data integrity in your recovery scenario. ART has no difficulty in selecting DB2 incremental Image Copies created outside of ART for use in a recovery scenario.
Example 7-2 Attempted incremental copy under ART
APPLICATION RECOVERY TOOL ENVIRONMENT BUILDER DRMEXEC 02/03/18 16.36 PRODUCT INFOREC
DRMEXEC-001I: CURRENT PARMLIB IS DRM.V1R2M0.SDRMPARM DRMISTIM-001I: CURRENT DB2 SYSTEM DB2G HAS RELEASE LEVEL 710 DRMISTIM-003W: DEFAULT DB2 SUBSYSTEM READ IN DSNHDECP IS DSN1 DRMY69-007E:DRMXISGS MEMBER OF PARMLIB NOT FOUND DRMISTIM-006I: CURRENT IMS SYSTEM IMSG HAS RELEASE LEVEL 710 INCREMENTAL IMAGE COPY UTILITY DRMIIC 02/03/18 16.40 PRODUCT INFOREC2
DBSET=PAOLOR3A,TS=(TSACT,TSDEPT,TSEPA,TSPROJ),TEST=N, FLUSH=N,UPDRCT=65,RCPRIM=NONE,RDAYS=1,FICMAX=2,ID=POSTRCV,DSSEL=ALL DRMX02-001I: THE FOLLOWING WORK DATABASE(S) HAVE BEEN SELECTED: DSNDB07 DRMX02-001I: THE FOLLOWING WORK DATABASE(S) HAVE BEEN SELECTED: DSNDB07 DRMX02-001I: THE FOLLOWING WORK DATABASE(S) HAVE BEEN SELECTED: DSNDB07 DRMX02-001I: THE FOLLOWING WORK DATABASE(S) HAVE BEEN SELECTED: DSNDB07 DRMU89-002I: THE FOLLOWING TABLESPACE(S) HAVE BEEN SELECTED: DATABASE PAOLOR3A TSACT TSDEPT TSEPA TSPROJ DRMV79-012I: NO PAGES DRMV79-012I: NO PAGES DRMV79-012I: NO PAGES DRMV79-012I: NO PAGES DRMIIC-001I: NOTHING TO MODIFIED IN MODIFIED IN MODIFIED IN MODIFIED IN DO FOR THIS TABLESPACE TSACT TABLESPACE TSDEPT TABLESPACE TSEPA TABLESPACE TSPROJ PARAMETER SET DATABASE DATABASE DATABASE DATABASE PAOLOR3A PAOLOR3A PAOLOR3A PAOLOR3A
When using the DB2 COPY utility, specifying FULL NO on the same set of tables, after the tables had been restored and the same updates had been applied to the tables, three of the table spaces were selected for incremental copies by DB2 (see Example 7-3). When the same scenario was run with a STOP DB and START DB command immediately following the updates, the same three table spaces were selected by ART for incremental copies.
88
89
specifications and the Job Management system, ensure that changes to table spaces are merged accurately and on a regular basis.
Example 7-4 Output of MERGECOPY utility
DSNU000I DSNUGUTC - OUTPUT START FOR UTILITY, UTILID = PAOLOR0$ DSNU050I DSNUGUTC - MERGECOPY TABLESPACE PAOLOR3A.TSACT WORKDDN SYSUT1 NEWCOPY NO COPYDDN(PR1) DSNU463I DSNUYBR3 - THE PRIMARY IMAGE COPY DATA SET PAOLOR3.T204528.PAOLOR3A.TSACT WITH DATE=020515 AND TIME=164529 IS PARTICIPATING IN MERGECOPY. DSNU463I DSNUYBR3 - THE PRIMARY IMAGE COPY DATA SET PAOLOR3.T205054.PAOLOR3A.TSACT WITH DATE=020515 AND TIME=165059 IS PARTICIPATING IN MERGECOPY. DSNU454I DSNUYBR0 - COPY MERGE COMPLETE NUMBER OF COPIES=2 NUMBER OF COPIES MERGED=2 TOTAL NUMBER OF PAGES MERGED=4 ELAPSED TIME=00:00:00 DSNU050I DSNUGUTC - MERGECOPY TABLESPACE PAOLOR3A.TSDEPT WORKDDN SYSUT1 NEWCOPY NO COPYDDN(PR2) DSNU463I DSNUYBR3 - THE PRIMARY IMAGE COPY DATA SET PAOLOR3.T204528.PAOLOR3A.TSDEPT WITH DATE=020515 AND TIME=164529 IS PARTICIPATING IN MERGECOPY. DSNU463I DSNUYBR3 - THE PRIMARY IMAGE COPY DATA SET PAOLOR3.T205054.PAOLOR3A.TSDEPT WITH DATE=020515 AND TIME=165058 IS PARTICIPATING IN MERGECOPY. DSNU463I DSNUYBR3 - THE PRIMARY IMAGE COPY DATA SET PAOLOR3.T212549.PAOLOR3A.TSDEPT WITH DATE=020515 AND TIME=172553 IS PARTICIPATING IN MERGECOPY. DSNU454I DSNUYBR0 - COPY MERGE COMPLETE NUMBER OF COPIES=3 NUMBER OF COPIES MERGED=3 TOTAL NUMBER OF PAGES MERGED=6 ELAPSED TIME=00:00:00 DSNU050I DSNUGUTC - MERGECOPY TABLESPACE PAOLOR3A.TSEPA WORKDDN SYSUT1 NEWCOPY NO COPYDDN(PR3) DSNU463I DSNUYBR3 - THE PRIMARY IMAGE COPY DATA SET PAOLOR3.T204528.PAOLOR3A.TSEPA WITH DATE=020515 AND TIME=164530 IS PARTICIPATING IN MERGECOPY. DSNU463I DSNUYBR3 - THE PRIMARY IMAGE COPY DATA SET PAOLOR3.T212549.PAOLOR3A.TSEPA WITH DATE=020515 AND TIME=172553 IS PARTICIPATING IN MERGECOPY. DSNU454I DSNUYBR0 - COPY MERGE COMPLETE NUMBER OF COPIES=2 NUMBER OF COPIES MERGED=2 TOTAL NUMBER OF PAGES MERGED=4 ELAPSED TIME=00:00:00 DSNU010I DSNUGBAC - UTILITY EXECUTION COMPLETE, HIGHEST RETURN CODE=0
Incremental Image Copies require less space than full Image Copies and can be merged often in order to maintain a minimum number of recovery files. Merging a full Image Copy and incremental Image Copies into a new full Image Copy, does not require access to the table space and can significantly speed up a possible recovery. Consider defining a frequency for merging copies of table spaces. You might base the frequency on how often copies are created and on the number of incremental Image Copies to be kept.Then schedule the start of DRMMERGE using the Job Management System.
90
Table spaces whose copies are to be merged are found either through the DRMRTSPT procedure in the XPROC parameter in the current parmlib that uses SQL to read the DB2 catalog, or through direct VSAM access to the DB2 catalog. ART checks for the existence of all Image Copy files required by a MERGECOPY or by the user. If the check fails, the FLUSH parameter value determines whether processing stops. If the check is successful, DRMMERGE prepares JCL. The generated JCL allocates non-DASD input Image Copy files on a minimal number of tape units. DRMMERGE determines the workfile size according to the maximum size of table spaces selected. In the case of disk Image Copy, DRMMERGE generates allocation parameters of the Image Copy file to be created. DRMMERGE generates primary and dual Image Copies intended for the current DB2 site, as specified in the SITETYPE=parameter, found in parmlib member DRMXDB2S. After the completion of the MERGECOPY NEWCOPY NO process, DRMMERGE also deletes incremental Image Copy files that are no longer mentioned in the DB2 catalog and would, therefore, not be found by the DRMDLET2 Function (see Example 7-5).
Example 7-5 DRMMERGE deletes incrementals removed from the DB2 catalog
DELETE 'PAOLOR3.T204528.PAOLOR3A.TSACT' PURGE ENTRY (A) PAOLOR3.T204528.PAOLOR3A.TSACT DELETED READY DELETE 'PAOLOR3.T205054.PAOLOR3A.TSACT' PURGE ENTRY (A) PAOLOR3.T205054.PAOLOR3A.TSACT DELETED READY DELETE 'PAOLOR3.T204528.PAOLOR3A.TSDEPT' PURGE ENTRY (A) PAOLOR3.T204528.PAOLOR3A.TSDEPT DELETED READY DELETE 'PAOLOR3.T205054.PAOLOR3A.TSDEPT' PURGE ENTRY (A) PAOLOR3.T205054.PAOLOR3A.TSDEPT DELETED READY DELETE 'PAOLOR3.T212549.PAOLOR3A.TSDEPT' PURGE ENTRY (A) PAOLOR3.T212549.PAOLOR3A.TSDEPT DELETED READY DELETE 'PAOLOR3.T204528.PAOLOR3A.TSEPA' PURGE ENTRY (A) PAOLOR3.T204528.PAOLOR3A.TSEPA DELETED READY DELETE 'PAOLOR3.T212549.PAOLOR3A.TSEPA' PURGE ENTRY (A) PAOLOR3.T212549.PAOLOR3A.TSEPA DELETED READY END
91
92
USERID --------
93
DRMVIC-097E: INTERRUPT BY NON-RECOVERABLE ERROR DRMVIC-002I: ---- DRMVIC ENDED AT TIME 13:40:09.6 DRMISTIM-006E: FUNCTION DRMVIC ERROR RC 0016
When the command completes successfully, a valid VIC type recovery point is created (see Example 7-7). This function does not generate JCL. It is directly inserted into application JCL chains as a security step to limit loss of normal (non-recovery) operations time.
Example 7-7 Lock, quiesce and commit for VIC
DRMV69-001I: PREPARING THE LOCK(S) NEEDED ... DRMVIC-008I: VIC LOOK STEP THE 24/05/02 AT 13:36:18.5 DATABASE PAOLOR3A NAME TYPE PART STATUS CONNID CORRID LOCKINFO USERID -------- ---- ---- ------------------ -------- ------------ --------- -------TSACT TS RW TSDEPT TS RW TSEPA TS RW TSPROJ TS RW DRMVIC-004I: VIC STARTING... THE 24/05/02 AT 13:36:18.6 DRMV69-002I: LOCKING THE TABLESPACE(S) ... DATABASE PAOLOR3A NAME TYPE PART STATUS CONNID CORRID LOCKINFO USERID -------- ---- ---- ------------------ -------- ------------ --------- -------TSACT TS RW DB2CALL PAOLOR5T H-S,S,C PAOLOR3 TSDEPT TS RW DB2CALL PAOLOR5T H-S,S,C PAOLOR3 TSEPA TS RW DB2CALL PAOLOR5T H-S,S,C PAOLOR3 TSPROJ TS RW DB2CALL PAOLOR5T H-S,S,C PAOLOR3 DRMV12-010I: QUIESCE RUNNING 1DSNU000I DSNUGUTC - OUTPUT START FOR UTILITY, UTILID = PAOLOR5T 0DSNU050I DSNUGUTC - QUIESCE TABLESPACE PAOLOR3A.TSACT TABLESPACE PAOLOR3A.TSDEPT TABLESPACE PAOLOR3A.TSEPA TABLESPACE PAOLOR3A.TSPROJ DSNU477I -DB2G DSNUQUIA - QUIESCE SUCCESSFUL FOR TABLESPACE PAOLOR3A.TSACT DSNU477I -DB2G DSNUQUIA - QUIESCE SUCCESSFUL FOR TABLESPACE PAOLOR3A.TSDEPT DSNU477I -DB2G DSNUQUIA QUIESCE SUCCESSFUL FOR INDEXSPACE PAOLOR3A.DEPTX2 DSNU477I -DB2G DSNUQUIA QUIESCE SUCCESSFUL FOR INDEXSPACE PAOLOR3A.DEPTX1 DSNU477I -DB2G DSNUQUIA - QUIESCE SUCCESSFUL FOR TABLESPACE PAOLOR3A.TSEPA DSNU477I -DB2G DSNUQUIA - QUIESCE SUCCESSFUL FOR TABLESPACE PAOLOR3A.TSPROJ DSNU474I -DB2G DSNUQUIA - QUIESCE AT RBA 0002B79FFB0F AND AT LRSN 0002B79FFB0F DSNU568I -DB2G DSNUGSRX - INDEX PAOLOR3.DEPTX2 IS IN INFORMATIONAL COPY PENDING DSNU568I -DB2G DSNUGSRX - INDEX PAOLOR3.DEPTX1 IS IN INFORMATIONAL COPY PENDING DSNU475I DSNUQUIB - QUIESCE UTILITY COMPLETE, ELAPSED TIME= 00:00:00 DSNU010I DSNUGBAC - UTILITY EXECUTION COMPLETE, HIGHEST RETURN CODE=0 DRMV69-003I: UNLOCKING THE TABLESPACE(S) ... DATABASE PAOLOR3A NAME TYPE PART STATUS CONNID CORRID LOCKINFO USERID -------- ---- ---- ------------------ -------- ------------ ---------------TSACT TS RW TSDEPT TS RW TSEPA TS RW TSPROJ TS RW DRMVIC-005I: VIC ENDED THE 24/05/02 AT 13:36:19.4 (00:00:00.8 FROM START) DRMVIC-006I: VIC TS 021441336192 WITH ID BAT0523B IS SUCCESSFULL DRMVIC-002I: ---- DRMVIC ENDED AT TIME 13:36:20.8
94
DRMVIC syntax
The SYSIN DD statement for the DRMVIC function in batch, and the command line entry for the online screen are identical:
DBSET=database name,TS=(tablespace name, tablespace name,...),ID=user assigned id
Notification of the VIC point in the VIC RECON for this set of table spaces and its association to the user given identifier is done by means of the parameter, ID=user assigned ID. Attention: If you have duplicate VIC names, ART will use the most recent VIC for the recovery. We really advise against using duplicate VIC names for this reason. If the operation is successful, the following message displays:
VIC TS yymmddhhmmssd WITH ID user assigned id IS SUCCESSFUL
95
02135 15/05/02 20:14:51.5 VIC POSTRECV 02136 16/05/02 12:44:10.5 VIC POSTLD3 02136 16/05/02 14:40:25.7 VIC POSTLD4 02136 16/05/02 17:31:55.0 FIC 0002B4474474 02136 16/05/02 17:31:55.0 FIC 0002B44831B0 02136 16/05/02 17:31:55.0 FIC 0002B4492268 02136 16/05/02 17:31:55.0 IN USE STATE ... 02136 16/05/02 17:31:56.0 FIC 0002B44A0DE7 02136 16/05/02 17:31:56.0 IN USE STATE ... 02136 16/05/02 17:33:10.4 MAP FLASH TIME ------------------------------------------
|V|V|V|V| |V|V|V|V| |V|V|V|V| |R| | | | | |R| | | | | |R| | |.|.|.| | |.|.|.|R| |.|.|.|.| |.|.|.|.| +-+-+-+-+
The full copy followed by a VIC gives ART a valid PIT for recovery and causes the outdated VICs to be removed (see Example 7-10).
Example 7-10 Map with recovery points and usable VICs
|A YYQQQ DATE TIME EVENT ID -----------------------------------------02136 16/05/02 17:31:55.0 FIC 0002B4474474 02136 16/05/02 17:31:55.0 FIC 0002B44831B0 02136 16/05/02 17:31:55.0 FIC 0002B4492268 02136 16/05/02 17:31:55.0 IN USE STATE ... 02136 16/05/02 17:31:56.0 FIC 0002B44A0DE7 02136 16/05/02 17:31:56.0 IN USE STATE ... 02136 16/05/02 17:41:02.4 VIC POSTLD1 02136 16/05/02 17:41:02.5 IN USE STATE ... 02136 16/05/02 17:42:27.4 MAP FLASH TIME -----------------------------------------|A|B|C|D| +-+-+-+-+ |R| | | | | |R| | | | | |R| | |.|.|.| | |.|.|.|R| |.|.|.|.| |V|V|V|V| |.|.|.|.| |.|.|.|.| +-+-+-+-+ +---------------------+ | DBD/DB DDN/TS | |AA PAOLOR3A TSACT | |AB PAOLOR3A TSDEPT | |AC PAOLOR3A TSEPA | |AD PAOLOR3A TSPROJ | +---------------------+
96
A recovery done on a database is indicated by a / at the corresponding time on the map. Activities related to the update period are invalidated and displayed in tunnel mode, in which updates are hidden by the recovery.
D B2 table space(s)
G oo d Update
Good Up date
Recovery
V IC
V IC
97
98
A special action, SWITCH, deals with IMS logs. DRMAOP then selects the table spaces of the specified databases are selected in the DB2 catalog. DRMAOP gives the commands required for this set of table spaces after verifying they are not scheduled for update by a long duration lock. If they are scheduled for update, DRMAOP waits for the end of the batch. The end of the DRMAOP operation is indicated by the message:
AOP ENDED THE MM./add/by AT hhmmssd
The following phases are important in DRMAOP processing: 1. The look step, during which the function looks for long duration locks on DB2 table spaces. If any are found, the function waits until they end before processing the AOP. 2. The AOP start and end step, the phase during which the commands are processed.
99
VIC 02151V01
Image Copy
Batch Update
VIC 02151V03
Image Copy
Image Copy
Batch Update
VIC 02151V02
Image Copy
Batch Update
VIC 02151V04
We assume that only after a BMP was executed against the application DB2 objects, we discovered that there were severe problems due to the fact that the executed BMP updated the application DB2 objects using wrong input file. Therefore, the damaged DB2 objects must be recovered to a point-in-time prior to their updates by this BMP. We generate the MAP reports from the ARTs DRMMAP function to understand the recoverability of the situation, then we decide to restore the objects using VIC Id 02154V01. Example 7-12 shows how to request the executable JCL streams for recovery operation by the ART function DRMREOCV.
100
Once the ART DRMREOCV is executed, the recovery executable JCL statements that were generated are listed in Example 7-13.
Example 7-13 DB2 recovery job stream generated by ART DRMRECOV
//PAOLOR1$ JOB ACCOUNT,MSGCLASS=X,CLASS=A, // NOTIFY=PAOLOR1,TIME=1440 //*-------------------------------------------------------------------//* RECOVERY FOR TS DRM //* //*-------------------------------------------------------------------//* AUTHORIZATION CHECKING JOB STEP //* //SCHECK EXEC PGM=DRMEXEC,DYNAMNBR=50,REGION=2M,DPRTY=(15,15), // PARM=(FUNCTION,'DRMCHECK',DEBUG,'N') //CSXPLIB DD DSN=DRM.V1R2M0.SDRMPARM,DISP=SHR //SYSIN DD * FATHER=PAOLOR1#,ASID=27,TS=021631249338, JOBCHECK=Y,TYPE=START //*-------------------------------------------------------------------//* //*------------------ DATA RECOVERY STEP -----------------------------//* //RECOV EXEC PGM=DSNUTILB,REGION=4M,COND=((0,NE)), // PARM='DB2G,PAOLOR1$' //STEPLIB DD DSN=DB2G7.SDSNLOAD,DISP=SHR //SYSPRINT DD SYSOUT=* //UTPRINT DD SYSOUT=* //SYSUT1 DD UNIT=SYSALLDA,SPACE=(TRK,(50,150)) //SYSUDUMP DD SYSOUT=* //SYSIN DD * RECOVER TABLESPACE DRM.DRM TORBA X'0002BC9F5934' REBUILD INDEX(ALL) TABLESPACE DRM.DRM //RESTART EXEC PGM=DRMEXEC,DYNAMNBR=50,REGION=4M,COND=((4,LT)), // PARM=(FUNCTION,'DRMAOP',DB2ID,'DB2G') //CSXPLIB DD DSN=DRM.V1R2M0.SDRMPARM,DISP=SHR //SYSIN DD * TS=TDBTS, RWAIT=15, FAILED=3, WTO=N, MSG=Y, ACTION=START //TDBTS DD * DBNAME=DRM,TSNAME=DRM,CREATOR=PAOLOR1,FILENBOF=0 //*----------------------------------------------------------------
101
//* //*--- NOTIFY END JOB STEP //* //ECHECK EXEC PGM=DRMEXEC,DYNAMNBR=50,REGION=2M,DPRTY=(15,15), // PARM=(FUNCTION,'DRMCHECK',DEBUG,'N'),COND=((4,LT)) //CSXPLIB DD DSN=DRM.V1R2M0.SDRMPARM,DISP=SHR //SYSIN DD * FATHER=PAOLOR1#,ASID=27,TS=021631249338, JOBCHECK=N,TYPE=END DRMRECOV-002I: ---- DRMRECOV ENDED AT TIME 12:49:34.4
We now execute the recovery job stream. After the execution the application DB2 objects are successfully recovered using ARTs VIC, MAP, and RECOV functions. Example 7-14 shows the results of the recovery job.
Example 7-14 Results of executing ART DRMREOCV
DSNUGUTC - OUTPUT START FOR UTILITY, UTILID = PAOLOR1$ DSNUGUTC - RECOVER TABLESPACE DRM.DRM TORBA X'0002BC9F5934' DSNUCBAL - THE IMAGE COPY DATA SET DRM.IC.DRM.D02151.T1400 WITH DATE=20020612 AND TIME=122326 IS PARTICIPATING IN RECOVERY OF TABLESPACE DRM.DRM DSNUCBMD - MERGE STATISTICS FOR TABLESPACE DRM.DRM NUMBER OF COPIES=1 NUMBER OF PAGES MERGED=2500 ELAPSED TIME=00:00:04 DSNUCBDR - RECOVERY COMPLETE, ELAPSED TIME=00:00:04 DSNUGUTC - REBUILD INDEX(ALL) TABLESPACE DRM.DRM DB2G DSNUCINT - NO INDEXES FOUND FOR TABLESPACE 'DRM.DRM' DSNUGBAC - UTILITY EXECUTION COMPLETE, HIGHEST RETURN CODE=4
At this point, the damaged DB2 objects are successfully recovered from the ART assistants. From the results listed in Example 7-14, the only thing left to do is an Image Copy of the DB2 table space, because the recovery execution return code is 4. Now, we have two options, the first option is that we take an Image Copy, and the second option is that an ART VIC can be taken instead of the Image Copy. The decision depends on your environment. For example, you can decide that the ART DRMVIC function is executed instead of the Image Copy because the Image Copy can wait until the next regular Image Copy cycle. It should be taken into account that, if the next Image Copy schedule is much later, then the next possible recovery execution will have its elapsed time impacted with a duration that will depend upon the update activities against this object occurred in between.
Note: When recovering DB2 objects under the ART environment, you should be aware of the fact that if the DB2 object was not updated, then ART will not generate any recovery JCL statements, even if the VIC and Image Copy information is available. In this case you must restore the DB2 object outside of ART with the standard DB2 utility .
102
Chapter 8.
103
It interfaces with DBRC and issues DBRC commands to IMS RECON data sets.
IC
It creates Image Copies, and provides a feature to detach the DB from on-line and attach it back after the Image Copy.
CA
The functions of ARTs CA and DELETE are very similar to the DBRCs provided functions, so we recommend that you to use the DBRC functions if you are already familiar with them. In this chapter, we review the ART provided IMS functions of INIT, IC, REORG, and MDISK.
104
ART allows you to use a wild card, specified with *, in your input. Also ART can help you to prepare the JCL before adding or changing a new CA group. Since one DB can only be defined under one CA group, ART checks if your database is already defined in another CA group. If so, ART will automatically remove it from the old CA group and add it to the new CA group. The command for this example, which is meant to define a CA group for database names starting with IVP, except for IVPDB2, in CA group CATEST1, is:
ADDDB=IVP*,CA=CATEST1,DELDB=(IVPDB2),TEST=Y
The first DELETE.CAGRP deletes CAIVPDB, which contains IVPDB22 and DI21PART. The INIT.CAGRP defines the CA group CAIVPDB allowing to only contain DI21PART. The second DELETE.CAGRP deletes HUI1, which contains IVPDB1 and IVPDB1I. Last, the INIT.CAGRP defines a CA group CATEST1, with all database names starting with IVP*, except for IVPDB2 which belongs to CA group IDB2.
105
106
Figure 8-3 ART JCL for Offline Image Copy with AUTO=Y
107
If there are DL/I batch jobs running in your shop, you have to find out a quiet time in order to run the reorg job for the IMS RECON data set.
108
recovery ID is used instead of the timestamp, and by using the MAP function, you can also verify both the recovery ID and the timestamp. ART allows you to specify five functions in the Recovery Panel, as shown in Figure 8-5.
For IMS recovery purpose, we only require: VIC: For Virtual Image Copies MAP: To retrieve database recovery information RECOV: To recover a database
109
The switch of the IMS logs is requested, the wait time is set to 1 second, and the number of retries to three times.
110
Time line
ICA
BMP1
BMP2
ICB
BMP3
BMPX
ICC
Time line
ICA
BMP1
BMP2
VIC
BMPX
ICC
8.2.2 DRMMAP
When in recovery mode, we need to consider the following items: Where you want to recover to Maintain data integrity after recover, such as verifying that data and index are in sync Which Image Copies are used Any IMS log are required Try to find the shortest path for recovery and shorten the recovery time. The ART MAP function retrieves information from both IMS DBRC RECON and ART RECON data sets. This information is required for recovery purposes. Without using ART, the database administrator has to submit a couple of jobs in order to find out most of the information from the IMS RECON data set. The ART MAP function retrieves information from both IMS DBRC RECON and ART RECON data sets. By using a MAP command, the data base recovery scenario can be seen from the results. The example in Figure 8-8 shows a MAP function on IMS database IVPDB2. There is an Image Copy created on day 02133 and time 17:43:02.7. There is also a VIC, with ID equal to IDA1 on day 02135 and time 17:15:28.8.
111
Also, in this example, there are two VICs with the same ID (IDA2), on day 02135, one at time 17:19:43.5, and the second one at time 18:01:31.1. ART accepts both timestamps, but uses e the last timestamp to recover when asking for IDA2.
8.2.3 DRMRECOV
In this section we illustrate how to use ART to help us manage the recovery of an IMS database. Before working on the recovery, you need to make sure that you have enough information to go through it successfully. The previous section for MAP is very useful for database recovery. It is highly recommended to take an Image Copy after the recovery is completed. By using ART, you can recover to any previous VIC point. ART automatically goes to the ART RECON data set, finds the required recovery object (such as, Image Copy, log, etc.), and prepares the JCL to recover the database. You have to ensure that the correct VIC is provided in input to ART; you can use MAP to assist you for that. After the recovery, you can issue a MAP command to verify the timestamp. It is recommended to turn on DBRC for the recovery. In this case, after the recovery, DBRC will create a record RECOV in the DBDS history. We now follow the steps needed to use ART for managing the recovery of an IMS database. At first, we need to find from the DRMMAP where we need to recover to. In Example 8-1 we have the DRMMAP of IVPDB2: an Image Copy was taken at 18:53:04.9, and also 2 VICs. We want to recover to the last VIC TESTA, which has the timestamp 18:57:13.6.
112
and the JCL listed in Example 8-2 is generated. If the database is attached to the IMS on-line, the generated JCL will include a step to detach the database from online. We have turned on DBRC on this job, so DBRC is also checking the recovery processing.
Example 8-2 DRMRECOV for IMS DB
113
114
Chapter 9.
115
9.1 Introduction
In Chapter 7, Using ART for DB2 recovery on page 85, and Chapter 8, Using ART for IMS recovery on page 103, we have explained how to use ART under either IMS or DB2 in a separated environment. In this section, we use ART to recover a set of databases that include both the IMS and DB2 environments. First, we describe two situations in which you might experience difficulties when trying to coordinate both IMS and DB2 data to the same point of recovery. We then go through the steps to be used to coordinate the timestamp and DRMVIC when using the Application Recovery Tool. Once the ART environment is set, we look at examples of DRMRECOV usage, in un case we have an introductory simple recovery example, in another we show an example DRMRECOV when using concurrent Image Copies. Since, establishing an IMS VIC, the IMS databases has to switch from update to inquiry for a short period of time, we show how IMS ORS can help you eliminate this short period of data unavailability.
IMS
DB2
DB2 Update Mode
DB2 Full Image Copy DB2 Update Mode DB2 Read Mode DB2 Update Mode
Figure 9-1 IMS Offline Image Copy and DB2 Full Image Copy
point-in-time. You need to coordinate the IMS switch to read only and the DB2 Quiesce, as illustrated in Figure 9-2. During the recovery phase, you must manually retrieve the timestamp in the IMS RECON and DB2 syscopy.
IM S U p d a te M o d e
S w itc h I M S to In q u iry o n ly
S w itc h IM S to U p d a te
IM S
IM S C o n c u r re n t Im a g e C o p y
DB2
D B 2 C o n c u rr e n t Im a g e C o p y D B 2 Q u ie s c e D B 2 U p d a te M o d e B o th IM S a n d D B 2 a r e u p d a te M ode
Figure 9-2 IMS Concurrent Image Copy and DB2 Concurrent Image Copy
This is where ART can help. By using ART, you can use a VIC to coordinate the recovery of IMS and DB2 to the same time.
9.2 DRMVIC
With ART the solution is similar to when establishing VIC with just IMS data: ART will wait for the BMP job to finish in order to take a VIC. There are ART parameters you can use to control the wait time and number of retries in case the databases are busy. However, ART is taking different steps, when compared with the straight IMS VIC, in order to take a VIC across IMS and DB2. When ART is requested to take an VIC on both IMS and DB2 databases, ART will coordinate the sequence of events, so at that moment in time, there is no update taking place for IMS and DB2 for the duration of the copy. The sequence of events is as follows, and is depicted in Figure 9-3: 1. ART issues DB2 -DISPLAY database command to see if any lock is present on table space. 2. If there are no locks on the table space, ART will lock the table space with H-S, S, C. 3. If the IMS database is attached to IMS on-line, ART switches the database to inquiry only. 4. ART quiesces the DB2 table space. 5. ART takes the timestamp. 6. ART starts the IMS database for update for IMS online. 7. ART releases the DB2 locks on the table space.
117
In Example 9-1 we show the output for a DRMVIC. In the example, we are taking a VIC with ID equal TESTA2 for IMS database IVPDB22 and DB2 table space DRM. First ART checks if the table space DRM is free, then it locks it with the LOCKINFO H-S,S,C. Then it switches the IMS database IVPDB22 to inquiry, and issues a DB2 quiesce. The LRSN of the QUISCE is 0002B9DEA548. You can use the MAP function to see the timestamp of this VIC. At the end of the job, ART issues the IMS command to attach the IMS database to IMS on-line. Normally, without ART, you must manually initiate some steps and coordinate between them. If you are using ART, it is just one step or command. The sequence is controlled by the tool.
118
Example 9-1 Job output for a VIC for IMS and DB2
9.3 DRMRECOV
When in a recovery situation, users have to spend some time in order to find out the correct information to make the appropriate decision about the recovery. The more time is spent, the larger the impact to the environment. With ART managing the recovery, the time of recovery can be largely reduced. ART saves the information into its own RECON data sets, one for IMS and other for DB2. ART also checks internally with IMS RECON data set and DB2 SYSIBM.SYSCOPY in order to provide the correct information on recovery. Furthermore, a wild card can be used, and this also can save a lot of time. Typically, for an IMS full function database, when a database recovery is required, the database portion, the primary secondary, and all secondary indices will all be recovered to the same point-in-time. If the
119
naming convention used for the full function database is suitable, the use of the wildcard can reduce the time for job preparation. With the current ART release, the JCL to recover all the recovery databases are stored in one job. You need manual intervention to modify the job to execute in parallel. The following steps are recommended to use ART to recover databases: 1. 2. 3. 4. 5. 6. 7. Use the ART MAP command to identify the VIC ID (the recovery point). Ask ART RECOV to generate the JCL. Verify the generated JCL and timestamp. Submit the generated JCL and check the return code of the jobs. Make a FIC for DB2 Database, and an Image Copy for the IMS database. Take a new VIC point. Use the ART MAP command to verify the above process.
Is s u e A R T M A P to id e n tify th e V IC
Is s u e A R T D R M R E C O V to g e n re c o v e r y J C L
V e r ify th e g e n J C L a n d re c o v e ry tim e s ta m p
Ta k e a n e w V IC
Ta k e im a g e c o p ie s fo r th e r e c o v e r e d IM S D B a n d D B 2 T S
S u b m it th e g e n J C L , c h e c k th e r e tu r n c o d e
Is s u e A R T M A P to v e r ify th e a b o v e re c o ve ry p ro c e s s
120
In our testing scenario, we ran several updates to an IMS database and a DB2 table space, taking an Image Copy after each update and a VIC after each copy. For IMS we used the DRMIC function, for DB2 we took one copy with the DRMFIC function, and used the DRMIIC function for subsequent copies. The JCL submitted for the father process can be seen in Example 9-2.
Example 9-2 ART father process for DRMRECOV
//PAOLOR5R JOB (999,POK),'ART',CLASS=A,MSGCLASS=T, // NOTIFY=&SYSUID,TIME=1440,REGION=0M,MSGLEVEL=(1,1) /*JOBPARM SYSAFF=SC63,L=9999 //*JOBLIB DD DSN=DB2G7.SDSNLOAD,DISP=SHR //JOBLIB DD DSN=DB2G7.SDSNLOAD,DISP=SHR // JCLLIB ORDER=(DB2V710G.PROCLIB) //* //********************************************************************** //SBOTH EXEC PGM=DRMEXEC,DYNAMNBR=50,REGION=2M, // PARM=(FUNCTION,'DRMRECOV',IMID,'IMSG',DB2ID,'DB2G') //* //SYSIN DD * //********************************************************************** //* OPTIONAL DATA SETS //* //CSXPRINT DD SYSOUT=* //* CSXPRINT CHECKS PRINTING OF MESSAGES //* //*JCLOUT DD DISP=SHR,DSN=PAOLOR3.DB2.JCL(ARTJCL) //* JCLOUT ALLOWS GENERATED JCL TO BE WRITTEN TO DATA SET //* //*CSXPLIB DD DISP=SHR,DSN=DRM.V1R2M0.SDRMPARM //* CSXPLIB ALLOWS A PARMLIB OTHER THAN DEFAULT //* //*CSXULIB DD DISP=SHR,DSN=DRM.V1R2M0.SDRMPARM //* CSXULIB ALLOWS A USER CREATED PARMLIB TO OVER RIDE //
This particular job was created by the user and submitted to recovery the IMS database and DB2 table space to a previous point-in-time in the application cycle. See Figure 9-5 for the application cycle and the VIC used for the recovery.
VIC 02151V01
Image Copy
Batch Update
VIC 02151V03
Image Copy
Image Copy
Batch Update
VIC 02151V02
Image Copy
Batch Update
VIC 02151V04
The application recovery then involved recovering both an IMS database and a DB2 table space to the VIC labeled 02151V03 (see Example 9-3).
Example 9-3 SYSIN to DRMRECOV function
DB=IVPDB22,DBSET=DRM,TS=DRM,FORCE=Y,FLUSH=N,TEST=N,ID=02151V03
121
The father process in Example 9-2 then spawned two daughter processes, one performs the DB2 Recovery (see Example 9-4), the other one performs the IMS recovery (see Example 9-6).
Example 9-4 JCL for DB2 Recovery created by ART
The DB2 Recovery process allocates first the full copy and then applies the incremental copy. Even though the VIC follows immediately after the Image Copy, it should be noted that the VIC invokes the DB2 QUIESCE utility, and all DB2 recoveries processed by ART are TORBA recoveries (see the sysin generated in Example 9-5).
Example 9-5 SYSIN DB2 Recovery
RECOVER TABLESPACE DRM.DRM TORBA X'0002B94BFB0E'
122
The IMS recovery process generated by ART recovers the database to the Image Copy immediately preceding the VIC. It invokes DBRC as part of the recovery process.
Example 9-6 ART generated IMS recovery
123
developed an interface during the residency period utilizing the IMS Type 2 AOI application routine, and built a way for communicating between these two products. The routine is available as additional material to this redbook, as described in Appendix C, Additional material on page 155. The assumption is that the ARTs DRMVIC has created virtual Image Copy checkpoints prior to the DB2 objects update. However, DRMVIC has only taken virtual checkpoints for DB2 objects, not for the IMS database data sets and areas. Standard Image Copies have been taken for both IMS database data sets and areas, and DB2 objects with daily and/or weekly cycles. But, they might not have been taken at the same time. In the recovery scenario shown in Figure 9-6, the IMS database data sets and areas should be recovered based on the DB2 recovery taken using the DB2s DRMVIC VIC point. This VIC point can be obtained from the DRMMAP reports. To recover the IMS database data sets and areas, the applicable database lists can be passed to the interface through //SYSUT1 DD with the point-in-time values. The format of these values should be 12 digits YYDDDHHMMSSS. The point-in-time values can be obtained from ARTs DRMAP output.
In this example, the interface BMP program, $AORS, expects a parameters via APARM in the EXEC statement. The total number of bytes that can be passed is 32 due to an IMS restriction. For more details, refer to IMS Version 7 Installation Volume 2: System Definition and Tailoring, GC26-9430-01. The parameter keywords usage is as follows:
T=
It indicates the type of input stream from //SYSUT1 DD *. There are only two possible values: D = database lists, and C = command lists.
124
W=
It indicates the wait time after certain commands have executed (for example /DBR, /SWI, /REC, and /STA.) These commands should be monitored to verify their completion, so we try a max of six times after W seconds until they go from pending to completed status. The time in W can be specified only in seconds (such as W=5, wait for 5 seconds.)
RCVTIME=
It indicates the recovery time for point-in-time (PITR). It can specify any valid timestamp format. And also, it always represents the a LOCAL TIME with 12 digits (yydddhhmmsss), rather than UTC timestamp. In the sample JCL streams shown in Example 9-7, individual DD statements are very much the conventional way, and they are required, as shown here, except for the //$SNAP, which is optional and used for internal tracing:
STEPLIB
Required It must specify the load library containing the Interface routine, $AORS, followed by IMSVS.SDFSRESL.
DBDLIB
Required It must contain the IMSVS.DBDLIB which has the DBD members. Required The output summary messages from interface routine. Required It contains a database or command lists. Optional It is used for an internal trace.
SYSUT2
SYSUT1
$SNAP
Note: Remember that, as per IMS restriction, a blank is always require between the parameters in APARM instead of a comma. If you violate this rule you will receive abend code U=642.
125
DBRC
CTL RGN
DRM
DLI SAS
DEDBs
DLI DBs
RECON
LOGs
CAs
I/Cs
DBs
Figure 9-6 Data Flow for Interface between ART and IMS/ORS
126
Online transactions, BMPs, and DLI, TSO./TMP jobs update both IMS and DB2
LOGs
ART VIC (only DB2) Prior to BMP(1)
LOGs
ART VIC (only DB2) Prior to BMP (2)
LOGs
ART VIC (only DB2) Prior to BMP (3) ART VIC (only DB2) Prior to BMP (4)
ICs IMS/DB2
Figure 9-7 The application activities for both IMS and DB2 objects under ART environment
As seen Figure 9-7, there were four BMPs executed. The first run to the third run were successfully completed, however, the forth run was run with wrong input transactions, or a duplicate run. Therefore, the IMS database data sets, areas, and DB2 objects must restore prior to the forth BMP job. There were Image Copies for both IMS data sets, areas, and DB2 objects, but the timestamps for Image Copy operation between IMS and DB2 were in a different time zone. Therefore, the IMS data sets, areas must recover base on DB2s point-in-time because the Image Copy data sets were not available along with DB2 Image Copies. To recover both IMS and DB2 objects, the following actions can be taken: Obtain the update intent database listed from the BMPs PSB. Generate the JCL streams and submit it for DB2 objects from ARTs DRMRECOV. Obtain the point-in-time for IMS database data sets from ARTs DRMMAP. This point-in-time should be same entry from above DB2 object JCL streams, and passes to IMS/ORS interface routine via APARM in EXEC. Then the command or database listc pass to IMS/ORS the //SYSUT1 DD IVPDB22 DI21PART etc. or /REC ADD RCVTOKEN BMP4TH DB IVPDB22 DI21PART /DIS RECOVERY ALL /SWITCH OLDS /DBR DB IVPDB22 DI21PART /DIS DB IVPDB22 DI21PART NOFEOV /REC START RCVTOKEN BMP4TH RCVTIME 021591432033 /DIS RECOBERY ALL
Example 9-8 is for an interface between ART and IMS/ORS with a database list. This database list can be obtained executing PSBs PCB lists with update intent.
127
After obtaining all necessary information, the executable sample JCL was built and it was executed.
Example 9-8 JCL streams built to execute the $AORS
//PAOLOR1# JOB (33200999,54000002,86000000),'DRM',CLASS=A,REGION=0M, // MSGCLASS=X,NOTIFY=PAOLOR1 //PROCLIB JCLLIB ORDER=(DRM.$PDSE,IMS710G.PROCLIB) //* //$AORS EXEC IMSBATCH,SOUT=*,MBR=$AORS,PSB=DRM1,IMSID=IMSG, // APARM='T=D W=10.RCVTIME=021641509235' //STEPLIB DD DSN=DRM.PGMLIB,DISP=SHR // DD DSN=IMS710G.SDFSRESL,DISP=SHR //DBDLIB DD DSN=IMS710G.DBDLIB,DISP=SHR //$SNAP DD SYSOUT=* //SYSUT2 DD SYSOUT=* //SYSUT1 DD * * 7 DATABASES MUST RECOVER IVPDB1 IVPDB22 IVPDB2 DBFSAMD4 IVPDB3 DI21PART DBFSAMD3
After successfully executing the above job in Example 9-8, the following output reports are generated. Each iteration reports comprehensive information.
Example 9-9 SYSUT2 outputs from ART and IMs/ORS Interface routine: $AORS
(C) $AORS SUMMARY OUTPUT FROM '$AORS' 2002.164 160739 +---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+---* 7 DATABASES MUST RECOVER IVPDB1 IVPDB22 IVPDB2 DBFSAMD4 IVPDB3 DI21PART DBFSAMD3 End
+---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+0001 /SWI OLDS Results from above Command: DFS058I, '/SWI' Command In Progress !
+---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+0002 /DIS OLDS Results from above Command: OLDS-DDNAME % FULL RATE ARCH-JOB *DFSOLP03 0 0 *DFSOLS03 0 0 DFSOLP02 DFSOLS02 DFSOLP01 DFSOLS01 DFSOLP00 DFSOLS00 DFSOLP99 DFSOLS99
ARCH-STATUS
128
DFSOLP05 AVAILABLE DFSOLS05 AVAILABLE DFSOLP04 AVAILABLE DFSOLS04 AVAILABLE DUAL OLDS LOGGING, DUAL WADS LOGGING AUTOMATIC ARCHIVE = 01 WADS = *DFSWADS0 *DFSWADS1 DFSWADS8 DFSWADS9 *02164/160752*
OLDS-DDNAME % FULL RATE ARCH-JOB ARCH-STATUS *DFSOLP03 0 0 *DFSOLS03 0 0 DFSOLP02 AVAILABLE DFSOLS02 AVAILABLE DFSOLP01 AVAILABLE DFSOLS01 AVAILABLE DFSOLP00 AVAILABLE DFSOLS00 AVAILABLE DFSOLP99 AVAILABLE DFSOLS99 AVAILABLE DFSOLP05 AVAILABLE DFSOLS05 AVAILABLE DFSOLP04 AVAILABLE DFSOLS04 AVAILABLE DUAL OLDS LOGGING, DUAL WADS LOGGING AUTOMATIC ARCHIVE = 01 WADS = *DFSWADS0 *DFSWADS1 DFSWADS8 DFSWADS9 *02164/160752*
+---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+0003 /REC ADD RCVTOKEN T1641607 DB IVPDB1 IVPDB1I IVPDB22 IVPDB2 DBFSAMD4 Results from above Command: DFS058I, '/REC' Command In Progress !
+---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+0004 /REC ADD RCVTOKEN T1641607 DB DI21PART Results from above Command: DFS058I, '/REC' Command In Progress !
+---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+0005 /DIS RECOVERY T1641607 **** RECOVERY LIST INFORMATION ********************* TOKEN STATUS ERROR OPTION RECOVERY TYPE T1641607 BEING BUILT N/A N/A **** RECOVERY LIST ENTRY INFORMATION *************** DATABASE DATA SET IVPDB1 IVPDB1I IVPDB22 IVPDB2 DBFSAMD4 LOAN START OPTION OFFLINE OFFLINE OFFLINE OFFLINE OFFLINE STATUS NORMAL NORMAL NORMAL NORMAL NORMAL AUTH SSID NONE NONE NONE NONE NONE
129
DI21PART DI21PARO OFFLINE NORMAL NONE DI21PART DI21PART OFFLINE NORMAL NONE *02164/163536* +---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+0006 /DBR DB IVPDB1 IVPDB1I IVPDB22 IVPDB2 DBFSAMD4 DI21PART NOFEOV. Results from above Command: DFS058I, '/DBR' Command In Progress !
+---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+0007 /DIS DB IVPDB1 IVPDB1I IVPDB22 IVPDB2 DBFSAMD4 DI21PART DATABASE TYPE IVPDB1 DL/I IVPDB1I DL/I IVPDB22 DL/I IVPDB2 DL/I DBFSAMD4 DL/I DI21PART DL/I *02164/160843* TOTAL UNUSED TOTAL UNUSED ACC UP UP UP UP UP UP CONDITIONS STOPPED, NOTOPEN STOPPED, NOTOPEN STOPPED, NOTOPEN STOPPED, NOTOPEN STOPPED, NOTOPEN STOPPED, NOTOPEN
+---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+0008 /REC START RCVTOKEN T1641607 Results from above Command: DFS058I, '/REC' COMMAND IN PROGRESS !
+---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+0009 /DIS DB IVPDB1 IVPDB1I IVPDB22 IVPDB2 DBFSAMD4 DI21PART DATABASE TYPE IVPDB1 DL/I IVPDB1I DL/I IVPDB22 DL/I IVPDB2 DL/I DBFSAMD4 DL/I DI21PART DL/I *02164/160923* TOTAL UNUSED TOTAL UNUSED ACC UP UP UP UP UP UP CONDITIONS NOTOPEN, RECOVERY NOTOPEN, RECOVERY NOTOPEN, RECOVERY NOTOPEN, RECOVERY NOTOPEN, RECOVERY NOTOPEN, RECOVERY
+---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+0010 /STA DB IVPDB1 IVPDB1I IVPDB22 IVPDB2 DBFSAMD4 DI21PART Results from above Command: DFS058I, '/STA' Command In Progress !
+---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+0011 /DIS DB IVPDB1 IVPDB1I IVPDB22 IVPDB2 DBFSAMD4 DI21PART DATABASE IVPDB1 IVPDB1I IVPDB22 IVPDB2 DBFSAMD4 DI21PART TYPE DL/I DL/I DL/I DL/I DL/I DL/I TOTAL UNUSED TOTAL UNUSED ACC UP UP UP UP UP UP CONDITIONS NOTOPEN, ALLOCS NOTOPEN, ALLOCS NOTOPEN, ALLOCS NOTOPEN, ALLOCS NOTOPEN, ALLOCS NOTOPEN, ALLOCS
130
*02164/161923* -Completed
131
132
Part 3
Part
Appendixes
In this part we present two appendixes containing: Sample JCL and output for DB2 Recovery Sample JCL and output for IMS recovery
133
134
Appendix A.
135
Example A-1 shows the JCL stream using the TEMPLATE parameter of DB2 V7 to allocate the COPYDDN. SHRLEVEL REFERENCE, and FULL YES are the defaults, and are not specified as sysin input parameters.
Example: A-2 Output for JCL stream in Example A-1
DSNUGUTC - OUTPUT START FOR UTILITY, UTILID = DEPT DSNUGUTC - TEMPLATE PAOLOR1 UNIT SYSDA DSN(PAOLOR3.T&TI..DSNDB04.DEPT) DISP(MOD,CATLG,CATLG) DSNUJTDR - TEMPLATE STATEMENT PROCESSED SUCCESSFULLY DSNUGUTC - COPY TABLESPACE DSNDB04.DEPT COPYDDN(PAOLOR1) DSNUGDYN - DATASET ALLOCATED. TEMPLATE=PAOLOR1 DDNAME=SYS00001 DSN=PAOLOR3.T183607.DSNDB04.DEPT DSNUBBID - COPY PROCESSED FOR TABLESPACE DSNDB04.DEPT NUMBER OF PAGES=3 AVERAGE PERCENT FREE SPACE PER PAGE = 13.66 PERCENT OF CHANGED PAGES = 0.00 ELAPSED TIME=00:00:00 DSNUBBID - DB2 IMAGE COPY SUCCESSFUL FOR TABLESPACE DSNDB04.DEPT DSNUGBAC - UTILITY EXECUTION COMPLETE, HIGHEST RETURN CODE=0
An incremental Image Copy is a copy only of pages that have been modified since the last execution of the COPY utility. See Example A-3 for JCL stream, and Example A-4 for its output.
Example: A-3 Job stream to create DB2 incremental Image Copy
//********************************************************************** //*** DB2 INCREMENTAL IMAGE COPY //********************************************************************** //INCRCOPY EXEC PGM=DSNUTILB,REGION=0K, // PARM='DB2G,DEPT,,' //STEPLIB DD DSN=DB2G7.SDSNLOAD,DISP=SHR
136
//SYSPRINT DD SYSOUT=* //SYSUDUMP DD SYSOUT=* //SYSIN DD * TEMPLATE PAOLOR1 UNIT SYSDA DSN(PAOLOR3.T&TI..DSNDB04.DEPT) DISP(MOD,CATLG,CATLG) COPY TABLESPACE DSNDB04.DEPT COPYDDN(PAOLOR1) FULL NO /* //
Example A-3 shows the JCL stream using the TEMPLATE parameter of DB2 V7 to allocate the COPYDDN. SHRLEVEL REFERENCE is the default and is not specified. FULL NO is not the default and needs to be included in the sysin parameter to create an incremental copy. The incremental copy may be forced into a full copy by DB2 if the CHANGELIMIT parameter has been exceeded or for certain system requirements. Refer to DB2 Utility Guide and Reference, SC26-9945 for more details.
Example: A-4 Output for JCL stream in Example A-3
DSNUGUTC - OUTPUT START FOR UTILITY, UTILID = DEPT DSNUGUTC - TEMPLATE PAOLOR1 UNIT SYSDA DSN(PAOLOR3.T&TI..DSNDB04.DEPT) DISP(MOD,CATLG,CATLG) DSNUJTDR - TEMPLATE STATEMENT PROCESSED SUCCESSFULLY DSNUGUTC - COPY TABLESPACE DSNDB04.DEPT COPYDDN(PAOLOR1) FULL NO DSNUGDYN - DATASET ALLOCATED. TEMPLATE=PAOLOR1 DDNAME=SYS00001 DSN=PAOLOR3.T183808.DSNDB04.DEPT DSNUBBID - COPY PROCESSED FOR TABLESPACE DSNDB04.DEPT NUMBER OF PAGES=2 AVERAGE PERCENT FREE SPACE PER PAGE = 20.50 PERCENT OF CHANGED PAGES = 16.66 ELAPSED TIME=00:00:00 DSNUBBID - DB2 IMAGE COPY SUCCESSFUL FOR TABLESPACE DSNDB04.DEPT DSNUGBAC - UTILITY EXECUTION COMPLETE, HIGHEST RETURN CODE=0
137
YYQQQ DATE TIME EVENT ID -----------------------------------------02143 23/05/02 19:27:48.0 FIC 0002B7173268 02143 23/05/02 19:27:48.0 FIC 0002B718205C 02143 23/05/02 19:27:48.0 IN USE STATE ... 02143 23/05/02 19:27:49.0 FIC 0002B7191268 02143 23/05/02 19:27:49.0 FIC 0002B719FE56 02143 23/05/02 19:27:49.0 IN USE STATE ... 02143 23/05/02 19:28:38.2 VIC LOAD0522 02143 23/05/02 19:28:38.3 IN USE STATE ... 02143 23/05/02 19:41:53.0 END OF USE 02143 23/05/02 19:41:53.0 IIC 0002B7214D40 02143 23/05/02 19:41:53.0 IIC 0002B7227D88 02143 23/05/02 19:41:53.0 IN USE STATE ... 02143 23/05/02 19:41:54.0 END OF USE 02143 23/05/02 19:41:54.0 IIC 0002B723AD88 02143 23/05/02 19:41:54.0 IN USE STATE ... 02143 23/05/02 19:43:24.9 VIC BAT0522A 02143 23/05/02 19:43:25.0 IN USE STATE ... 02143 23/05/02 19:45:40.0 FIC 0002B7245717 02143 23/05/02 19:45:40.0 IN USE STATE ... 02143 23/05/02 19:45:43.0 FIC 0002B7253D00 02143 23/05/02 19:45:43.0 IN USE STATE ... 02143 23/05/02 19:45:44.0 FIC 0002B7262492 02143 23/05/02 19:45:44.0 FIC 0002B7270AF1 02143 23/05/02 19:45:44.0 IN USE STATE ... 02143 23/05/02 19:50:45.0 END OF USE 02143 23/05/02 19:50:45.0 IIC 0002B729450D 02143 23/05/02 19:50:45.0 IIC 0002B72A740C 02143 23/05/02 19:50:45.0 IN USE STATE ... 02143 23/05/02 19:50:46.0 END OF USE 02143 23/05/02 19:50:46.0 IIC 0002B72BA386 02143 23/05/02 19:50:46.0 IN USE STATE ... 02143 23/05/02 19:52:04.5 VIC BAT0522B 02143 23/05/02 19:52:04.6 IN USE STATE ... 02143 23/05/02 20:24:41.0 END OF USE 02143 23/05/02 20:24:41.0 IIC 0002B72D7655 02143 23/05/02 20:24:41.0 IN USE STATE ... 02143 23/05/02 20:24:44.0 END OF USE 02143 23/05/02 20:24:44.0 IIC 0002B72EA497 02143 23/05/02 20:24:44.0 IIC 0002B72FD386 02143 23/05/02 20:24:44.0 IN USE STATE ... 02143 23/05/02 20:26:34.2 VIC BAT0522C 02143 23/05/02 20:26:34.3 IN USE STATE ... 02143 23/05/02 20:31:30.0 END OF USE 02143 23/05/02 20:31:30.0 IIC 0002B73197C4 02143 23/05/02 20:31:30.0 IN USE STATE ... 02143 23/05/02 20:32:16.7 VIC BAT0522D 02143 23/05/02 20:32:16.8 IN USE STATE ... 02143 23/05/02 20:34:04.0 END OF USE 02143 23/05/02 20:34:04.0 FIC 0002B72D7655
+---------------------+ | DBD/DB DDN/TS | |AA PAOLOR3A TSACT | |AB PAOLOR3A TSDEPT | |AC PAOLOR3A TSEPA | |AD PAOLOR3A TSPROJ | +---------------------+
138
02143 23/05/02 20:34:04.0 FIC 0002B73197C4 | |R|.|.| 02143 23/05/02 20:34:04.0 IN USE STATE ... |.|.|.|.| 02143 23/05/02 20:34:05.0 END OF USE |.|.| | | 02143 23/05/02 20:34:05.0 FIC 0002B72EA497 |.|.|R| | 02143 23/05/02 20:34:05.0 FIC 0002B72FD386 |.|.| |R| 02143 23/05/02 20:34:05.0 IN USE STATE ... |.|.|.|.| 02143 23/05/02 20:35:06.0 IN USE STATE ... |.|.|.|.| 02143 23/05/02 20:35:06.9 VIC BAT0522E |V|V|V|V| 02143 23/05/02 20:35:07.0 TUNNEL ENTRY ... | |T| | | 02143 23/05/02 20:35:07.0 IN USE STATE ... |.|T|.|.| 02143 23/05/02 20:37:03.0 TUNNEL EXIT |.|T|.|.| 02143 23/05/02 20:37:03.0 RCV 0002B7358F54 |.|/|.|.| 02143 23/05/02 20:41:53.8 VIC BAT0522F |V|V|V|V| 02143 23/05/02 20:41:53.9 IN USE STATE ... |.|.|.|.| 02143 23/05/02 20:42:58.0 END OF USE |.|.|.| | 02143 23/05/02 20:42:58.0 RELOAD LOG(NO) |.|.|.|/| 02143 23/05/02 20:43:00.0 END OF USE | |.| | | 02143 23/05/02 20:43:00.0 RELOAD LOG(NO) |/|.|/| | 02143 23/05/02 20:43:03.0 END OF USE | | | | | 02143 23/05/02 20:43:03.0 RELOAD LOG(NO) | |/| | | 02143 23/05/02 20:43:36.0 FIC 0002B739CD2F |R| | | | 02143 23/05/02 20:43:36.0 FIC 0002B73ABA3F | |R| | | 02143 23/05/02 20:43:36.0 IN USE STATE ... |.|.| | | 02143 23/05/02 20:43:37.0 FIC 0002B73BA7BA |.|.|R| | 02143 23/05/02 20:43:37.0 FIC 0002B73C944A |.|.| |R| 02143 23/05/02 20:43:37.0 IN USE STATE ... |.|.|.|.| 02143 23/05/02 20:44:13.0 IN USE STATE ... |.|.|.|.| 02143 23/05/02 20:44:13.5 VIC LOD0522B |V|V|V|V| 02143 23/05/02 20:44:13.6 TUNNEL ENTRY ... |T|T|T|T| 02143 23/05/02 20:45:56.0 TUNNEL EXIT |T|T|T|T| 02143 23/05/02 20:45:56.0 RCV 0002B741FAE9 |/|/|/|/| 02143 23/05/02 20:46:43.5 VIC BAT0522F |V|V|V|V| 02143 23/05/02 20:46:43.6 IN USE STATE ... |.|.|.|.| 02143 23/05/02 20:46:52.4 MAP FLASH TIME |.|.|.|.| ------------------------------------------ +-+-+-+-+ MEANS: "R"=RECOVERY TIMESTAMP AUTHORIZED BY DBRC/DB2 "S"=ONLINE IMAGE COPY OR FIC/IIC WITH SHRLEVEL=SHARE "/"=RECOVERY RUN TIME OR LOAD/RELOAD/REORG OF A DB2 TS WITH LOG=NO "U"=IN USE FOR UPDATE "."=CAN HAVE BEEN USED FOR UPDATE "L"=IN USE FOR UPDATE AND LOSS WARNING CONDITION REACHED "T"=HAS BEEN USED BUT UNDER TUNNEL CREATED BY A RECOVERY "V"=VIC RECOVERY TIMESTAMP "="=LOAD/RELOAD/REORG OF A DB2 TS WITH LOG=YES DRMMAP SLIDER - APPLICATION RECOVERY TOOL FIC - FULL PRIMARY IMAGE COPY DATA SET AT THE LOCAL SITE ONLY FRC - FULL PRIMARY IMAGE COPY DATA SET AT THE RECOVERY SITE ONLY FRL - FULL PRIMARY IMAGE COPY DATA SETS AT THE RECOVERY AND LOCAL SITE IIC - INCREMENTAL PRIMARY IMAGE COPY DATA SET AT THE LOCAL SITE ONLY IRL - INCREMENTAL PRIMARY IMAGE COPY DATA SETS AT THE RECOVERY AND LOCAL SITE
139
140
Appendix B.
141
Example B-2 shows the output of the execution of the standard Image Copy.
Example: B-2 Output from job in Example B-1
DFS391I D A T A B A S E D A T A S E T I M A G E C O P Y U T I L I T Y
S Y S I N C O N T R O L C A R D D1 IVPDB22 DFSIVD22 COPY1 COPY2 E N D O F S Y S I N C O N T R O L C A R D DFS391I **COPY DATA BASE IVPDB22 DDNAME DFSIVD22 DFS2803I RECORD COUNT = 000000315 FOR DDNAME DFSIVD22 COPY 1 ON VOLUME(S) - SBOX20 DSP0021I RECON DATA SETS SUCCESSFULLY UPDATED DFS339I FUNCTION IM HAS COMPLETED NORMALLY RC=00
142
Example B-4 shows the output of the execution of a concurrent Image Copy.
Example: B-4 Output from job in Example B-3
DFS391I D A T A B A S E D A T A S E T I M A G E C O P Y U T I L I T Y
S Y S I N C O N T R O L C A R D D2 IVPDB22 DFSIVD22 COPY1 COPY2 E N D O F S Y S I N C O N T R O L C A R D DFS391I **COPY DATA BASE IVPDB22 DDNAME DFSIVD22 DFS2803I RECORD COUNT = 000001260 FOR DDNAME DFSIVD22 COPY 1 ON VOLUME(S) - SBOX81 COPY 2 ON VOLUME(S) - SBOX20 DSP0021I RECON DATA SETS SUCCESSFULLY UPDATED C O N C U R R E N T I M A G E C O P Y DFS339I FUNCTION IM HAS COMPLETED NORMALLY RC=00 P R O C E S S E D
143
DD DSN=IMS710G.DBDLIB,DISP=SHR DD DSN=DRM.DFSIVD22, DCB=BUFNO=10,DISP=SHR DD DSN=IMS710G.DRM.IC(+1),DISP=(NEW,CATLG,DELETE), DCB=BUFNO=20, SPACE=(TRK,(16,5),RLSE),UNIT=SYSDA DD DSN=IMS710G.DRM.IC(+2),DISP=(NEW,CATLG,DELETE), DCB=BUFNO=20, SPACE=(TRK,(16,5),RLSE),UNIT=SYSDA DD DUMMY DD DUMMY DD DSN=IMS710G.PROCLIB(DFSVSM00),DISP=SHR DD * DFSIVD22 COPY1 COPY2 COPY3 COPY4 XL
Example B-6 shows the output of the execution of the Type 2 Image Copy.
Example: B-6 Output from job in Example B-5
DFS391I D A T A B A S E D A T A S E T I M A G E C O P Y 2 U T I L I T Y
S Y S I N C O N T R O L C A R D D2 IVPDB22 DFSIVD22 COPY1 COPY2 COPY3 COPY4 XL E N D O F S Y S I N C O N T R O L C A R D DFS391I **COPY DATA BASE IVPDB22 DDNAME DFSIVD22 PAGE 0001 5695-DF175 DFSMSDSS V1R3.0 DATA SET SERVICES 2002.133 12:21 DUMP LIDD(DFSIVD22) DATASET(INCLUDE('DRM.DFSIVD22')) CC ODD(COPY1 COPY2 ) WAIT(0,0) OPT(4) NOTIFYCC CAN ADR101I (R/I)-RI01 (01), TASKID 001 HAS BEEN ASSIGNED TO COMMAND 'DUMP ' ADR109I (R/I)-RI01 (01), 2002.133 12:21:19 INITIAL SCAN OF USER CONTROL STATEMENTS COMPLETED. ADR050I (001)-PRIME(02), DFSMSDSS INVOKED VIA CROSS MEMORY APPLICATION INTERFACE ADR016I (001)-PRIME(01), RACF LOGGING OPTION IN EFFECT FOR THIS TASK ADR006I (001)-STEND(01), 2002.133 12:21:19 EXECUTION BEGINS DFS3121I LOGICAL COPY SUCCESSFUL FOR DB/AREA IVPDB22 DDN DFSIVD22 DSN DRM.DFSIVD22 DSN DRM.DFSIVD22 ADR767I (001)-T0MI (02), 2002.133 12:21:22 CONCURRENT COPY INITIALIZATION SUCCESSFUL FOR DATA SET DRM.DFSIVD22 IN CATALOG UCAT.VSBOX23. SERIALIZATION IS RELEASED. ADR801I (001)-DTDSC(01), DATA SET FILTERING IS COMPLETE. 1 OF 1 DATA SETS WERE SELECTED: 0 FAILED SERIALIZATION AND 0 FAILED FOR OTHER REASONS. ADR734I (001)-DTDSC(01), 2002.133 12:21:22 CONCURRENT COPY INITIALIZATION SUCCESSFUL FOR 1 OF 1 SELECTED DATA SETS. SERIALIZATION FOR THIS DATA IS RELEASED IF DFSMSDSS HELD IT. THE INTERMEDIATE RETURN CODE IS 0000. ADR454I (001)-DTDSC(01), THE FOLLOWING DATA SETS WERE SUCCESSFULLY PROCESSED CLUSTER NAME DRM.DFSIVD22 CATALOG NAME UCAT.VSBOX23 COMPONENT NAME DRM.DFSIVD22.DATA ADR006I (001)-STEND(02), 2002.133 12:21:55 EXECUTION ENDS
144
ADR013I (001)-CLTSK(01), 2002.133 12:21:55 TASK COMPLETED WITH RETURN CODE 0000 ADR012I (SCH)-DSSU (01), 2002.133 12:21:55 DFSMSDSS PROCESSING COMPLETE. HIGHEST RETURN CODE IS 0000 DSP0021I RECON DATA SETS SUCCESSFULLY UPDATED DFS339I FUNCTION IM HAS COMPLETED NORMALLY RC=00
145
C A R D S
**CHANGE ACCUMULATION FOR DATA BASE DI21PART DCB DDNAME/NUMBER DI21PART PURGE DATE-TIME SPECIFIED 021282248523 RECORD COUNT = 0000000 FOR DDNAME DFSULOG RECORD COUNT = 0000000 FOR DDNAME DFSUCUMO **CHANGE ACCUMULATION FOR DATA BASE DI21PART DCB DDNAME/NUMBER DI21PARO PURGE DATE-TIME SPECIFIED 021282248529
146
RECORD COUNT = 0000000 FOR DDNAME DFSULOG RECORD COUNT = 0000000 FOR DDNAME DFSUCUMO **CHANGE ACCUMULATION FOR DATA BASE IVPDB22 PURGE DATE-TIME SPECIFIED 021282055392 RECORD COUNT = 0003370 FOR DDNAME DFSULOG RECORD COUNT = 0000666 FOR DDNAME DFSUCUMO RECORD COUNT = 0000895 FOR DDNAME DFSUCUMN FUNCTION CA HAS COMPLETED NORMALLY RC=0 RECON DATA SETS SUCCESSFULLY UPDATED
--- WEDNESDAY, 08 MAY 2002 ---IRR010I USERID PAOLOR1 IS ASSIGNED TO THIS JOB. ICH70001I PAOLOR1 LAST ACCESS AT 19:15:49 ON WEDNESDAY, MAY 8, 2002 $HASP373 PAOLOR1$ STARTED - INIT 3 - CLASS A - SYS SC63 IEF403I PAOLOR1$ - STARTED - TIME=19.19.27 - ASID=001B - SC63 +DFS044I DBRC TURNED OFF THIS EXECUTION +DFS2208I SINGLE LOGGING IN EFFECT ON IMS DATA SET IMSG +DFS2207I IMS LOG(S) BLOCKSIZE=32760, BUFNO=002 IMSG +DFS035I BATCH INITIALIZATION COMPLETE IMSG +DFS2500I DATABASE IVPDB22 SUCCESSFULLY ALLOCATED IMSG +DFS395I BACKOUT COMPLETE FOR PSB $SUPD FOR REGION 001 <<===== +DFS092I IMS LOG TERMINATED IMSG
147
,RC=0
P R O C E S S E D
148
REQUATE CSECT $VRST AMODE 31 BAKR R14,0 BASR R12,0 USING *,R12 L LA ICM BZ STH BCTR LA EX LA EX R2,0(R1) R3,0 R3,3,0(R2) $U3500 R3,$SHRDSNL R3,0 R6,$ALTER+7 R3,$MVC R6,$SHRDSNM R3,$MVC R1,$SHR99 99 R1,$IN99 99 R1,$PRT99 99 R9,$SYSIN ((R9),OUTPUT) (R9),$ALTER ((R9)) R1,0 EP=IDCAMS,DCB=(0) R11,R15 ($ACB) ($ACB) R15,R11 PR
GEN REGS $VRST AMODE=31 SAVE+STACK BASE REG BASE LOAD PARM 0 FOR ICM PARM CODED IN EXEC ? IF NOT, THEN ABEND U=3500 (L'$SHRDSNM) -1 FOR 'EX' FOR CLUSTER NAME COPY VSAM CLUSTER FOR CLUSTER NAME COPY VSAM CLUSTER SYSUT1 ALLOC - SYSUT1 SYSIN ALLOC - SYSIN SYSPRINT ALLOC - SYSPRNT SYSIN OPEN - SYSIN CREATE CLOSE NO PARM LINK SAVE RETURN-CODE OPEN - RESET HIGH USED RBA CLOSE RESTORE RETURN-CODE EXIT
* LA SVC LA SVC LA SVC * LA OPEN PUT CLOSE LA LINK LR OPEN CLOSE LR PR * $U3500 PRINT DS WTO WTO WTO WTO ABEND ON,NOGEN PRINT ON,NOGEN 0H ' ',ROUTCDE=(11) WTO '$VRST DETECTED ''NO PARM IN EXEC ! ',ROUTCDE=(11) ' ABORTED U=3500 !',ROUTCDE=(11) ' ',ROUTCDE=(11) WTO 3500 U=3500
149
DSORG=PS,MACRF=PM,DDNAME=SYSIN,RECFM=FB,LRECL=80 AM=VSAM,DDNAME=SYSUT1,MACRF=RST <= MUST BE 'RST' ACB=$ACB ACB X'40C1D3E3C5D940',45X'40',X'D9C5E4E2C5',23X'40' 0(0,R6),2(R2) COPY VSAM CLUSTER 0D - SYSUT3 RB POINTER - ALLOCATE AL1(128),AL3($SHR1),A(0) RB POINTER AL1(S99RBEND-S99RB,S99VRBAL,S99ONCNV+S99NOMNT,0) AL2(-1,-1),A($SHRPTR,0,0) TEXT UNIT POINTER A($SHRDD,$SHRDSN,$SHRSTAT+X'80000000') AL2(DALDDNAM,1,8) LENGTH CL8'SYSUT1' //SYSUT1 DD AL2(DALDSNAM,1) DALDSNAM AL2(L'$SHRDSNM) LENGTH CL44' ' DATA SET AL2(DALSTATS,1,1),AL1(8) DISP=SHR *-$SHR99 $SHR99
$SHRPTR $SHRDD $SHRDDN $SHRDSN $SHRDSNL $SHRDSNM $SHRSTAT $SHR99SZ * $IN99 DS 0D - SYSIN RB POINTER DC AL1(128),AL3($IN1),A(0) $IN1 DC AL1(S99RBEND-S99RB) $INCD DC AL1(S99VRBAL,S99ONCNV+S99NOMNT,0) $INERR DC AL2(-1,-1),A($INPTR,0,0) $INPTR DC A($INDDN,$INDSN,$INSTS,$INNDSP) DC A($INDSOR,$INRECF,$INLREC,$INTRK,$INPRM) DC A($INUNIT+X'80000000') $INDDN DC AL2(DALDDNAM,1,8),CL8'SYSIN' $INDSN DC AL2(DALDSNAM,1,3),C'&&IN' $INSTS DC AL2(DALSTATS,1,1),X'4' $INNDSP DC AL2(DALNDISP,1,1),X'4' $INDSOR DC AL2(DALDSORG,1,2),X'4000' $INRECF DC AL2(DALRECFM,1,1),X'90' $INLREC DC AL2(DALLRECL,1,2,80) $INTRK DC AL2(DALTRK,0) $INPRM DC AL2(DALPRIME,1,3),AL3(1) $INUNIT DC AL2(DALUNIT,1,5),C'SYSDA' * $PRT99 DS 0D - SYSPRINT RB POINTER DC AL1(128),AL3($PRT1),A(0) $PRT1 DC AL1(S99RBEND-S99RB) $PRTCD DC AL1(S99VRBAL,S99ONCNV+S99NOMNT,0) $PRTERR DC AL2(-1,-1),A($PRTPTR,0,0) $PRTPTR DC A($PRTDD,$PRTSO+X'80000000') $PRTDD DC AL2(DALDDNAM,1,8) $PRTDDN DC CL8'SYSPRINT' $PRTSO DC AL2(DALSYSOU,0) SYSOUT=* * IEFZB4D0 IEFZB4D0 IEFZB4D2 IEFZB4D2 END //$VRST EXEC PGM=$VRST,PARM='IMS710G.DFSIVD31' //STEPLIB DD DSN=DRM.PGMLIB,DISP=SHR
150
000000 000000 000000 00002 00002 00003 00004 000001 000002 000002 00080 00040 00020 00010 000003 000004 000004 000005 000006 000007 000008 00000C 000014 000018 00001C 000024 000026 000028 00002A 00002C 00002C 00002D 00002E 1 Active Usings: None 0D-Loc Object Code Addr1 Addr2 0000030 00031 0 00001 00002 00003 00004 00005 00006 00007 -
67+*********************************************************************** 68+* * 69+* USE THIS MAPPING FOR THE HEADER RECORD FOR RELEASE 6.1 AND AFTER * 70+* THE TIMESTAMP HAS BEEN EXPANDED TO 12 POSITIONS * 71+* * 72+* *
151
00031 00014
0F000 00FFF 000020 000028 00002A 00002C 00002E 000030 000030 000031 000032 000034 00035 0
73+*********************************************************************** 74+ ORG DDATEOUT 75+DHBGDTE DS 0CL12 EXPANDED DATE - TIME -OFFST @BIDSTSP 76+DHDTETME DS 0CL10 DATE - TIME @BIDSTSP 77+DHDATE DS PL4 YY YY DD DF @BIDSTSP 78+DHHHMM DS 0XL2 HH MM @BIDSTSP 79+DHMSTH DS 0XL4 HH MM SS TH @BIDSTSP 80+DHTIME DS XL6 HH MM SS TH MI JU @BIDSTSP 81+DHTMOFF DS PL2 TIME ZONE OFFSET @BIDSTSP 82+DHTATTR EQU X'F000' TIME STAMP ATTRIBUTE MASK @BIDSTSP 83+DHTZQQ EQU X'0FFF' TIME ZONE QQ$ MASK @BIDSTSP 84+DSDDNAME DS CL8 SECONDARY DD NAME 85+DKBLKSZ DS CL2 KSDS BLOCK SIZE 86+DHRECLEN DS CL2 KSDS RECORD LENGTH 87+DHOSBLK DS CL2 OSAM BLOCK SIZE 88+DHOSRECL DS CL2 OSAM RECORD LENGTH 89+DKEYLENT DS 0CL2 KSDS Key length @KV30373 90+ DS CL1 Dummy @KV30373 91+DKEYLNL1 DS CL1 One-byte Key length @KV30373 92+DKEYPOSI DS CL2 KSDS RELATIVE KEY POSITION 93+DDSORGCD DS CL1 DATA SET ORGANIZATION CODE 94+DHDRLEN EQU *-DUMPHDR Header Length - Current @PQ01975
01-DFSUD 01-DFSUD 01-DFSUD 01-DFSUD 01-DFSUD 01-DFSUD 01-DFSUD 01-DFSUD 01-DFSUD 01-DFSUD 01-DFSUD 01-DFSUD 01-DFSUD 01-DFSUD 01-DFSUD 01-DFSUD 01-DFSUD 01-DFSUD 01-DFSUD 01-DFSUD 01-DFSUD
000035 00035 00000 000000 000000 000000 000001 000002 1 Active Usings: None 0D-Loc Object Code Addr1 Addr2 0000003 000004 00000C 000014 000018 00001C 000024 000026 000028 00002A 00002C 00002E 000030 -
96+*********************************************************************** 97+* ALTERNATE DSECT 98+* FOR RELEASES PRIOR TO 6.1 99+*********************************************************************** 100+ ORG DUMPHDR @BIB97 01-DFSUD 101+OUTBUFDS DS 0F @BIB97 01-DFSUD 102+DMPHEADR DS 0CL(DHDRLN51) DUMP HEADER RECORD @PQ01975 01-DFSUD 103+HSAMCTRL DS CL1 @BIB97 01-DFSUD 104+IDOUT DS CL1 @BIB97 01-DFSUD 105+ DS CL1 @BIB97 01-DFSUD Page 5 Stmt Source Statement HLASM R4.0 2002/06/03 17.11 106+DCBNOUT DS CL1 @BIB97 01-DFSUD 107+DBOUT DS CL8 @BIB97 01-DFSUD 108+IDDNOUT DS CL8 @BIB97 01-DFSUD 109+DATEOUT DS CL4 @BIB97 01-DFSUD 110+TIMEOUT DS CL4 @BIB97 01-DFSUD 111+ODDNOUT DS CL8 @BIB97 01-DFSUD 112+IBLKSOUT DS CL2 @BIB97 01-DFSUD 113+ILRECOUT DS CL2 @BIB97 01-DFSUD 114+OBLKSOUT DS CL2 @BIB97 01-DFSUD 115+OLRECOUT DS CL2 @BIB97 01-DFSUD 116+IKEYLENG DS CL2 @BIB97 01-DFSUD 117+IKEYPOS DS CL2 @BIB97 01-DFSUD 118+DBORGOUT DS CL1 @BIB97 01-DFSUD 120+*********************************************************************** 121+* ALTERNATE DSECT 122+* FOR RELEASE 6.1 AND SUBSEQUENT RELEASES 123+*********************************************************************** 124+ ORG DUMPHDR 01-DFSUD 125+OUTBUF52 DS 0F @BIDSTSP 01-DFSUD 126+DMPHDR61 DS 0CL(DHDRLEN) DUMP HEADER RECORD @PQ01975 01-DFSUD 127+HSAMCTL DS CL1 @BIDSTSP 01-DFSUD 128+IDOU DS CL1 @BIDSTSP 01-DFSUD 129+ DS CL1 @BIDSTSP 01-DFSUD 130+DCBNOU DS CL1 @BIDSTSP 01-DFSUD 131+DBOU DS CL8 @BIDSTSP 01-DFSUD 132+IDDNOU DS CL8 @BIDSTSP 01-DFSUD 133+TIMSTOU DS 0CL12 @BIDSTSP 01-DFSUD 134+DATEOU DS CL4 @BIDSTSP 01-DFSUD 135+TIMEOU DS CL6 @BIDSTSP 01-DFSUD 136+OFFSET DS CL2 @BIDSTSP 01-DFSUD 137+ODDNOU DS CL8 @BIDSTSP 01-DFSUD 138+IBLKSOU DS CL2 @BIDSTSP 01-DFSUD 139+ILRECOU DS CL2 @BIDSTSP 01-DFSUD 140+OBLKSOU DS CL2 @BIDSTSP 01-DFSUD 141+OLRECOU DS CL2 @BIDSTSP 01-DFSUD 142+IKEYLEN DS CL2 @BIDSTSP 01-DFSUD 143+IKEYPO DS CL2 @BIDSTSP 01-DFSUD 144+DBORGOU DS CL1 @BIDSTSP 01-DFSUD 146+*********************************************************************** 147+* DUMP RECORD PREFIX 148+*********************************************************************** 149+ ORG OUTBUFDS 01-DFSUD 150+OUTBFPRF DS 0CL8 DUMP RECORD PREFIX @BIB97 01-DFSUD 151+OUTBFRBN DS CL4 RBN OR RBA @BIB97 01-DFSUD 152+OUTBFGAS DS CL4 @BIB97 01-DFSUD 153+OUTBFPRL EQU *-OUTBFPRF PREFIX LENGTH @BIB97 01-DFSUD 154+OUTBFDBA EQU * DATA BEG ADDR @BIB97 01-DFSUD
000031 000000 000000 000000 000001 000002 000003 000004 00000C 000014 000014 000018 00001E 000020 000028 00002A 00002C 00002E 000030 000032 000034 -
00031 00000
00035 00000
00008 00008
152
Page Page Page Active Usings: None 0D-Loc Object Code Addr1 Addr2 0
6 6 6
000006 00 000007 000009 000009 00000C 000010 000018 000018 000020 000021 000024 000028 0002C
00000 00030
00025
00004 00002 000006 00 00000 00001 1 Active Usings: None 0D-Loc Object Code Addr1 Addr2 0 00001 00001 000007 000008 000008 000008 0000000C 00000C 000000000000
Stmt Source Statement HLASM R4.0 2002/06/03 17.11 160 DFSUCHDR 161+* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 162+* * 163+* DB CHANGE ACCUMULATION HEADER RECORD * 164+* FOR RELEASES PRIOR TO 6.1 * 165+* * 166+* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 167+CUMHDR DSECT 01-DFSUC 168+HEADER DS 0D @BIAA4 01-DFSUC 169+HLENGTH DC Y(HEADERLN) HEADER LENGTH @BIAA4 01-DFSUC 170+HSPACE DC H'0' @BIAA4 01-DFSUC 171+HCODE DC AL1(CAHDRT) REC TYPE CODE @BIMIGSP 01-DFSUC 172+HFLG DC X'00' TYPE OF DATA SET AND ORGANIZATION @BIAA4 01-DFSUC 173+* BIT 5=0 OSAM DATASET * 174+* =1 KSDS DATASET * 175+* BIT 6=0 HS ORGANIZATION * 176+* =1 HD ORGANIZATION * 177+*HKSDS EQU X'04' KSDS SWITCH @BIMIGSP 178+*HHDORG EQU X'02' HD ORGANIZATION SWITCH @BIMIGSP 179+HVERS DC X'00' FLAG FOR IMS RELEASE VERSION @BIDSTSP 01-DFSUC 180+*HREL51 EQU X'00' IMS VERSION 5.1 AND EARLIER @BIMIGSP 181+ DS XL2 ..RESERVED @BIAA4 01-DFSUC 182+HPURGDT DS 0CL7 PURGE DATE-TIME @BIAA4 01-DFSUC 183+HPURDATE DS CL3 PURGE DATE @BIAA4 01-DFSUC 184+HPURTIME DS CL4 PURGE TIME @BIAA4 01-DFSUC 185+ DS 2A ..RESERVED @BIAA4 01-DFSUC 186+HDBID DS 0CL9 DATA BASE FULL I.D. @BIDSTSP 01-DFSUC 187+HDBNAME DS CL8 DATA BASE NAME @BIAA4 01-DFSUC 188+HDSID DS CL1 DATA SET I.D. @BIAA4 01-DFSUC 189+HDATE DS CL3 RUN DATE @BIAA4 01-DFSUC 190+HTIME DS CL4 RUN TIME @BIAA4 01-DFSUC 191+ DS XL4 ..RESERVED @BIAA4 01-DFSUC 192+HEADERLN EQU *-HEADER HEADER LENGTH @BIAA4 01-DFSUC 193+* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 194+* * 195+* DB CHANGE ACCUMULATION HEADER RECORD * 196+* FOR RELEASE 6.1 AND SUBSEQUENT RELEASES * 197+* * 198+* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 199+CUMHDR2 DSECT @BIDSTSP 01-DFSUC 200+HDR DS 0D @BIDSTSP 01-DFSUC 201+HLEN DC Y(HDRLEN) HEADER LENGTH @BIDSTSP 01-DFSUC 202+HSPACEF DC H'0' @BIDSTSP 01-DFSUC 203+HCODEF DC AL1(CAHDRT) REC TYPE CODE @BIMIGSP 01-DFSUC 204+CAHDRT EQU X'25' Change Accumulation Type Code @BIMIGSP 01-DFSUC 205+HFLGG DC X'00' TYPE OF DATA SET AND ORGANIZATION @BIDSTSP 01-DFSUC 206+* BIT 5=0 OSAM DATASET * 207+* =1 KSDS DATASET * 208+* BIT 6=0 HS ORGANIZATION * 209+* =1 HD ORGANIZATION * 210+HKSDS EQU X'04' KSDS SWITCH @BIMIGSP 01-DFSUC 211+HHDORG EQU X'02' HD ORGANIZATION SWITCH @BIMIGSP 01-DFSUC 212+HVERS# DC X'00' COUNTER FOR IMS VERSION NUMBER @BIMIGSP 01-DFSUC 213+HREL51 EQU 0 IMS VERSION 5.1 AND PREVIOUS @BIMIGSP 01-DFSUC 214+HREL52 EQU 1 IMS VERSION 5.2 @BIMIGSP 01-DFSUC Page 7 Stmt Source 215+HREL61 216+HREL71 217+ 218+* 219+HPGTSTMP 220+HDATETME 221+HDATEX 222+HTIMEFLD 223+*HTHHMM 224+*HTSSTH 225+*HTMIJU 226+HTOFFST 227+* 228+HRNTSTMP 229+HRDTTM 230+HRDTE 231+HRTME 232+*HRHHMM 233+*HRSSTH 234+*HRMIJU Statement EQU HREL52 EQU HREL61+0 DS XL1 DS DS DC DC DS DS DS DC DS DS DC DC DS DS DS 0CL12 0CL10 PL4'0' XL6'00' CL2 CL2 CL2 XL2'00' 0CL12 0CL10 PL4'0' XL6'00' CL2 CL2 CL2 HLASM R4.0 2002/06/03 17.11 IMS VERSION 6.1 (WAS 5.2) @BIMIGSP 01-DFSUC IMS VERSION 7.1 SAME AS V6.1 @BIMIGSP 01-DFSUC ..RESERVED @BIDSTSP 01-DFSUC PURGE PURGE YY YY HH MM HH MM SS TH MI JU AQ Q$ DATE - TIME - OFFSET DATE TIME DD DF SS TH MI JU @BIDSTSP @BIDSTSP @BIMIGSP @BIMIGSP @BIMIGSP @BIMIGSP @BIMIGSP @BIDSTSP 01-DFSUC 01-DFSUC 01-DFSUC 01-DFSUC
OFFSET
- TIME -OFFSET @BIDSTSP - TIME @BIDSTSP DF @BIMIGSP - HH MM SS TH MI JU@BIMIGSP @BIMIGSP @BIMIGSP @BIMIGSP
153
235+HROFFST 236+* 237+HDBDBID 238+HDBNME 239+HDSTID 240+* 241+ 242+ 243+HDRLEN 244+* 245
DC DS DC DC DS DS EQU END
AQ Q$ OFFSET DATA BASE FULL I.D. DATA BASE NAME DATA SET I.D. ..RESERVED ..RESERVED LENGTH OF RECORD
@BIMIGSP 01-DFSUC @BIDSTSP 01-DFSUC @BIMIGSP 01-DFSUC @BIMIGSP 01-DFSUC @BIDSTSP 01-DFSUC @BIDSTSP 01-DFSUC @BIDSTSP 01-DFSUC
154
Appendix C.
Additional material
This redbook refers to additional material that can be downloaded from the Internet as described below.
Select the Additional materials and open the directory that corresponds with the redbook form number, SG246837.
This file contains a sample interface routine, $AORS, for usage between ART and IMS/ORS, developed during the residency period. It was coded to provide a way for communicating between ART and ORS. This routine could be augmented to provide some form of automation. There are 9 members in this routine.You need to compile the routine and then execute it as described in 9.5, DRMRECOV and IMS/ORS on page 123.
2 MB minimum
155
156
DB/DC DB2 DB2 PM DBA DBAT DBCTL DBD DBDS DBID DBRC DBRM DCL DDCS DDF DDL DEDB DL/I DLI/SAS DLL DLT DML DNS DRA DRDA DRM DSC DTT EA EBCDIC ECS ECSA EDM EMCS ERP ESA ESAF
database/data communications DATABASE 2 DB2 performance monitor database administrator database access thread database control database descriptor database data set database identifier data base recovery control database request module data control language distributed database connection services distributed data facility data definition language data entry database Data Language/I DL/I separate address space dynamic load library manipulation language database level tracking (RSR) data manipulation language domain name server database resource adapter distributed relational database architecture data recovery manager dynamic statement cache, local or global declared temporary tables extended addressability extended binary coded decimal interchange code enhanced catalog sharing extended common system area environment descriptor management extended multiple consoles support enterprise resource planning Enterprise Systems Architecture external subsystem attach facility
157
ITR
internal throughput rate, a processor time measure, focuses on processor capacity International Technical Support Organization installation verification process installation verification program J2EE Connector Architecture Java 2 Platform, Enterprise Edition Java batch processing region job control language Java Database Connectivity Java Development Kit job entry subsystem (JES2 or JES3) journaled file systems Just in time (Java compiler) Java message processing region Java Native Interface Java Virtual Machine kilobyte (1,024 bytes) key sequenced data set logical control unit Language Environment library look aside load module large object link pack area logical partition logical page list logical record length log record sequence number logical terminal logical unit Logical Unit 2 logical volume manager megabyte (1,048,576 bytes) multiple consoles support message format services modifiable link pack area Multi-Node Persistent Sessions message output descriptor (MFS) module (SMP/E) message processing program message processing region
ITSO IVP IVP J2C J2EE JBP JCL JDBC JDK JES JFS JIT JMP JNI JVM KB KSDS LCU LE LLA LMOD LOB LPA LPAR LPL LRECL LRSN LTERM LU LU2 LVM MB MCS MFS MLPA MNPS MOD MOD MPP MPR
EX FDBR FDT FMID FT FTP GB GBP GRS GSAM GUI HA HALDB HFS HLQ HPJ HTML HTTP I/O IBM ICF ICF ICMF IFCID IFI IFP IMS IPL IPLA IRLM IRWW ISC ISD ISPF ISV
158
MSC MSDB MSM MTO MVS NID NPI NVS ODB ODBA ODBC OLAP OLDS OM ORS OS/390 OSAM OTMA OTMA C/I PAV PCB PDS PDSE PIA PIB PMR PPT PSB PSID PSP PTF PTF PUNC QMF QPP RACF RBA RDM RDS RE RECFM RECON RECP RID
multiple systems coupling Main Storage Data Base Multidimentional Storage Manager master terminal operator Multiple Virtual System network identifier non partitioning index Non Volatile Storage object descriptor in DBD open database access Open Data Base Connectivity Online Analytical Processing online log data set Operations Manager Online Recovery Service Operating System/390 overflow sequential access method open transaction manager access OTMA callable interface Parallel Access Volume program communication block partitioned data set partitioned data set extended package input adapter parallel index build problem management record program properties table program specification block page set identifier preventive service planning program temporary fix program temporary fix possibly uncommitted Query Management Facility Quality Partnership Program Resource Access Control Facility relative byte address recovery data manager restart data set recovery event record format recovery xxxxx recovery pending record identifier
RIM RLDS RLT RM RMF RNR ROT RR RRS RRSAF RS RSM RSR RSU RTS RVA SCI SDK SMIT SQL SVL TCB TMP TSO UR UR USS VIC WAS WLM
related installation material recovery log data set recovery level tracking (RSR) Resource Manager Resource Measurement Facility Rapid Network Recovery rule of thumb repeatable read resource recovery services resource recovery services attach facility read stability Relational Resource Manager Remote Site Recovery recommended service upgrade real time statistics RAMAC Virtual Array structured call interface software developers kit System Management Interface Tool structured query language IBM Silicon Valley Laboratory task control block terminal monitoring program time sharing option unit of recovery uncommitted read Unix System Services Virtual Image Copy WebSphere Application Service workload manager
159
160
Related publications
The publications listed in this section are considered particularly suitable for a more detailed discussion of the topics covered in this redbook.
IBM Redbooks
For information on ordering these publications, see How to get IBM Redbooks on page 162.
DB2 for z/OS DM Tools for Database Administration and Change Management, SG24-6420 A DBA's View of IMS Online Recovery Service, SG24-6112 DB2 for z/OS and OS/390 Data Management Tools Update, SG24-6406 New Tools for DB2 for OS/390 and z/OS Presentation Guide, SG24-6139 DB2 for z/OS and OS/390 Tools for Performance Management, SG24-6508 Ensuring IMS Database Integrity using IMS Tools, SG24-6533
Other resources
These publications are also relevant as further information sources:
IBM Application Recovery Tool for DB2 and IMS Databases Users Guide Version 1 Release 2, SC27-0980-01 IBM Application Recovery Tool for DB2 and IMS Databases Messages and Codes Version 1 Release 2, SC27-1114-01 DB2 UDB for OS/390 and z/OS Version 7 Administration Guide, SC26-9931 DB2 UDB for OS/390 and z/OS Version 7 Utility Guide and Reference, SC26-9945 IMS Version 7 Utilities Reference Database and Transaction Manager, SC26-9440 IMS Version 7 Database Recovery Control Guide and Reference, SC26-9428 IMS Version 7 Command Reference, SC26-9426 IMS Version 7 Installation Volume 2: System Definition and Tailoring, GC26-9430-01 IMS Online Recovery Service for z/OS, GC27-1074
161
You can also download additional materials (code samples or diskette/CD-ROM images) from that site.
162
Index
Symbols
$AORS 124 /DBR 28 /DISplay 44 /RECover 43 COPY2 37
D
Data Management Tools recovery and replication area 62 data sharing 66 Database Recovery Control 35 DB2 Archive Log Compression 64 DB2 Change Accumulation 64 DB2 data recovery basics 4 DB2 DataPropagator 63 DB2 Log Analysis 63 DB2 Object Restore 63 DB2 recovery components 4 DB2 Recovery Expert 64 DB2 recovery methodologies 10 DB2 recovery utility samples 15 DB2 Row Archive Manage 64 DB2.SDSNMACS 57 DBB 27 DBRC 26, 35 DBRC options 35 DCECT for IMS Change Accumulation 151 DEDB 27 DFS2804A 30, 33 DFSBBO00 26 DFSLTMG0 28 DFSMSdfp 10 DFSUCUM0 25 DFSUDMP0 24 DFSUDMT0 24 DFSUICP0 24 DFSURDB0 27, 45 DRMAOP 98 DRMAUTH 68 DRMCA 107 DRMDCHEK 98 DRMDLET1 108 DRMDLET2 91 DRMEXEC 69, 82 DRMFIC 86 DRMFIC Image generation 87 DRMIC 105 DRMIIC 87 DRMINIT 104 DRMJOBCD 74 DRMMAP 96, 111 DRMMAP output 138 DRMMAP sample 138 DRMMDISK 92, 108 DRMMERGE 89 DRMRECOV 97, 112, 119
A
active log 4 sizing 5 AOI 45 ARCHIVE 7 Archive logs 7 ART current parmlib 82 DB2 primary panel 86 DB2 scenarios 99 DB2 utility control 86 execution as a batch job 110 IMS and DB2 primary panel 92 IMS Gen 79 IMS primary panel 108 installation process 68 load modules 69 Primary Panel 74 RECON for IMS and DB2 81 the new release 66 user profile 83 ART and IMS utilities 104 ART verifying the IMS installation 81 ARTand DB2 utilities 86 availability 6
B
backup and recovery strategy 6 backup concept 7 Batch Backout 26 boot strap data set 4 BSDS 4, 12
C
Change Accumulation 25 CHANGE.DSDSGRP 44 CHANGELIMIT 8 Changing data 5 CHECK DATA 8 CLOAD 69 commit preparation 53 commit process 52 concurrent copy 9 concurrent Image Copies in IMS and DB2 116 coordinator 52 COPY1 37
163
invoking the function 120 DRMRROEG 107 DRMVIC 93, 109, 117 DRMXCUST 74 DRMXDB2S 72 DRMXDSGS 73 DRMXIMSS 71 DRMXPROD 69 DRMXRUN 74 DRMXSYSS 71 DRMXTHT 74 DSECT for IMS Image Copy 149, 151 DSN1COPY 10 DSNUM 16 DSPRCR1 dsect 37 dual archive log 7
E
ESDS 4 exclusive mode 28
F
Fast Path 55 sync point 55 FlashCopy 9 FORCER 28, 35 FULL 8 Full copy 136 full Image Copy sample jobs 136
IMS DEDB Fast Recovery 64 IMS HP Change Accumulation 64 IMS Image Copy Extensions 65 IMS Image Copy sample jobs 142 IMS log records x37 57 x56 57 IMS Online Recovery Service 39, 65 IMS recovery sequences 30 IMS recovery variables 30 IMS Type 2 Image Copy sample jobs 143 IMS/ORS and DRMRECOV 123 IMSDSGS 66 IMSVS.SDFSMAC 37, 57 In-abort 56 In-commit 56 INCREMENTAL 8 incremental copy 16 Incremental COPY JCL 136 indexes Image Copy 8 In-doubt 56 In-flight 56 INIT.DSDSGRP 44
K
KSDS 4
L
LIMIT BACKOUT 56 log 56 log protocol 56 LOGONLY option 10
H
HALDB 66 High Used RBA resetting 149
M
MERGECOPY 10, 18 MODIFY 10 MODIFY RECOVERY 15 Must-complete processing 54
I
Image Copies deleting 10 Image copies in IMS and DB2 116 Image Copy 8, 24 image copy failures during recovery 10 options 8 IMS Copy 2 utility 29 Purge 25 RECON data sets 35 recovering DL/I batch update programs 22 recovering online programs 22 the need for recovery 22 IMS Batch Back-out sample jobs 147 IMS Change Accumulation sample jobs 146 IMS Concurrent Image Copy sample jobs 143 IMS Data Propagator 64 IMS data recovery 22 IMS Database Recovery sample jobs 148 IMS database utilities 23
N
new full copy 18 NOFORCER 36 NOTIFY.RECOVER 44
O
ORS 39 operational conditions 42 prerequisites for installation 41 recovery performance 45 ORS administration 43 ORS and IMS shutdown 45 ORS components 41 ORS environment 42 ORS installation 41 ORS program number 39 OSAM 45
164
T
table space backup 11 TO CURRENT 15 TOCOPY 16 TOLOGPOINT 17 TORBA 14 TOVOLUME 13 two phase commit protocol 52
P
participant 52 postponed abort 56 PQ48126 6 PROCOPT=G 36 PURGE 30
Q
QUIESCE 11 quiesce point 15
U
UNDO 26 unit of recovery 52 UQ54646 6 using VIC 111 UTILID 16
R
RCR1COPY 37 RCVTOKEN 47 RECON 35 RECON contents 35 RECON1 37 RECON2 37 RECOVCTL 36 RECOVER 910 RECOVER TOCOPY 13 RECOVER TOLOGPOINT 14 RECOVER TORBA 14 Recovery 27 recovery current 12 partitioned table spaces 15 to a specific point in time 12 recovery and replication 62 recovery data sets 4 recovery scenarios 29 recovery strategy 6 Recovery to a VIC 100 Redbooks Web site 162 Contact us xvii region type 27 REPORT RECOVERY 12 Restrict VIC 93
W
WRITE(YES) 11
X
XRF 42
S
SHARECT 36 SHARECTL 36 SHRLEVEL 8 SHRLEVEL CHANGE 9 SHRLEVEL REFERENCE 8 single incremental 18 SMS classes 7 SnapShot 9 SPARE 37 -STOP DB2 MODE(FORCE) 57 synchronization point 53 SYSIBM.SYSCOPY 4, 8, 1213 SYSIBM.SYSLGRNX 4, 12, 15 SYSLGRNX 5
Index
165
166
Application Recovery Tool for IMS and DB2 Databases A Data Recovery Guide
Back cover
SG24-6837-00
ISBN 0738426369