SG 247606
SG 247606
SG 247606
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
Manage and validate backup and restore system Optimize system and object level restore from volume copies Ensure business continuity with cost-effective recovery
Paolo Bruni Tom Hubbard Rajasekhar Jonnagadla Ravikumar Kalyanasundaram Hennie Mynhardt
ibm.com/redbooks
International Technical Support Organization Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1 June 2008
SG24-7606-00
Note: Before using this information and the product it supports, read the information in Notices on page xv.
First Edition (June 2008) This edition applies to Version 2, Release 1 of IBM DB2 Recovery Expert for z/OS (program number 5697-N92) for use with IBM DB2 for z/OS and OS/390 Version 7 (program number 5675-DB2), DB2 for z/OS Version 8 (program number 5625-DB2), and DB2 Version 9.1 for z/OS (program number 5635-DB2).
Copyright International Business Machines Corporation 2008. 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
Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix Figures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi Notices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv Trademarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvi Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii The team that wrote this book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii Become a published author . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xix Comments welcome. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xix Summary of changes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . June 2008, First Edition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . October 2008, First Update. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . February 2009, Second Update . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxi xxi xxi xxi
Part 1. Architecture and installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Chapter 1. Introduction to DB2 Recovery Expert V2.1 . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.1 Introduction to DB2 Recovery Expert for z/OS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 1.2 What is new in Recovery Expert V2.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.2.1 System Backup and Restore Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 1.2.2 Remote site recovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 1.3 Recovery Expert architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 1.4 GUI and ISPF user interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 1.4.1 DB2 object recovery support. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 1.4.2 Recover groups of objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 1.4.3 Recovering an entire DB2 subsystem. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 1.4.4 DB2 log analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Chapter 2. Installation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.1 Installation requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2 Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.3 Migration from Version 1.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 18 20 32
Chapter 3. Our test environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 3.1 GUI environment configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 3.2 ISPF environment configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 Part 2. Backup and restore services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 Chapter 4. Configuring DB2 for system backup and restore . . . . . . . . . . . . . . . . . . . . 4.1 Suggested data set naming conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.1.1 BSDS and logs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.1.2 DB2 catalog, directory, and user data. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 54 54 54
iii
4.2 Planning for subsystem configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.3 Using the subsystem setup utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.3.1 Defining the new ICF user catalogs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.3.2 Creating the DFSMS copy pools. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.3.3 Renaming and moving the BSDS and log data sets . . . . . . . . . . . . . . . . . . . . . . . 4.3.4 Moving the DB2 table space data sets to new volumes . . . . . . . . . . . . . . . . . . . . 4.3.5 Merging the DB2 table space alias to its new ICF user catalog . . . . . . . . . . . . . . 4.3.6 Optimal subsystem configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.4 Profiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.4.1 Backup profiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.4.2 Object recovery profiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.4.3 Disaster recovery profiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
55 56 63 66 66 74 76 78 80 80 81 81
Chapter 5. Local system level backup and restore . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 5.1 System level backup using DB2 and Recovery Expert GUI to perform the restore . . . 84 5.2 System level backup and restore using Recover Expert ISPF-based System Backup and Restore Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 Chapter 6. Object recovery functions from system level backup. . . . . . . . . . . . . . . . 6.1 Object recovery with Recovery Expert under DB2 V8. . . . . . . . . . . . . . . . . . . . . . . . . 6.1.1 Managing object profiles for recovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6.1.2 Recover object to current using system level backup . . . . . . . . . . . . . . . . . . . . . 6.1.3 Recover object to point in time using system level backup. . . . . . . . . . . . . . . . . 6.1.4 Recovery object to copy (full or incremental copy or quiesce) . . . . . . . . . . . . . . 6.2 Object Recovery using DB2 9 for z/OS system level backup . . . . . . . . . . . . . . . . . . . 6.3 Object recovery with Recovery Expert using system level backup . . . . . . . . . . . . . . . 6.4 PPRC/XRC restriction for using data set level recover from FlashCopy. . . . . . . . . . . 6.5 Optimal recovery action with DB2 Recovery Expert . . . . . . . . . . . . . . . . . . . . . . . . . . 125 126 126 135 138 138 139 143 147 147
Part 3. Managing disaster recovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149 Chapter 7. Traditional image copy recovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.2 Planning for disaster recovery. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.2.1 Dump and restore of DB2 environment. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.2.2 Consistent point-in-time recovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.2.3 Continuous archive log transfer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.3 Preparing for recovery at the local site . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.3.1 Create the disaster recovery profiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.3.2 Create the application recovery jobs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.3.3 Build the disaster recovery profiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.4 Recovery procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.4.1 Establish the environment. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.4.2 Contents of the recovery PDS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.4.3 Run the job in member ssid#JCL1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.4.4 Restart the DB2 subsystems. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.4.5 Run the job in member ssid#JC3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7.5 Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Chapter 8. System level backup based remote recovery . . . . . . . . . . . . . . . . . . . . . . 8.1 Offloading to tape at the local site . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8.1.1 Offloading to tape during a system level backup . . . . . . . . . . . . . . . . . . . . . . . . 8.1.2 Offloading to tape as a separate task . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151 152 153 153 154 154 155 155 158 158 162 162 163 165 169 171 172 173 174 174 179
iv
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
8.2 Building Disaster Recovery JCL at the local site. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184 8.3 Restoring steps at the disaster recovery site . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 193 Part 4. Appendixes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 197 Appendix A. Frequently asked questions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199 Appendix B. Recommended maintenance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207 Appendix C. Storage and DB2 functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . FlashCopy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Introducing FlashCopy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . How FlashCopy works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . DFSMSdss utility. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Incremental FlashCopy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . FlashCopy consistency group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . DFSMS functions for DB2 point in time recovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . DFSMShsm Fast Replication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Preparing for DFSMShsm Fast Replication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . DB2 BACKUP and RESTORE functions in V8 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . DB2 PITR using Fast Replication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . DB2 Restore using Fast Replication backups. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . BACKUP and RESTORE enhancements with DB2 9 for z/OS . . . . . . . . . . . . . . . . . . . . . Object-level recovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Tape support for BACKUP SYSTEM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Incremental FlashCopy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . RECOVER utility enhancements for point-in-time recovery . . . . . . . . . . . . . . . . . . . . . Appendix D. Contents of schema level repository . . . . . . . . . . . . . . . . . . . . . . . . . . . Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . SLR tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . SLR maintenance considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Appendix E. Sample jobs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Control statement listings for Recovery Expert Agents 63 and 67 . . . . . . . . . . . . . . . . . . . Configuration files for Recovery Expert Agent 59 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Control file job listing for Recovery Expert Agent 63 and 64 . . . . . . . . . . . . . . . . . . . . . . . Sample job to create the repository VSAM data sets. . . . . . . . . . . . . . . . . . . . . . . . . . . . . Sample job to create DR objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Sample CLISTs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Sample PARMLIB member . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Related publications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . IBM Redbooks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Other publications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Online resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . How to get Redbooks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Help from IBM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 209 210 210 211 214 218 219 221 221 224 224 227 234 238 239 241 243 245 247 248 250 253 263 264 278 286 293 301 303 306 311 311 311 311 312 312
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313
Contents
vi
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
Tables
1-1 2-1 2-2 2-3 2-4 2-5 3-1 3-2 5-1 7-1 8-1 A-1 B-1 B-2 C-1 C-2 D-1 Comparison of functions available through the GUI and the ISPF interface. . . . . . . . . 12 Steps for installing Recovery Expert V2.1 - complete install. . . . . . . . . . . . . . . . . . . . . 21 Mapping of data set names used in ARYSJ001 to DD name in ARYV210 CLISTs . . . 25 ARYV210 CLIST . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 RACF profile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 Steps for migration from Recovery Expert V1.1 to V2.1 . . . . . . . . . . . . . . . . . . . . . . . . 33 Repositories and corresponding VSAM data sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 SBRS DB2 DR objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48 Comparing Recovery Expert GUI and ISPF system level backup and recovery . . . . 122 Summary of recovery steps to rebuild the subsystem at the remote site . . . . . . . . . . 163 Summary of steps built in the job to RESTORE the subsystem at the remote site. . . 191 Application development frequently asked questions. . . . . . . . . . . . . . . . . . . . . . . . . 200 Recovery Expert V2.1 current APARs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207 DB2 Backup and Restore current APARs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208 The DB2 token . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225 DB2 token contents breakout of Example C-4 output listing . . . . . . . . . . . . . . . . . . . 225 SLR tables in comparison with DB2 catalog tables . . . . . . . . . . . . . . . . . . . . . . . . . . 251
vii
viii
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
Examples
2-1 Sample SYSIN card for ARYSJ001 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 2-2 Sample configuration file for the IBM DB2 Recovery Expert for z/OS 2.1.0 Agent . . . . 27 2-3 Sample configuration file for the IBM DB2 Recovery Expert or z/OS 2.1.0 server . . . . 28 3-1 Snippets from server configuration file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 3-2 Snippets of Recovery Expert Agent 53 agent configuration file on LPAR SC53. . . . . . 41 3-3 Snippets of Recovery Expert Agent 67 agent configuration file on LPAR SC67. . . . . . 41 3-4 Snippets of Recovery Expert Agent 59 agent configuration file . . . . . . . . . . . . . . . . . . 43 3-5 Snippets of the Recovery Expert Agent 63 configuration file . . . . . . . . . . . . . . . . . . . . 43 3-6 Snippets of the Recovery Expert Agent 64 configuration file . . . . . . . . . . . . . . . . . . . . 44 4-1 JCL and control cards to merge catalog alias . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 5-1 BACKUP SYSTEM JCL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 5-2 FAST REPLICATION output in DFSMShsm for the DB COPYPOOL . . . . . . . . . . . . . 85 5-3 FAST REPLICATION output in DFSMShsm for the LOG COPYPOOL . . . . . . . . . . . . 86 5-4 BSDS BACKUP SYSTEM UTILITY HISTORY output from DSNJU004 . . . . . . . . . . . . 90 5-5 DSNJU003 - Recovery Expert JOB1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94 5-6 Output of JOB1 - create a conditional restart control record in the BSDS . . . . . . . . . 95 5-7 Displaying the XCF structures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 5-8 Deleting the lock structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 5-9 Deleting the SCA structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 5-10 Display to verify delete . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 5-11 Acknowledgement of the restart record truncation . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 5-12 DB2 restarted with ACCESS(MAINT) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 5-13 The SCA structure being rebuild . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97 5-14 Closing the ICF catalogs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97 5-15 Unallocating the ICF catalogs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 5-16 Example of the RESTORE SYSTEM job . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 5-17 Recovery messages in DFSMShsm log . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 5-18 Output of backup JCL with SETUP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111 5-19 Output of Recovery Expert generated system level backup . . . . . . . . . . . . . . . . . . . 112 5-20 DSNJU004 Output - BACKUP SYSTEM UTILITY HISTORY - showing the backup entry . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116 6-1 SMS output on successful system level backup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140 6-2 Output from a DB2 RECOVER utility that selects FLASHCOPY as input. . . . . . . . . . 140 6-3 DFSHSsms output - RECOVER TS with 5 data sets selecting FlashCopy backup . . 141 6-4 Job steps created by Recovery Expert for object recovery. . . . . . . . . . . . . . . . . . . . . 143 8-1 Example of an offload to tape . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183 8-2 Output from the system backup offload job run at the local site . . . . . . . . . . . . . . . . . 193 8-3 Output from the step to restore the volumes backups from tape . . . . . . . . . . . . . . . . 193 8-4 Output from the deleting the BSDS and log data sets . . . . . . . . . . . . . . . . . . . . . . . . 194 8-5 Output of defining the active logs and BSDS data sets . . . . . . . . . . . . . . . . . . . . . . . 194 8-6 IDCAMS REPRO output for the restore of the BSDS . . . . . . . . . . . . . . . . . . . . . . . . . 195 8-7 Conditional restart record creation output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195 8-8 Replying to CRCR outstanding message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196 C-1 DFSMSdss COPY FULL with COPYVOLID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215 C-2 Backup-restore cycle with DUMPCONDITIONING and background copy . . . . . . . . . 216 C-3 Backup to tape with no-background copy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217 C-4 DFSMShsm LIST command output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225 C-5 DSNJU004 output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226
ix
C-6 Invoking DFSMShsm replication with DB2 utility . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230 C-7 Invoking DFSMShsm Fast Replication with DB2 utility (DATA ONLY option) . . . . . . 231 C-8 DFSMShsm LIST command and output on DSN$DB8A$DB copy pool . . . . . . . . . . 231 C-9 DFSMShsm LIST command and output on DSN$DB8A$LG copy pool. . . . . . . . . . . 231 C-10 DB2 backup system full . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232 C-11 FRBACKUP output in syslog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232 C-12 FRBACKUP output in DFSMShsm backup log data set. . . . . . . . . . . . . . . . . . . . . . 233 C-13 Sample JCL of RESTORE SYSTEM utility. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 236 C-14 Sample JCL of RESTORE SYSTEM with LOGONLY option . . . . . . . . . . . . . . . . . 236 C-15 RESTORE SYSTEM utility output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237 C-16 FRRECOVER messages in DFSMShsm log . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238 D-1 When delete authority is removed for objects in DB2 for z/OS . . . . . . . . . . . . . . . . . 254 D-2 When image copies are deleted for objects in DB2 for z/OS . . . . . . . . . . . . . . . . . . . 255 D-3 When objects are dropped in DB2 for z/OS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255 D-4 When quiet time details are removed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257 D-5 When stogroup or volume changes occur in DB2 for z/OS . . . . . . . . . . . . . . . . . . . . 257 D-6 Deleting rows in SLR table SRYVRLOG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258 D-7 Deleting rows in ARYAUXRELS SLR table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258 D-8 Deleting rows in ARYDATATYPES, ARYPARMS, ARYROUTINES, ARYVIEWSR SLR tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258 D-9 Deleting row in ARYFIELDS SLR table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259 D-10 Deleting DBRM, PLAN, and PACKAGES information in SLR tables . . . . . . . . . . . . 259 D-11 Deleting referential constraint information in SLR tables . . . . . . . . . . . . . . . . . . . . . 260 D-12 Deleting specifications in SLR tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261 E-1 Control statements for DB2 subsystem D8F1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264 E-2 Control statement listing for DB2 subsystem D8F2 . . . . . . . . . . . . . . . . . . . . . . . . . . 267 E-3 Control statement listing for DB2 subsystem D8G1 . . . . . . . . . . . . . . . . . . . . . . . . . . 271 E-4 Control statement listing for DB2 subsystem D8G2 . . . . . . . . . . . . . . . . . . . . . . . . . . 275 E-5 Control statement listing for DB2 subsystem DB8A . . . . . . . . . . . . . . . . . . . . . . . . . . 279 E-6 Control statement listing for DB2 subsystem DB8W . . . . . . . . . . . . . . . . . . . . . . . . . 282 E-7 Control statement listing for DB2 subsystem D9C1 . . . . . . . . . . . . . . . . . . . . . . . . . . 286 E-8 Control statement listing for DB2 subsystem D9C2 . . . . . . . . . . . . . . . . . . . . . . . . . . 290 E-9 JCL to create repository VSAM data sets. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294 E-10 JCL to create mover repository . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299 E-11 JCL to create VSAM data set to capture RBA information . . . . . . . . . . . . . . . . . . . . 299 E-12 Sample proc for the RBA capture utility started task . . . . . . . . . . . . . . . . . . . . . . . . 300 E-13 Sample job to create GDG bases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300 E-14 Sample JCL to create DR objects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301 E-15 ARYV21 CLIST. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 303 E-16 ARYV210 CLIST. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 304 E-17 ARYVTSOC CLIST. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306 E-18 ARYCAPS CLIST . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306 E-19 ARY#PARM parmlib member . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
Figures
1-1 IBM DB2 Recovery Expert for z/OS Client Server architecture . . . . . . . . . . . . . . . . . . . 9 1-2 DB2 Recovery Expert Architecture for z/OS - single LPAR . . . . . . . . . . . . . . . . . . . . . 10 1-3 IBM DB2 Recovery Expert for z/OS architecture - multiple LPARs . . . . . . . . . . . . . . . 11 3-1 Sample Recovery Expert configuration describing GUI components . . . . . . . . . . . . . . 40 3-2 Snippets of the shared Recovery Expert control file setup job for Agents 53 and 67 . . 42 3-3 Recovery Expert product control file setup job for Agent 59 . . . . . . . . . . . . . . . . . . . . . 43 3-4 Recovery Expert product control file setup job for Agents 63 and 64 . . . . . . . . . . . . . . 44 3-5 Recovery Expert configuration used in the user scenarios for ISPF services. . . . . . . . 46 4-1 Copy pool layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 4-2 Subsystem setup - user catalogs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 4-3 Usercat Alias List Display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 4-4 Subsystem setup - storage copy pools and boot strap data sets . . . . . . . . . . . . . . . . . 59 4-5 Subsystem setup - active log data sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 4-6 Subsystem setup - aliases and volumes in use . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 4-7 Using Subsystem setup to create new ICF user catalogs. . . . . . . . . . . . . . . . . . . . . . . 63 4-8 Update User Catalog Information - logs catalog . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64 4-9 IDCAMS interface module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 4-10 Update User Catalog Information - data catalog. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 4-11 Rename BSDS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 4-12 Boot Strap Data Set Rename . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 4-13 IDCAMS Interface Module - BSDS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 4-14 Rename active log data sets. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 4-15 Active Log Data Set Rename . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 4-16 IDCAMS Interface Module - active logs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 4-17 Subsystem information after BSDS and log renames. . . . . . . . . . . . . . . . . . . . . . . . . 73 4-18 Moving all data sets on a volume . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 4-19 DB2 data set move . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 4-20 Moving a catalog alias . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76 4-21 Enter jobholder information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76 4-22 Subsystem configuration completed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79 5-1 Recovery launchpad - recovery function. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 87 5-2 Recovery selection hierarchy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 5-3 Recovery selection - DB2 subsystem level . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 5-4 Point-in-time selection - using explicit function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90 5-5 Time stamp selection for RESTORE SYSTEM. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91 5-6 Recovery plans generation panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 5-7 View generated JCL before exporting to a z/OS file . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 5-8 Export window to send JCL to z/OS PDS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 5-9 Recovery Expert main menu. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 101 5-10 Creating a backup and restore profile for a DB2 system level backup and restore . 102 5-11 Updating the backup and restore profile values . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103 5-12 Subsystem setup - screen 1 of 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 104 5-13 Subsystem setup - screen 2 of 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 5-14 Subsystem setup - screen 3 of 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105 5-15 Subsystem setup - screen 4 of 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106 5-16 Creating a backup profile for DB2 D9C1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 5-17 Creating a backup profile - enter your values . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 5-18 Backup profile detail window. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
xi
5-19 Results from saving your newly created profile. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109 5-20 Using backup profile to build JCL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109 5-21 Building backup job - specify JOB card and data set name that will contain JCL. . . 110 5-22 Generated backup JCL - with SETUP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111 5-23 Selecting the system restore option to build RESTORE SYSTEM JCL . . . . . . . . . . 114 5-24 High-level view of the system level backup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114 5-25 Viewing the detailed backup system report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115 5-26 Selecting the system level backup for recovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116 5-27 Selection choice for the recovery . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117 5-28 JCL generation window with data set name and members for restore system jobs . 117 5-29 Conditional restart control record create for each DB2 member. . . . . . . . . . . . . . . . 118 5-30 Recovery Expert system level restore JCL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119 5-31 Recovery Expert RESTORE SYSTEM LOGONLY JCL . . . . . . . . . . . . . . . . . . . . . . 120 6-1 Objects profile name search . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126 6-2 Objects Profile Display window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127 6-3 Objects profile name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127 6-4 Add Objects to the Object Profile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128 6-5 Enter recovery object (database or table space) name . . . . . . . . . . . . . . . . . . . . . . . 128 6-6 Enter recovery object (Indexes) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128 6-7 Recovery object (database or table space) name for DB2 9 for z/OS . . . . . . . . . . . . 129 6-8 Tablespace selection window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129 6-9 Object Queue message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130 6-10 Update Object Profile Display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130 6-11 Profile update confirmation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130 6-12 Update Objects Profile Display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132 6-13 Update recovery options through Update Object Profile Display . . . . . . . . . . . . . . . 132 6-14 Build recovery job selection from Objects Profile Display . . . . . . . . . . . . . . . . . . . . . 133 6-15 Build object recovery job . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133 6-16 Object Recovery Options for recover to current . . . . . . . . . . . . . . . . . . . . . . . . . . . . 135 6-17 Partial recovery message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136 6-18 Object Recovery Options panel DB2 9 for z/OS . . . . . . . . . . . . . . . . . . . . . . . . . . . . 137 6-19 Object Recovery Options for recover to RBA/LRSN . . . . . . . . . . . . . . . . . . . . . . . . . 138 6-20 Object recovery options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139 6-21 Object recovery - scenario 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147 6-22 Object recovery - scenario 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148 7-1 Dump and restore of DB2 environment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152 7-2 A daily business approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 153 7-3 Primary DR profile detailed definition window. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157 7-4 Secondary DR profile detailed definition window . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158 7-5 Disaster recovery job that builds DR JCL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 160 7-6 Syntax of the step that builds the DR JCL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 161 7-7 The first step of DR job, ssid#JC1, and example of ssidDELC input . . . . . . . . . . . . . 165 7-8 The second step of DR job, ssid#JC1, to allocate the DB2 data sets. . . . . . . . . . . . . 166 7-9 The third step of the ssid#JC1 DR job - recover . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167 7-10 Fourth step of ssid#JC1 job - rebuild the BSDS . . . . . . . . . . . . . . . . . . . . . . . . . . . . 167 7-11 The fifth step uses REPRO to update the BSDS with the information from the previous step. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 168 7-12 The sixth step creates the CRCR record for DB2 to restart properly for recovery . . 168 7-13 The seventh step prints the BSDS information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169 7-14 The last step of job ssid#JC1 copies the archives logs from tape to DASD . . . . . . . 169 7-15 The second DR job, xxxx$JC1, is optional . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 170 7-16 DR Job xxx#JC3 recovers DB2 data sets in the proper order . . . . . . . . . . . . . . . . . 171 8-1 Tape dump . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174 xii
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
8-2 Selecting a backup profile for update . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175 8-3 Selecting the offload options to update the backup profile . . . . . . . . . . . . . . . . . . . . . 175 8-4 Offload copy selection. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176 8-5 Offload options specification for the LP and RP copies . . . . . . . . . . . . . . . . . . . . . . . 177 8-6 Offload options specifications for the local copy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177 8-7 Updating the output naming convention for the offload . . . . . . . . . . . . . . . . . . . . . . . 178 8-8 Additional OFFLOAD step as part of system level backup . . . . . . . . . . . . . . . . . . . . . 179 8-9 Selection options for an offload - R . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180 8-10 Selecting a valid recovery point for an offload - view details. . . . . . . . . . . . . . . . . . . 181 8-11 Example of the view report output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182 8-12 Window to specify JOBCARD information and output data set name for offload JCL 183 8-13 Offload JCL example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183 8-14 Recovery Expert main menu - using option D to create a disaster recovery profile . 185 8-15 Disaster Recovery Profile detailed definition window . . . . . . . . . . . . . . . . . . . . . . . . 186 8-16 Build disaster recovery job window - options for JOBCARD and JCL placement. . . 187 8-17 Building the disaster recovery JCL - actual DR JCL JOBVCARD and placement options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187 8-18 First step of batch JOB that will build the disaster recovery JCL . . . . . . . . . . . . . . . 188 8-19 The second step of the batch job that builds disaster recovery JCL. . . . . . . . . . . . . 189 C-1 FlashCopy with background copy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212 C-2 DFSMSdss COPY with COPYVOLID. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215 C-3 DFSMSdss COPY with DUMPCONDITIONING. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 216 C-4 Incremental FlashCopy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219 C-5 FlashCopy consistency group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220 C-6 Copy pool structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223 C-7 BACKUP SYSTEM utility execution for DSNDB0G . . . . . . . . . . . . . . . . . . . . . . . . . . 229 C-8 Two BACKUP SYSTEM FULL, and one DATA ONLY are taken . . . . . . . . . . . . . . . . 230 C-9 Recovering to an arbitrary point in time using the RESTORE SYSTEM utility. . . . . . 236 C-10 Panel: DSNTIP6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240 C-11 BACKUP SYSTEM syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241 C-12 RESTORE SYSTEM syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243 C-13 Incremental FlashCopy with single version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244 C-14 Incremental FlashCopy with two versions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244 D-1 Object definition level entries in the SLR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249 D-2 SLR table details for quiet times. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250 D-3 Quiet times . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250
Figures
xiii
xiv
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
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 about 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 illustrate 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.
xv
Trademarks
IBM, the IBM logo, and ibm.com are trademarks or registered trademarks of International Business Machines Corporation in the United States, other countries, or both. These and other IBM trademarked terms are marked on their first occurrence in this information with the appropriate symbol ( or ), indicating US registered or common law trademarks owned by IBM at the time this information was published. Such trademarks may also be registered or common law trademarks in other countries. A current list of IBM trademarks is available on the Web at http://www.ibm.com/legal/copytrade.shtml The following terms are trademarks of the International Business Machines Corporation in the United States, other countries, or both:
CICS DB2 DFSMS DFSMSdfp DFSMSdss DFSMShsm Enterprise Storage Server eServer FlashCopy IBM IMS Language Environment MVS OS/390 RACF Redbooks Redbooks (logo) RETAIN TDMF TotalStorage z/OS zSeries
The following terms are trademarks of other companies: SAP R/3, SAP, and SAP logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries. Microsoft, Windows Server, Windows Vista, Windows, and the Windows logo are trademarks of Microsoft Corporation in the United States, other countries, or both. UNIX is a registered trademark of The Open Group in the United States and other countries.
Other company, product, or service names may be trademarks or service marks of others.
xvi
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
Preface
IBM DB2 Recovery Expert manages the recovery of DB2 for z/OS V8 and V9 objects in a data sharing and non-data sharing environment. The major focus of IBM DB2 Recovery Expert V2.1 for z/OS (5697-N92) is on DB2 system level backup and restore. The tool provides the ability to create a consistent full-system backup with no impact on DB2 availability, comprehensive backup and recovery reporting capabilities, and robust database and storage validity checking to ensure successful creation and usage of database system backups. By integrating with disk storage functions, it supports DB2 subsystem recovery from system backup, DB2 subsystem disaster recovery, and DB2 object data recovery from system backups. It also helps in selecting the most convenient recovery solution and in managing backups. This IBM Redbooks publication documents how to use Recovery Expert V2.1 for all restore and recovery functions related to system level backup. For scenarios on using Recovery Expert functions when recovering DB2 objects from traditional image copies, see the previous companion IBM Redbooks publication DB2 Recovery Expert for z/OS User Scenarios, SG24-7226.
xvii
The authors from left to right: Tom, Paolo, Hennie, Ravi, and Raj
Thanks to the following people for their contributions to this project: Rich Conway Bob Haimowitz Emma Jacobs Deanna Polm Sangam Racherla International Technical Support Organization Johannes Schuetzner IBM Germany Bill Franklin June Kin Mary Petras Haakon Roberts Judy Ruby-Brown Dave Schwartz Jack Shedden Jim Teng IBM Silicon Valley Lab Pierluigi Buratti IBM Italy xviii
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
Paul Barthoff Bob Bersano Mary Jo Haile John Pittman Mark Wallace Shwan Wikle Tim Willging Barry Davis Rocket Software Thanks to the authors of the previous book on this topic, DB2 Recovery Expert for z/OS User Scenarios, SG24-7226: Nagraj Alur Hennie Mynhardt Gregg Palmer Alicia Wangelien
Comments welcome
Your comments are important to us! We want our books to be as helpful as possible. Send us your comments about this book or other IBM Redbooks in one of the following ways: Use the online Contact us review Redbooks form found at: ibm.com/redbooks Send your comments in an e-mail to: [email protected] Mail your comments to: IBM Corporation, International Technical Support Organization Dept. HYTD Mail Station P099 2455 South Road Poughkeepsie, NY 12601-5400
Preface
xix
xx
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
Summary of changes
This section describes the technical changes made in this edition of the book and in previous editions. This edition may also include minor corrections and editorial changes that are not identified. Summary of Changes for SG24-7606-00 for Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1 as created or updated on February 20, 2009.
Changed information
Deleted one incorrect row from Table 1-1 on page 12.
Changed information
Corrected Figure 4-1 on page 55.
xxi
xxii
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
Part 1
Part
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
Chapter 1.
The functions in italic are two new major enhancements with DB2 Recovery Expert V2.1 and are described in detail in this book. For the other functions, see DB2 Recovery Expert for z/OS User Scenarios, SG24-7226.
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
To summarize, the main features of IBM DB2 Recovery Expert for z/OS include: Windows-based simple, easy-to-use GUI with menus that make recoveries to a point in time current, quick, and precise. ISPF-based interface to assist with DB2 subsystem preparation and management of the backup processes. Multiple options for recovery and recommendations about the least expensive option for a given situation (but leaves the decision to you to choose the most appropriate option for your situation). Schema level repository (SLR) that inspects version levels available for restoration. This includes related dependent objects even if they no longer exist in the DB2 system catalog. Backup and restore services component for creating and managing system level backups. Support for the RESTORE SYSTEM utility of DB2 for z/OS Version 8 and later. Support for restoring individual objects from system level backups in DB2 Version 7 and later. Object profiles developed with any version of IBM DB2 Automation Tool that you can use to recover a set of objects from the GUI. Log analysis function that helps you to determine quiet times to ensure that recovered objects to that time do not have any activity occurring against them. Supports non-data sharing and data sharing environments. Supports DB2 for z/OS Version 7, DB2 for z/OS Version 8 (CM, ENFM, and NFM), and DB2 Version 9 (CM, ENFM, NFM). Support for remote site recovery. For further information about the functions and constraints, see DB2 Recovery Expert for z/OS Users Guide Version 2 Release 1, SC19-1222, and the Web site: http://www.ibm.com/software/data/db2imstools/db2tools/db2re-zos/
backups created by System Backup and Restore Services is maintained by DB2 Recovery Expert for z/OS. System Backup and Restore Services also offers functionality equivalent to DB2 V8 SYSTEM BACKUP and RESTORE. System Backup and Restore Services can create system level backups using a variety of techniques enabled by specific hardware and software. Supported options are: DB2 BACKUP SYSTEM utility Native FlashCopy support EMC TimeFinder/Snap EMC TimeFinder/Mirror The backups created by System Backup and Restore Services can be used to restore a complete subsystem, an individual object, or a group of related objects. The restore of individual objects emulates in DB2 V7 and later the functionality provided by the DB2 RESTORE SYSTEM utility in DB2 9 for z/OS. The restore process can be managed using the DB2 Recovery Expert for z/OS GUI interface or the new ISPF user interface. System Backup and Restore Services is designed to be simple to use, offering the following features: Employs backup profiles that define and maintain specific settings for backups. Easy setup and management of backup profiles using an ISPF interface. Finds all volumes in use by the DB2 subsystem by entering the VOLUME primary command. Can easily assign a range of target units to source volumes using the TARGET primary command. If log backup is desired, ensures all log volumes are included. Allows optional recovery of the log volumes. When restoring a subsystem, you can see all the valid backups available using the ISPF interface. Automates offloading backups and recalling the backups during restoration. For data sharing subsystems, you can enter a subsystem to restore and a time stamp. System Backup and Restore Services will select the appropriate backup to use. An optional RBA capture utility can track RBAs and their associated time stamps. If you need to restore the subsystem, you can use this information to identify the RBA/LRSN to which to restore. All restore subsystem JCL is generated and contains instructions on what needs to be done to restore the subsystem. Provides both detail and summary reporting with every backup and restore. These reports are also viewable via the ISPF interface. If you specify to enable object recovery when the backup profile is built, you can later restore individual objects from the backup. Comprehensive validity checking: Ensures that user catalogs are included in the backup, thereby ensuring integrity of the restoration. Optionally checks to ensure that all volumes containing DB2 table space or index space data sets are included in the backup.
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
Optionally, checks to ensure that all volumes containing DB2 active log or BSDS data sets are included in the backup. Makes sure that all source and target volumes are valid. Makes sure that the source volumes are online and available for backup. Ensures that the target volumes for a backup are not in use by another backup profile. Validates that the target volumes have been properly configured and are available for the backup. Validates that the paired source and target volumes are the same device type and reside on appropriate fast replication hardware. Validates that log and object data are on separate volumes. If they are not, a backup is still allowed, but System Backup and Restore Services will issue warnings, and you can only back up and restore the full subsystem (both logs and data). Validates that DB2 log data sets and object data sets are cataloged in separate user catalogs. If they are not, a backup is still allowed, but System Backup and Restore Services will issue warnings, and you can only back up and restore the full subsystem (both logs and data). Ensures that the System Backup and Restore Services component control information resides on a separate device from volumes being backed up. The control information is backed up in its own process. When a volume is used in a restore process, the contents of the volume are validated to insure that there have not been any changes to the backup volume after it was created.
must run at least one instance of the server to manage all of your DB2 subsystems and data sharing groups and to support all of your DB2 Recovery Expert for z/OS user clients. Using TCP/IP connections, the DB2 Recovery Expert for z/OS server, clients, and agents communicate with each other to perform the recovery functions. Recovery Expert for z/OS agent The DB2 Recovery Expert for z/OS agent provides access to database and system services, in support of the DB2 Recovery Expert for z/OS server and remote clients. You must run one instance of the agent on every system or logical partition (LPAR) that hosts DB2 subsystems or data sharing groups that you want to access with DB2 Recovery Expert for z/OS. Each agent communicates with the DB2 Recovery Expert for z/OS server to provide services. Recovery Expert for z/OS GUI client This is a Windows-based simple, easy-to-use GUI with menus that make recoveries to a point in time current, quick, and precise. DB2 Recovery Expert for z/OS ISPF Interface An easy-to-use ISPF interface is provided to assist you with setting the options used when creating and using system level backups managed by DB2 Recovery Expert for z/OS. Schema-level repository IBM DB2 Recovery Expert for z/OS captures DB2 system catalog information and stores it in a set of DB2 tables referred to as the schema level repository (SLR). The schema level repository is an archive to hold object definitions and alterations to object definitions. The sample library member ARYSJ002 contains JCL to update the schema level repository. The initial run of job ARYSJ002 might take multiple hours to copy the contents of the DB2 system catalog. Run times vary depending on the DB2 system catalog size. You must run the schema level repository update job at least daily. If important application object definition updates are performed, then run the schema level repository update after the object definition updates A detailed description of the schema level repository is available in Appendix D, Contents of schema level repository on page 247. System Backup and Restore Services VSAM repository The System Backup and Restore Services component of DB2 Recovery Expert for z/OS uses a set of VSAM files to store information necessary for tracking information related to system level backups and DB2 subsystem definitions. This repository can optionally be automatically backed-up any time that a system level backup is created by DB2 Recovery Expert for z/OS.
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
Figure 1-1 shows the client/server nature of the architecture of IBM DB2 Recovery Expert for z/OS. A single instance of IBM DB2 Recovery Expert for z/OS can manage one or more DB2 subsystems located on one or more machines or sysplexes that might be geographically distributed. Note: If you change the name of the product libraries from the default names, you must substitute the appropriate names that are used in your installation.
DB2 DB2
Recovery Expert Agent
DB2 DB2
DB2 DB2
Recovery Expert Agent
z/OS
z/OS
z/OS
Figure 1-1 IBM DB2 Recovery Expert for z/OS Client Server architecture
Figure 1-2 shows the architecture in a single LPAR implementation. This diagram is included as a base to clarify the components. The new components introduced in DB2 Recovery Expert for z/OS V2.1 are included in this diagram. Those components are: System Backup and Recovery Services (SBRS) CLIST SBRS repository SBRS disaster recovery (DR) objects
Workstation
SBRS CLIST
RE SERVER
RE AGENT
DB2
Figure 1-2 DB2 Recovery Expert Architecture for z/OS - single LPAR
10
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
The diagram in Figure 1-3 represents the architecture of a multi-LPAR implementation of DB2 Recovery Expert for z/OS. The implementation in Figure 1-3 is the same as previously shown in Figure 1-1 on page 9 with the addition of the components new to Version 2.1. The main new components introduced in Version 2.1 are the ISPF interface and additional repository components.
TSO z/OS
Windows
SBRS
RE SERVER
RE AGENT
DB2
DB2
RE AGENT
DB2
RE AGENT
z/OS
z/OS
z/OS
Figure 1-3 IBM DB2 Recovery Expert for z/OS architecture - multiple LPARs
Note: The product control file actually should be shared by all agents and the System Backup and Restore Services (SBRS) component. The entries in the file are common to the agent and SBRS. Therefore, a common file will eliminate the need to try and keep multiple files synchronized. Setup and initialization of the control file are described in detail in Step 7 - Create the Recovery Expert control file on page 24, and Step 8 - Configure the Recovery Expert product control file on page 24.
11
The possible configurations at installation time are: GUI only ISPF only GUI and ISPF Since no one user interface supports all of the functionality provided by DB2 Recovery Expert for z/OS, you should configure both GUI and ISPF interfaces, and use the more appropriate user interface, as shown in Table 1-1.
Table 1-1 Comparison of functions available through the GUI and the ISPF interface Function Database/table space object recovery. Option To current. To LRSN/RBA or Quiesce point. To Copy (last full, last incremental, specific copy). From Recovery Expert created system level backup. To prior version with DDL. Table recovery. To current. To LRSN/RBA or Quiesce point. To Copy (last full, last incremental, specific copy). To prior version with DDL. Dropped object recovery. To current. To LRSN/RBA or Quiesce point. To Copy (last full, last incremental, specific copy). To prior version with DDL. Recover groups of objects. Based on referential integrity groups. Based on DB2 Automation Tool object profiles. Based on Recovery Expert object recovery profiles. Recover entire DB2 subsystem. Identify quiet times in the DB2 log. Manage DB2 disaster recovery. Create system level backups. Create JCL for jobs necessary to recover a DB2 subsystem at a remote location. Generate JCL needed to generate Recovery Expert Managed system level backups. From Recovery Expert created system level backup. From DB2 created system level backup. Xb X X X GUI X X X Xa X X X X X X X X X X X X X ISPF X X X X
a. Must be using Recovery Expert System Backup and Restore Services - UPDATE IPC IPC_RBR must be set to Y. b. Must be DB2 V8 and not using Recovery Expert system backup and restore service.
Table 1-1 shows the major functions supported by DB2 Recovery Expert for z/OS and indicates the user interfaces that allow you to use the function.
12
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
The GUI user interface was implemented in DB2 Recovery Expert for z/OS V1.1. This interface remains the most function-rich interface available with DB2 Recovery Expert for z/OS. We recommend that both the GUI and ISPF be installed, but in general, the GUI user interface should always be installed and used as the primary user interface since a more limited number of functions require the ISPF user interface. In order to better explain the contents of Table 1-1 on page 12 we now examine four groups of tools basic functions and explain which user interface should be used for each function: DB2 object recovery support Recover groups of objects Recovering an entire DB2 subsystem DB2 log analysis
Notes: The user of the GUI can use the recovery option recommended by DB2 Recovery Expert for z/OS or choose any other plan from the available list of recovery plans. Recovery of individual tables is only available using the GUI. Recovery of dropped objects is only available using the GUI. The GUI interface introduced in DB2 Recovery Expert for z/OS v1.1 is described in detail in DB2 Recovery Expert for z/OS User Scenarios, SC24-7226.
13
The ISPF interface selects the appropriate recovery based on your input and generates the appropriate JCL to execute the recovery using either image copies or a system level backup for the recovery. Note: The user of the ISPF interface is not presented with any additional recovery options that may be available based on the recovery assets in the system. Details of object recovery using the ISPF user interface provided with DB2 Recovery Expert for z/OS are discussed in 6.1, Object recovery with Recovery Expert under DB2 V8 on page 126.
Grouping objects using DB2 Recovery Expert for z/OS object recovery profiles
Object recovery profiles can be created using the System Backup and Restore Services component of DB2 Recovery Expert for z/OS. These profiles are used to group objects together for a single recovery. Common recovery options are also specified in the object recovery profile so that the same recovery options are used for all objects included in the object recovery profile.
14
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
Note: Either the GUI or the ISPF interface can use backups created by the DB2 BACKUP SYSTEM utility when the utility is invoked using DB2 Recovery Expert for z/OS.
15
16
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
Chapter 2.
Installation
In this chapter we describe the required steps to install Recovery Expert. We describe what to do for a new installation of DB2 Recovery Expert for z/OS and for a migration of DB2 Recovery Expert for z/OS from V1.1 to V2.1.
This chapter contains the following sections:
17
DB2 utilities The DB2 utilities that are used by DB2 Recovery Expert require execution under TSO/E. Refer to the DB2 Version 7, DB2 Version 8, and DB2 Version 9 product support information for information regarding TSO/E support levels. FlashCopy requirements for backup and restore Use of FlashCopy for full system backup and restore requires the storage subsystem to be at least FlashCopy V1 capable. Object-level recovery from system level backup requires both: Storage subsystem FlashCopy V2 Operating system z/OS V1.8 or later
The GUI component Windows One of the following Windows operating systems: Windows 2000 Professional Windows XP Professional (32 bit) Windows Server 2003 (32 bit)
18
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
The DB2 Recovery Expert GUI component supports object profiles created with any version of DB2 Automation Tool. Hardware requirements For GUI component: any hardware environment that supports the required software For mainframe component: minimum 150 MB free disk space, minimum 128 MB memory, and any hardware environment that supports the required software
Server security
The DB2 Recovery Expert Server uses RACF security. The server requires UNIX System Services access. The user ID under which the server job runs must have an OMVS segment in its RACF profile. To check whether the ID has an OMVS segment in its profile, use the following command:
LU userid OMVS
To add an OMVS segment to an IDs RACF profile, use the following command:
ADDUSER ddfuid OMVS(UID(nnn))
Agent security
The DB2 Recovery Expert Agent has the following levels of security: APF authorization The DB2 Recovery Expert Agent must run APF-authorized. Modify the IEAAPFxx or PROGxx PARMLIB members to define the DB2 Recovery Expert load library (ARY.IBMTAPE.SARYLOAD) as an APF-authorized library. BPX.SERVER access If the BPX.SERVER FACILITY class profile is not defined within RACF, the user ID under which the agent job runs must be assigned a UID=0. If BPX.SERVER is defined, the user ID must be permitted to it:
PERMIT BPX.SERVER CLASS(FACILITY) ID(userID) ACCESS(READ)
where userID is the user ID under which the agent job runs. If BPX.SERVER is defined, the agent must also run RACF program controlled. The following RACF commands establish the required definitions for the DB2 Recovery Expert load library and other required load libraries. For the DB2 Recovery Expert load library:
RALTER PROGRAM * ADDMEM(ARY.IBMTAPE.SARYLOAD//NOPADCHK)
where xxx is the high-level qualifier of the Language Environment data sets, typically CEE. For each DB2 subsystem that is accessed by DB2 Recovery Expert:
RALTER PROGRAM * ADDMEM(DSN.Vxxx.SDSNEXIT//NOPADCHK) RALTER PROGRAM * ADDMEM(DSN.Vxxx.SDSNLOAD//NOPADCHK)
where DSN.Vxxx.SDSNEXIT and DSN.Vxxx.SDSNLOAD name the DB2 load libraries required for accessing that subsystem.
Chapter 2. Installation
19
After issuing any of the above commands, the storage program control tables must be refreshed by issuing the following command:
SETROPTS REFRESH WHEN(PROGRAM)
Note that some of these definitions may already be in place at your site. All of them are required. Package and plan access Each DB2 Recovery Expert user must be granted EXECUTE privileges on the DB2 Recovery Expert packages and plans. DB2 Recovery Expert privileges are granted when you run SARYSAMP member ARYGRT1. See Step 6 - Grant Recovery Expert privileges on page 23. You may edit this member to grant appropriate access privileges to user IDs as per your shop standards.
2.2 Installation
The installation is based on directly customizing and executing the jobs provided in the product library SARYSAMP. In this section you will find the detailed steps required for a complete successful installation of Recovery Expert V2.1. The following three types of new installation are possible with DB2 Recovery Expert for z/OS V2.1: Client/server (GUI) component only With the GUI interface you can perform: Dropped object recovery Log analysis through which you can determine quiet points Relative cost evaluation for the generated recovery plans Recovery using object profiles created using DB2 Automation Tool
ISPF component only With the ISPF component only you can perform: System level backup and restore Object restore using object profiles Disaster recovery
20
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
Complete installation With both GUI and ISPF components you can perform all functions. In this section we describe the steps for a complete install. Table 2-1 lists the sequence of steps for a new installation. We mention the tasks performed, the members of the SARYSAMP library that perform it, and indicate whether the step needs repeating in case of multiple DB2 subsystems to control. All the required JCL members are supplied in the SARYSAMP library.
Table 2-1 Steps for installing Recovery Expert V2.1 - complete install Step and descriptiona Comment SARYSAMP members Multiple system install
Step 1 - APF authorize the DB2 Recovery Expert LOAD library data set. Step 2 - Copy and edit the ARYEMAC1 CLIST. Step 3 - Create Recovery Expert DB2 objects.
ARYEMAC1 ARYDDLA ARYDDL7, ARYDDL71, ARYDDL72 or ARYDDL8, ARYDDL81, ARYDDL82 or ARYDDL9, ARYDDL91, ARYDDL92 ARYDDL0 (optional) ARYDDLG (optional)
X X
Step 4 - Create indexes on the DB2 catalog. Step 5 - Bind Recovery Expert DB2 packages and plans.
Optional
ARYDSCIX ARYBND71 ARYBND72 ARYBND73 ARYBND74 ARYBND81 ARYBND82 ARYBND83 ARYBND84 ARYBND91 ARYBND92 ARYBND93 ARYBND94
X X
Step 6 - Grant Recovery Expert privileges. Step 7 - Create the Recovery Expert control file. Step 8 - Configure the Recovery Expert product control file. Step 9 - Update the schema level repository. Step 10 - Install the GUI client. Step 11 - Configure the server and agent.
X Optional
Xb
Chapter 2. Installation
21
Step 13 - Create the System Backup and Restore Services VSAM repository Step 14 - Update the System Backup and Restore Services CLISTs. Step 15 - Customize the CLIST members for SBRS.
ARYREPO
ARYV21, ARYV210
Step 16 - Set up the job for repository backup data sets. Step 17 - Change defaults for backup restore. Step 18 - Update the authorized programs list. Step 19 - Configure RACF profiles for SBRS. Step 20 - Set the default value for backup profiles. Step 21 - Configure the RBA capture utility. Step 22 - Create the SBRS subsystem setup repository. Step 23 - Activate Recovery Expert started tasks. Optional Optional Optional Optional Optional
a. Click the step to go to the corresponding paragraph. b. If the agent config file is on shared disk, then multiple agents are not required. If it is not, then you need to define multiple agents. c. DB2 9 for z/OS and later only.
Note: If you are configuring DB2 Recovery Expert for z/OS to work with more than one DB2 subsystem then you have to repeat the steps that are checked under the Multiple system install column in Table 2-1.
Step 1 - APF authorize the DB2 Recovery Expert LOAD library data set
IBM DB2 Recovery Expert for z/OS V2.1 requires that the product LOAD library is APF authorized. You may need to APF authorize libraries for each LPAR involved. Refer to z/OS V1R9.0 MVS System Commands, SA22-7627-16, for more information about how to use SETPROG to APF authorize libraries.
22
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
Note for the following steps: When creating the Recovery Expert objects with the help of DDL members supplied, you have a choice to create a PDS for each subsystem or to keep all the DDLs in one PDS with different names. Depending on your naming conventions, you can make the selection. Some jobs, like creating the ISPF VSAM Repository data sets, are common to multiple subsystems in an LPAR (that is, they need only to be run once in an LPAR). If you can place them on a shared disk device across all the LPARs then you need to create the data sets once.
Chapter 2. Installation
23
Set the RBR DEVICE control statement to a valid disk work device (that is, SYSDA, SYSALLDA, and so on, to match your shop standard). For instance, you may set it to SYSALLDA using the following control statement in your SYSIN card:
UPDATE RBR DEVICE = SYSALLDA
If you want to configure DB2 Recovery Expert for z/OS to create system level backups using EMC-based arrays for fast replication then you should set the following control statements with appropriate load library names for EMC TimeFinder, EMC Snap, and the EMC SCF load libraries (in any order):
UPDATE UPDATE UPDATE UPDATE RBR RBR RBR RBR EMC EMC EMC EMC LOAD1 LOAD2 LOAD3 LOAD4 = = = = YOUR.EMC.LOADLIB1 YOUR.EMC.LOADLIB2 YOUR.EMC.LOADLIB3 YOUR.EMC.LOADLIB4
If you wish to have Recovery Expert offload your system backups using the Innovations FDR product, you need to set the following control statements to the load library names that contain the FDR product:
UPDATE RBR FDR LOAD1 UPDATE RBR FDR LOAD2 =YOUR.FDR.LOADLIB1 =YOUR.EMC.LOADLIB2
24
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
Important: You must match the data set names used in ARYV210 CLIST with the corresponding ones in ARYSJ001, as shown in Table 2-2.
Table 2-2 Mapping of data set names used in ARYSJ001 to DD name in ARYV210 CLISTs ARYSJ001 (GUI component)
UPDATE RBR PROF REPO = ARY.PROFILES UPDATE RBR MAPS REPO = ARY.PROFILE.MAPS UPDATE RBR CATS REPO = ARY.PROFILE.CATS UPDATE RBR SYSBK REPO = ARY.SYSBACK UPDATE RBR BKUP VOLS = ARY.SYSBACK.VOLS UPDATE RBR BKUP SSID = ARY.SYSBACK.SSIDS UPDATE RBR BKUP OBJS = ARY.SYSBACK.OBJS UPDATE RBR REPORT REPO = ARY.BREPORT UPDATE RBR OFFLD REPO = ARY.OFFOPTS UPDATE RBR PARMLIB = ARY.V2R1M0.SARYSAMP UPDATE RBR PARMLIB MBR= ARY#PARM UPDATE ARY MSGLIBRARY = ARY.V2R1M0.SARYMENU
PARMLDSN(ARY.V2R1M0.SARYSAMP) PARMLMBR(ARY#PARM)
RBRLVL(ARY.V2R1M0) MLIB(SARYMENU)
Example 2-1 shows a sample input for one DB2 V8 subsystem to the SYSIN card for ARYSJ001.
Example 2-1 Sample SYSIN card for ARYSJ001 //SYSIN DD * SET DB2 SSID UPDATE DB2 ZPARMS UPDATE DB2 BOOTSTRAP1 UPDATE DB2 BOOTSTRAP2 UPDATE DB2 LOADLIB1 UPDATE DB2 LOADLIB2 SET PRODUCT CFG SET PRODUCT VER UPDATE ARY PLAN1 UPDATE ARY PLAN2 UPDATE ARY PLAN3 UPDATE ARY PLAN4 UPDATE ARY PLAN5 UPDATE ARY MSGLIBRARY UPDATE ARY ARCHLOG1 UPDATE ARY ARCHLOG2 UPDATE ARY ACTLOGPRI UPDATE ARY DSN PREFIX UPDATE ARY RCVR AUTHS UPDATE SLR LOAD AUTHS UPDATE IPC IPC_GROUPER = = = = = = = = = = = = = = = = = = = = = DB8W DSNZPARM DB8WU.DB2.BSDS01 DB8WU.DB2.BSDS02 DB8W8.SDSNEXIT DB8W8.SDSNLOAD NULL NULL ARYPLAN1 DISPLAY DATA EXTRACT ARYPLAN2 SCHEMA LEVEL REPOSITORY LOAD ARYPLAN3 RECOVERY PLAN GENERATION ARYPLAN4 JCL GENERATION AND SQL EXEC ARYPLAN5 LOG ANALYSIS SERVICES ARY.V2R1M0.SARYMENU Y USE ARCHIVE LOG 1 N USE ARCHIVE LOG 2 Y ACTIVE LOG PRIORITY SG7606.&USERID Y RECOVER DB2 OBJECT AUTHORIZATIONS Y N = DB2 authorizations are N Y = Enable Grouper-related
Chapter 2. Installation
25
UPDATE UPDATE UPDATE UPDATE UPDATE UPDATE UPDATE UPDATE UPDATE UPDATE UPDATE UPDATE UPDATE UPDATE UPDATE UPDATE UPDATE UPDATE UPDATE UPDATE UPDATE UPDATE UPDATE UPDATE UPDATE UPDATE UPDATE UPDATE UPDATE UPDATE UPDATE UPDATE UPDATE UPDATE UPDATE UPDATE UPDATE UPDATE UPDATE UPDATE UPDATE UPDATE UPDATE UPDATE UPDATE UPDATE UPDATE /*
QT GRP TBOWNER QT GRP TBNAME QT GRP IXOWNER QT GRP IXNAME QT ENTRY OWNER QT ENTRY NAME QT DATABASE QT TABLESPACE LAS DSN PREFIX LAS VOLSERS LAS DATA AUNIT LAS DATA PQTY LAS DATA SQTY LAS INDEX AUNIT LAS INDEX PQTY LAS INDEX SQTY CCS SLR TECHNQ CCS SLR SBCS CCS SLR DBCS CCS SLR MIXED CCS ARY TECHNQ CCS ARY SBCS CCS ARY DBCS CCS ARY MIXED FTW DEVICE FTW ALCUNIT FTW PQTY FTW SQTY ICF DEVICE ICF ALCUNIT ICF PQTY ICF SQTY RDA DEVICE RDA ALCUNIT RDA PQTY RDA SQTY RBR PROF REPO RBR MAPS REPO RBR CATS REPO RBR SYSBK REPO RBR BKUP VOLS RBR BKUP SSID RBR BKUP OBJS RBR REPORT REPO RBR OFFLD REPO RBR PARMLIB RBR PARMLIB MBR
= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
SYSTOOLS ARYQTG SYSTOOLS ARYQTGX SYSTOOLS ARYQT SYSTOOLS ARYTSQT SG7606 SBOX49,SBOX3Q,SBOX3R C 00005 00005 C 00005 00005 ER CHARACTER CONVERSION TECHNIQUE 00037 EBCDIC 01200 UNICODE UT-16 01208 UNICODE UT-8 ER CHARACTER CONVERSION TECHNIQUE 00037 EBCDIC 01200 UNICODE UT-16 01208 UNICODE UT-8 SYSALLDA DEVICE TYPE C C=CYLS, T=TRACKS 00001 PRIMARY QTY 00001 SECONDARY QTY SYSALLDA DEVICE TYPE C C=CYLS, T=TRACKS 00001 PRIMARY QTY 00001 SECONDARY QTY SYSALLDA DEVICE TYPE C C=CYLS, T=TRACKS 00001 PRIMARY QTY 00001 SECONDARY QTY ARY.PROFILES ARY.PROFILE.MAPS ARY.PROFILE.CATS ARY.SYSBACK ARY.SYSBACK.VOLS ARY.SYSBACK.SSIDS ARY.SYSBACK.OBJS ARY.BREPORT ARY.BREPORT ARY.V2R1M0.SARYSAMP ARY#PARM
You do not need multiple control data sets for multiple DB2 subsystems. All the information that Recovery Expert needs for each DB2 subsystem is described within the setup panel. After saving your input, the corresponding DB2PARMS control file is updated. Only one DB2PARMS control file is necessary for managing multiple DB2 subsystems on a single LPAR. If you are monitoring members of a data sharing group on a single LPAR with one Recovery Expert started task, then identify all of these members within the same DB2PARMS control file. You can share the same DB2PARMS control file among multiple subsystems.
26
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
The only reasons for having multiple DB2PARMS control files is if you have multiple subsystems on different LPARS without shared disk or if you want to support multiple versions of the products in the same DB2 subsystem. Define the proper RACF controls on the DB2PARMS product control file to allow read and update access to appropriate IDs. In this way, the DB2PARMS control file has proper security to prevent access by unauthorized users.
Chapter 2. Installation
<control-file-dd>DB2PARMS</control-file-dd> <log-level>I</log-level> <server-connect-retry-max>10</server-connect-retry-max> <server-connect-retry-delay>10</server-connect-retry-delay> <request-thread-timeout>300</request-thread-timeout> <uppercase-passwords>true</uppercase-passwords> <job-poll-rate>5</job-poll-rate> <job-cancel-timeout>5</job-cancel-timeout> <check-ownership-external>true</check-ownership-external> <topology-discovery-restriction>configured</topology-discovery-restriction> <trace-csi>false</trace-csi> <trace-db2-attachment>false</trace-db2-attachment> <trace-sql>false</trace-sql> <trace-ifi>false</trace-ifi> <trace-network>false</trace-network> <trace-xml>false</trace-xml> <trace-events>false</trace-events> <trace-config>true</trace-config> </agent-config> ARYCFGS Server configuration file. The default values for all parameters may be used. Example 2-3 shows a sample configuration file for the IBM DB2 Recovery Expert for z/OS 2.1.0 server.
Example 2-3 Sample configuration file for the IBM DB2 Recovery Expert or z/OS 2.1.0 server
<server-config> <client-listener-port>9875</client-listener-port> <agent-listener-port>9876</agent-listener-port> <description></description> <community-string>wtsc53</community-string> <multicast-address>236.1.2.3</multicast-address> <multicast-port>19875</multicast-port> <multicast-interface></multicast-interface> <multicast-ttl>5</multicast-ttl> <multicast-delay>5</multicast-delay> <log-level>I</log-level> <bind-retry-max>30</bind-retry-max> <bind-retry-delay>10</bind-retry-delay> <trace-network>false</trace-network> <trace-xml>false</trace-xml> <trace-events>false</trace-events> <trace-config>true</trace-config> </server-config> ARYSJSRV Sample batch JCL to invoke the server. Customize this JCL to your environment and make use of it when you need to invoke the server in batch mode. ARYSJAGT Sample batch JCL to invoke the agent. Customize this JCL to your environment and make use of it when you need to invoke the agent in batch mode.
28
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
ARYSPSRV The procedure provided in this member can be used to run DB2 Recovery Expert Server as a started task. ARYSPAGT The procedure provided in this member can be used to run DB2 Recovery Expert Agent as a started task.
The DB2 RECOVER utility should not use system level backups as a recovery base for object-level recoveries:
RESTORE_RECOVER_FROMDUMP = NO
Use the disk copy of system level backup for the RESTORE SYSTEM and the RECOVER utilities:
UTILS_DUMP_CLASS_NAME = <blank> RESTORE_TAPEUNITS = NOLIMIT
Note that the above values are the default in DB2 9. Even though the DSNZPARM restricts the DB2 RECOVERY utility from using SLB as a recovery base for object-level restore, DB2 Recovery Expert System Backup and Restore Services can perform object-level restore using the SLB taken from Recovery Expert.
Step 13 - Create the System Backup and Restore Services VSAM repository
Edit the JCL in member ARYREPO (as per the instructions provided in the member) to create VSAM data sets that would hold backup and restore information. The following data sets are created when you run the JCL in this member:
ARY.PROFILES ARY.PROFILE.MAPS ARY.PROFILE.CATS ARY.SYSBACK ARY.SYSBACK.VOLS ARY.SYSBACK.SSIDS ARY.SYSBACK.OBJS ARY.BREPORT ARY.OFFOPTS ARY.OBJECTS
Chapter 2. Installation
29
30
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
Important: You must match the VSAM control file names used in the ARYV210 member with the corresponding ones in ARYSJ001, as shown in Table 2-2 on page 25.
Chapter 2. Installation
31
A user is not allowed to execute a System Backup and Restore Services backup or restore utility if he is not granted READ access to the corresponding profile or if the profile does not exist. If the specific RACF Facility Class Profile does not exist, then the most granular generic RACF Facility Class Profile will be applied in its place. For example, if ARY.ACCESS.ssid does not exist for a given System Backup and Restore Services subsystem, but a generic Facility Class Profile name ARY.ACCESS.* exists, then the generic profile will be used. Only authorization IDs with READ access to the profile will be cleared by RACF.
32
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
Step 1 - Copy the ARYEMAC1 CLIST. Step 2 - Create DB2 Recovery Expert objects for V2.1. Step 3 - Create image copies in the schema level repository. Step 4 - Bind Recovery Expert DB2 packages and plans.
ARYEMAC1 ARYDDLR
ARYCPY1
ARYBND71 ARYBND72 ARYBND73 ARYBND74 ARYBND81 ARYBND82 ARYBND83 ARYBND84 ARYBND91 ARYBND92 ARYBND93 ARYBND94
Step 5 - Bind Recovery Expert DB2 packages and plans. Step 6 - Stop the DB2 Recovery Expert Agent and server tasks. Step 7 - Configure the Recovery Expert control file. Step 8 - Update the schema level repository. Step 9 - Install the GUI client. Step 10 - Configure the server and agent.
ARYGRT1
ARYSJ001
ARYSJ002 ARYCFGS ARYSJSRV ARYSPSRV ARYCFGA ARYSJAGT ARYSPAGT For DB2 9 for z/OS and later only ARYREPO ARYV21, ARYV210 ARYV21, ARYV210, ARYTSOC, ARYCAPS ARYGDG
X X
Step 11 - Update system parameters. Step 12 - Create the SBRS VSAM repository. Step 13 - Update the SBRS CLIST. Step 14 - Copy members to the CLIST library for SBRS. Step 15 - Create the GDG base for the VSAM repository. Step 16 - Configure the SBRS PARMLIB member.
Optional
ARY#PARM
Chapter 2. Installation
33
Comment
SAMPLIB member
Step 17 - Configure the RBA capture utility. Step 18 - Create SBRS subsystem setup repository. Step 19 - Start Recovery Expert Server and agent tasks.
Optional
Optional
34
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
Step 6 - Stop the DB2 Recovery Expert Agent and server tasks
Issue the following commands in the order listed to stop the agent and server address spaces: /F STOP <agent-address space> /F STOP <server-address space>
Chapter 2. Installation
35
ARYSJSRV Sample batch JCL to invoke the server. Customize this JCL to your environment and make use of it when you need to invoke the server in batch mode. ARYSJAGT Sample batch JCL to invoke the agent. Customize this JCL to your environment and make use of it when you need to invoke the agent in batch mode. ARYSPSRV The procedure provided in this member can be used to run DB2 Recovery Expert Server as a started task. ARYSPAGT The procedure provided in this member can be used to run DB2 Recovery Expert Agent as a started task.
36
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
ARYCAPS
Chapter 2. Installation
37
38
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
Chapter 3.
39
Data Sharing Groups D8FG D8GG LPAR SC67 LPAR SC53 RE Server 53 LPAR SC59
D9C2
D9C1
D8G2 D8F2
DB8A DB8W
D8G1
D8F1
RE Agent 64
RE Agent 63
RE Agent 67
RE Agent 53
RE Agent 59
LPAR SC59 is a single, non-data sharing environment with two DB2 subsystems, DB8A and DB8W.
40
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
LPARs SC53 and SC67 form a sysplex that has two data sharing groups, D8GG and D8FG. Data sharing group D8GG contains two member subsystems, namely, D8G1 and D8G2. Data sharing group D8FG contain two member subsystems, namely, D8F1 and D8F2.
LPAR SC63 and SC64 form a sysplex that has one data sharing group, D9CG. Data sharing group D9CG contains members D9C1 and D9C2. The DB2 subsystems on LPARs SC53, SC59, and SC67 are DB2 for z/OS Version 8. The DB2 subsystems in SC63 and SC64 are DB2 9 for z/OS. There is one Recovery Expert Server established in this configuration. Recovery Expert Server 53 is on one member of the sysplex LPAR SC53. The corresponding server configuration file is shown in Example 3-1.
Example 3-1 Snippets from server configuration file
<server-config> <client-listener-port>9875</client-listener-port> <agent-listener-port>9876</agent-listener-port> <community-string>wtsc53</community-string> ...................... </server-config> Note: If you would like to set up an environment where one DBA is responsible to manage all the production DB2 subsystems and another DBA to manage development DB2 subsystems, then you can set up a second server started task. There is a Recovery Expert Agent started task on each of the five LPARs. The agent on each LPAR and the corresponding DB2 subsystem information setup in the product control file are given as follows: Recovery Expert Agent 53 on LPAR SC53 references Recovery Expert Server 53 using an agent configuration file that identifies the host name (wtsc53.itso.ibm.com) and port number 9876 (default). Snippets of this file are shown in Example 3-2.
Example 3-2 Snippets of Recovery Expert Agent 53 agent configuration file on LPAR SC53
<agent-config> <server-address>wtsc53.itso.ibm.com</server-address> <server-port>9876</server-port> ........................ </agent-config> Recovery Expert Agent 67 on LPAR SC67 references Recovery Expert Server 53 using an agent configuration file that identifies the host name (wtsc53.itso.ibm.com) and port number 9876 (default). The snippets of this file are shown in Example 3-3. Note that the contents of both the agent configuration files are identical in our case. If you decide to manage your environment with multiple servers then the <serveraddress> tag will contain different addresses.
Example 3-3 Snippets of Recovery Expert Agent 67 agent configuration file on LPAR SC67
........................ </agent-config> Recovery Expert Agent 53 on LPAR SC53 and Recovery Expert Agent 67 on LPAR SC67 share a common Recovery Expert product control file that identifies subsystems D8G1, D8G2, D8F1, and D8F2 pertaining to the data sharing groups D8GG and D8FG. To give you an idea on how we accomplished this, we listed job ARYSJ001 in Figure 3-2.
//PCFUPDT EXEC PGM=ARY#UTIL,PARM='SETUP',REGION=4M //STEPLIB DD DISP=SHR,DSN=ARY.V2R1M0.SARYLOAD //SYSUDUMP DD SYSOUT=* //DB2PARMS DD DISP=SHR,DSN=ARY.DB2PARMS.CONTROL //* //* REPORTS //* //SYSOUT DD SYSOUT=*,RECFM=FBA,LRECL=133 SYSIN REPORT //SYSPRINT DD SYSOUT=*,RECFM=FBA,LRECL=133 PCF REPORT //* //* CONTROLS //* //SYSIN DD DSN=SG7606.ARY.V2R1M0.SARYSAMP(D8F1),DISP=SHR // DD DSN=SG7606.ARY.V2R1M0.SARYSAMP(D8F2),DISP=SHR // DD DSN=SG7606.ARY.V2R1M0.SARYSAMP(D8FG),DISP=SHR // DD DSN=SG7606.ARY.V2R1M0.SARYSAMP(D8G1),DISP=SHR // DD DSN=SG7606.ARY.V2R1M0.SARYSAMP(D8G2),DISP=SHR // DD DSN=SG7606.ARY.V2R1M0.SARYSAMP(D8GG),DISP=SHR ....................... Figure 3-2 Snippets of the shared Recovery Expert control file setup job for Agents 53 and 67
We used the procedure described in Step 8 - Configure the Recovery Expert product control file on page 24 to create the control statements for one DB2 subsystem. We then copied that information to a PDS member, which has a name that represents the corresponding DB2 subsystem. For each member of the two data sharing groups (that is, D8F1, D8F2, D8G1, D8G2), the number of control statements is equal but the DB2 subsystem specific information like DSNZPARM name and BSDS names is provided with appropriate values. For a complete listing of the control statements, refer to Example E-1 on page 264 through Example E-4 on page 275. The PDS member pertaining to the group name should have just one control statement with group attach name assigned to DB2 SSID. For example, in the case of data sharing group D8FG, we used only one control statement: SET DB2 SSID = D8FG
42
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
Recovery Expert Agent 59 on LPAR SC59 references Recovery Expert Server 53 using an agent configuration file that identifies the host name (wtsc53.itso.ibm.com) and port number 9876 (default). The snippets of this file are shown in Example 3-4, and the complete file is shown in Example 3-4. Again, in this environment, since we used only one server, the contents of this agent configuration file are identical to the other two described above.
Example 3-4 Snippets of Recovery Expert Agent 59 agent configuration file
<agent-config> <server-address>wtsc53.itso.ibm.com</server-address> <server-port>9876</server-port> ........................ </agent-config> Recovery Expert Agent 59 on LPAR SC59 has a separate Recovery Expert product control file that identifies the DB2 subsystems DB8W and DB8A. To give you an idea on how we accomplished this we listed job ARYSJ001 in Figure 3-3. For a detailed listing of the control statements refer to Example E-5 on page 279 through Example E-6 on page 282.
//PCFUPDT EXEC //STEPLIB DD //SYSUDUMP DD //DB2PARMS DD //* //* REPORTS //* //SYSOUT DD //SYSPRINT DD //* //* CONTROLS //* //SYSIN DD // DD /* // PGM=ARY#UTIL,PARM='SETUP',REGION=4M DISP=SHR,DSN=ARY.V2R1M0.SARYLOAD SYSOUT=* DISP=SHR,DSN=ARY.DB2PARMS.CONTROL.AGT59
SYSOUT=*,RECFM=FBA,LRECL=133 SYSOUT=*,RECFM=FBA,LRECL=133
DSN=SG7606.ARY.V2R1M0.SARYSAMP.DB8W(DB8A),DISP=SHR DSN=SG7606.ARY.V2R1M0.SARYSAMP.DB8W(DB8W),DISP=SHR
Figure 3-3 Recovery Expert product control file setup job for Agent 59
Note: Each non-data sharing DB2 subsystem (or data sharing group) has its own SLR (DB2 tables) and each set should be updated separately as described in Step 9 - Update the schema level repository on page 27. Though it is essential for the GUI functioning, the SLR is not shown in Figure 4-1 to reduce the clutter. Recovery Expert Agent 63 references the Recovery Expert Server 53 using an agent configuration file that identifies the host name (wtsc53.itso.ibm.com) and port number 9876 (default). The snippets of this file are shown in Example 3-5.
Example 3-5 Snippets of the Recovery Expert Agent 63 configuration file
43
</agent-config> Recovery Expert Agent 64 references the Recovery Expert Server 53 using an agent configuration file that identifies the host name (wtsc53.itso.ibm.com) and port number 9876 (default). The snippets of this file are shown in Example 3-6.
Example 3-6 Snippets of the Recovery Expert Agent 64 configuration file
<agent-config> <server-address>wtsc53.itso.ibm.com</server-address> <server-port>9876</server-port> ........................ </agent-config> Recovery Expert Agent 63 on LPAR SC63 and Recovery Expert Agent 64 on LPAR SC64 share a common IBM Recovery Expert product control file that identifies subsystems D9C1 and D9C2 pertaining to the data sharing groups D9CG. See job ARYSJ001 in Figure 3-4. Detailed listings are shown in Example E-7 on page 286 and Example E-8 on page 290.
//PCFUPDT EXEC //STEPLIB DD //SYSUDUMP DD //DB2PARMS DD //* //* REPORTS //* //SYSOUT DD //SYSPRINT DD //* //* CONTROLS //* //SYSIN DD // DD // DD PGM=ARY#UTIL,PARM='SETUP',REGION=4M DISP=SHR,DSN=ARY.V2R1M0.SARYLOAD SYSOUT=* DISP=SHR,DSN=ARY.DB2PARMS.CONTROL
SYSOUT=*,RECFM=FBA,LRECL=133 SYSOUT=*,RECFM=FBA,LRECL=133
Figure 3-4 Recovery Expert product control file setup job for Agents 63 and 64
Attention: From the perspective of managing the recovery of DB2 objects in a data sharing or non-data sharing environment, the location of the Recovery Expert Server (whether it is on a member of a sysplex or on an LPAR that is not part of a sysplex) does not alter the approach for recovering DB2 objects using the Recovery Expert tool.
44
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
Next is the setup of the test environment for ISPF services of Recovery Expert that we implemented to back up and recover DB2 subsystem and objects. The z/OS and DB2 environments are the same as what we described in 3.1, GUI environment configuration on page 40, and repeat here for the sake of completeness. This section also describes various repositories used in the ISPF component of Recovery Expert. Figure 3-5 on page 46 shows the Recovery Expert configuration for ISPF services used in our backup and recovery solutions with the following components: Five logical partitions (LPARs): SC53, SC67, SC59, SC63 and SC64. The DB2 subsystems on LPARs SC53, SC59, and SC67 are DB2 for z/OS Version 8. The DB2 subsystems in SC63 and SC64 are DB2 9 for z/OS. LPAR SC59 is a single, non-data sharing environment with two DB2 subsystems, DB8A and DB8W. LPARs SC53 and SC67 form a sysplex that has two data sharing groups, D8GG and D8FG: Data sharing group D8GG contains subsystems D8G1 and D8G2. Data sharing group D8FG contain subsystems D8F1 and D8F2. LPAR SC63 and SC64 form a sysplex that has one data sharing group, D9CG. Data sharing group D9CG contains members D9C1 and D9C2. There is one SBRS installed per sysplex environment or single non-data sharing environment.
45
TSO
TSO
SBRS ISPF
LPAR SC64
LPAR SC63
LPAR SC67
LPAR SC53
LPAR SC59
D8F1
DB8A DB8W
D8G1
CLIST Members
PARM Library
CLIST Members
PARM Library
CLIST Members
Product Control File used by ISPF component is the same as that used by the GUI component
PARM Library
Figure 3-5 Recovery Expert configuration used in the user scenarios for ISPF services
Next is a description of the major components of the environment for ISPF services that we implemented in reference to the sysplex environment with LPARs SC53 and SC67. This implementation is the same for a sysplex environment with LPARs SC63 and SC64 and a single non-data sharing environment with LPAR SC59. The SBRS repository The SBRS repository is a collection of VSAM data sets that are created during installation of Recovery Expert, as described in Step 13 - Create the System Backup and Restore Services VSAM repository on page 29. Table 3-1 lists all data sets of the SBRS. The first 10 data sets must be added to the Recovery Expert product control file as described in Table 3-1.
Table 3-1 Repositories and corresponding VSAM data sets Repository Profile repository Source/target map repository Catalogs repository System backup repository Backup volumes repository VSAM data set ARY.PROFILES ARY.PROFILE.MAPS ARY.PROFILE.CATS ARY.SYSBACK ARY.SYSBACK.VOLS
46
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
Repository Backup SSID repository Backup objects repository Backup report repository Offload options repository Profile objects repository Mover repository RBA capture repository
VSAM data set ARY.SYSBACK.SSIDS ARY.SYSBACK.OBJS ARY.BREPORT ARY.OFFOPTS ARY.OBJECTS ARY.SG7606.MOVDATA SG7606.SC53.ALLSSIDS.RBA
Sample JCL from ARYREPO member A sample JCL from the ARYREPO member of the supplied SARYSAMP installation library is shown in Example E-9 on page 294. This JCL creates the first 10 VSAM repository data sets. Sample JCL from ARYMOVER member to create mover repository A sample JCL from the ARYMOVER member of the supplied SARYSAMP installation library is shown in Example E-10 on page 299. This JCL creates the ARY.SG7606.MOVDATA VSAM data set that contains information that is the result of analysis of a DB2 subsystem. You can conduct analysis of a DB2 subsystem from option M on the SBRS ISPF menu. For a detailed description refer to Step 22 - Create the SBRS subsystem setup repository on page 32. This data set must be added to ARYV210 CLIST. Sample JCLs from ARY#RBAR and ARY#RBA to create RBA capture repository A sample JCL from the ARY#RBAR member of the supplied SARYSAMP installation library is shown in Example E-11 on page 299. This JCL creates the SG7606.SC53.ALLSSIDS.RBA VSAM data set to capture RBA information when the RBA capture utility is run. This VSAM data set must be added to the ARYV210 CLIST member. The sample procedure from the ARY#RBA member of the supplied SARYSAMP installation library is shown in Example E-12 on page 300. This job, which runs as a started task, captures the DB2 time stamp with high used RBA to be able to perform point-in-time recovery. For a detailed description refer to Step 21 - Configure the RBA capture utility on page 32. Sample JCL from ARYGDG A sample JCL to create GDG bases to back up the first 10 repository data sets listed in Table 3-1 on page 46 is shown in Example E-13 on page 300. For a detailed description, refer to Step 16 - Set up the job for repository backup data sets on page 31. Ensure that the prefix of GDG bases is added to the variable RBRBUPRE and that the suffix of GDG bases is added to the variable RBRBUSUF in the CLIST ARYV210.
47
SBRS DR objects The disaster recovery DB2 objects that are required by SBRS are listed in Table 3-2. These objects are created by running the JCL provided in the member ARYDDLR from the supplied SARYSAMP installation library and are used during disaster recovery.
Table 3-2 SBRS DB2 DR objects DB2 object type Table space Table space Table Table Index Index View View Alias Alias Name of the object ARYDRCPY ARYDRARC DR_IMAGE_COPY_CATL DR_ARCHIVE_LOGS00 DR_ICOPY_CATL_IX DR_ARCHIVE_LOG_IX DR_ICOPY_CATLV DR_ARCHIVE_LOGSV DR_ICOPY_CATL DR_ARCHIVE_LOGS
DDL from ARYDDLR member DDL from ARYDDLR is shown in Example E-14 on page 301. Product control file We created one product control file for each installed SBRS in our environment. If you can place the product control file in a shared disk, then you can have just one product control file for the entire environment. The same product control file is shared between GUI and ISPF components of Recovery Expert. For a detailed description of how we set up the product control file, refer to Step 8 - Configure the Recovery Expert product control file on page 24. There is one product control file for each installed SBRS in our environment. If we can place this file in a shared disk, then we can have one product control file for the entire environment. The same product control file is shared between GUI and ISPF components of Recovery Expert. For a detailed description of how we set up the product control file, refer to Figure 3-2 on page 42. CLIST members There are four CLIST members: ARYV21 ARYV210 ARYTSOC ARYCAPS ISPF Dialog start-up CLIST ISPF Dialog start-up CLIST Services CLIST Uppercase conversion utility CLIST
These members are supplied in the SARYSAMP installation library. Sample CLISTs are shown in Sample CLISTs on page 303. For a detailed description of the CLIST, refer to Step 14 - Update the System Backup and Restore Services CLISTs on page 30 and Step 15 - Customize the CLIST members for SBRS on page 31.
48
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
PARM library The parmlib member has control statements that influence Backup and Recovery for DB2, the setup utility, the backup utility, snap global parameters, BCV split parameters, the restore utility, and the offload utility. Refer to Step 17 - Change defaults for backup restore on page 31 for description. The parmlib data set and the parmlib member in that data set must be specified in the Recovery Expert product control file. For a description of the Recovery Expert product control file, refer to Figure 3-2 on page 42. For a detailed listing of the control statements in the parmlib member, refer to Example E-19 on page 306.
Considerations
Consider the following: Having different DB2 subsystems (DB8A and DB8W) on the same LPAR managed by two different Recovery Expert Servers With Recovery Expert Server 53 (which manages DB8A) and Recovery Expert Server 59 (which manages DB8W), this effect is achieved by having the Recovery Expert Agent 53 and Recovery Expert Agent 59 on LPAR SC59 use different product control files. This simulates an environment where a more experienced DBA is responsible for managing a critical DB2 subsystem, and a less experienced DBA manages a less critical DB2 subsystem on the same LPAR. Having different DB2 subsystems (D8G1, D8G2, D8F1, and D8F2) on the same sysplex managed by two different IBM DB2 Recovery Expert Servers With Recovery Expert Server 53 and Recovery Expert Server 59, this effect is achieved by having the agents Recovery Expert Agent 53 and Recovery Expert Agent 59 on LPARs SC53 and SC67 use the same product control files.
49
50
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
Part 2
Part
51
52
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
Chapter 4.
53
Note: Load libraries, SMP/E files, and other data sets that may be used by a DB2 subsystem are not considered to be actual DB2 data sets for purposes of system level backup and system level restore.
54
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
DB8GA.ARCHLOG*.**
DB8GL1
DB8GARCH
DB8GL2
DB8GLOG1
DB8GL.*.BSDS02 DB8GL.*.LOGCOPY2
DB8GM1
DB8G8.** UCAT.DB8GMISC
DB8GLOG2
DB8GS1
DB8FUS.**
DB8GMISC
DB8GD1, DB8GD2
DB8GU.** UCAT.DB8GDATA
SGDB8GUS
DB8GDATA
There are three classes of data shown in Figure 4-1. They are: DB2 BSDS, active logs, archive logs The BSDS, active, and archive logs are shown in the upper left portion of Figure 4-1. The BSDS and active logs use a high-level qualifier of DB8GL. The archive logs use a high-level qualifier of DB8GA. Both of these high-level qualifiers are cataloged in the ICF user catalog named UCAT.DB8GLOGS. The catalog is allocated on volume DB8GL1.
55
We have also allocated two separate storage classes for the BSDS and logs. This allows us to use SMS to manage the placement of the data sets, and yet maintain separation of the various data sets (for example, BDSD01 and BSDS01). The storage classes are DB8LOG1 and DB8LOG2. Both of the storage classes are defined as part of the log copy pool. Copy pool definitions are discussed in 4.3.2, Creating the DFSMS copy pools on page 66. Note: No data sets other than DB2 BSDS, active log, and in our case archive logs are defined in this ICF catalog or allocated on the volumes in the storage groups. This is what we call a pristine copy pool. Having the copy pools that will be backed up using the DB2 BACKUP SYSTEM utility setup in this way is highly recommended. DB2 catalog, directory, and application data The DB2 data is shown in the lower left section of Figure 4-1 on page 55. The DB2 data is also split between two separate storage classes. Those storage classes are SGDB8GUS and DB8GDATA. Both storage classes are in the DB2 data copy pool. Note: No data sets other than DB2 catalog, directory, and application data are defined in this ICF catalog, or allocated on the volumes in the storage groups. This is what we call a pristine copy pool. We highly recommend having the copy pools that will be backed up using the DB2 BACKUP SYSTEM utility setup in this way. Other miscellaneous data sets This group is represented by the single volume in the center of Figure 4-1 on page 55, and it includes all other data sets that may in some way be associated with the DB2 data sharing group. These data sets include: DB2 System libraries (SDSNEXIT, DSDSNLOAD) SMP/E libraries and Consolidated Software Inventories (CSIs) Application load libraries The data sets in this category have more dependencies on other system data sets than any data sets contained in the DB2 copy pools. Therefore, we recommend that data sets in this category be backed up and recovered along with the other system data sets.
Note: In an SMS-managed system, it is necessary for the SMS ACS routines to be modified to enforce the allocations in the storage groups associated with the copy pools discussed above.
56
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
We can see from the subsystem setup utility data that this data sharing group is far from an optimal configuration for using the DB2 BACHKUP SYSTEM utility for system level backups shown in Figure 4-1 on page 55. Figure 4-2 shows page 1 of the subsystem information setup screens. In this case we use a DB2 V8 subsystem, and we are set it up using the DB2 BACKUP SYSTEM utility. We recommend using the DB2 BACKUP SYSTEM utility for system level backups for DB2 V8 and later. The top section of the window shows that the subsystem name is D8G1. The subsystem is currently active. It is a data sharing member, and the last analysis was run February 12th. Most importantly, there is a message on line 3 of the first section that reads Subsystem configuration prevents system level backup. Our goal it to change the configuration of the DB2 data sharing group to the configuration discussed in 4.2, Planning for subsystem configuration on page 55. Once we complete the reconfiguration, the message will read Subsystem configuration is optimal. The middle section shows the new MVS user catalogs to be used by the data sharing group. This section can be used to provide JCL to create new ICF user catalogs as necessary. Since the DB2 table space and index space data sets must be cataloged in a separate ICF user catalog from the DB2 archive and active logs, it may be necessary to define new ICF user catalogs. In the bottom section of the window a list of the ICF user catalogs currently in use is provided. In this case, there is only one ICF user catalog in use for all data sets associated with this particular DB2 data sharing group. The aliases associated with the single ICF user catalog in use by this DB2 data sharing group can be viewed using the V line command. Since we know that we will need at least two ICF user catalogs for data set separation, let us take a closer look at the aliases defined in the catalog UCAT.TOTDDL.
ARY$SSID ------ Subsystem Setup Information ----- 2008/02/12 17:20:21 Option ===> Scroll ===> CSR ------------------------------------------------------------------------------Subsystem: D8G1 Active: Yes Datasharing: Yes Date of Last Analysis: 02/12/2008 Analysis Recommended: Y Message: Subsystem configuration prevents system level backup. ---------------------------------------------------Row 1 of 49 + New MVS User Catalogs to be used by this DB2 Subsystem Log/BSDS Catl Volume DB2 Data Catl Volume Line Cmds: (C-Create, A-Add Alias, D-Dataset Disp, U-Update, V-View Alias) Existing MVS User Catalogs used by this DB2 Subsystem Data Log Other UCAT.TOTDDL Line Cmds: (D-Dataset Display, V-View Aliases)
Volume TOTDDL
57
Figure 4-3 shows the results from a View Alias line command.
ARY$SSAL ------ Usercat Alias List Display ------ 2008/02/12 15:57:52 Option ===> Scroll ===> CSR ------------------------------------------------------------------------------Subsystem: D8G1 Usercat: UCAT.TOTDDL
The following aliases are in this usercat. If the "DB2" column is Yes, the alias is being used by this DB2 for either Logs or Data. The count is the number of DB2 datasets using the alias name. Row 1 of 3 ------------------------------------------------------------------------------Cmd Alias DB2 Logs Data Count DB8GU Yes Yes Yes 00000624 DB8GUS Yes No Yes 00000027 DB8G8 No No No N/A ***************************** Bottom of Data**********************************
We see that there are three aliases associated with this ICF user catalog: DB8GU - This alias is associated with DB2 table space and index space data sets, DB2 log data sets, and non-DB2 data. These data sets need to be separated before we can use the DB2 BACKUP SYSTEM utility to create system level backups. DB8GUS - This alias is associated with only DB2 table space data sets. From an Recovery Expert perspective, this is a good setup. DB8G8 - This alias is associated with our ICF user catalog. However, none of the data sets using this alias contain DB2 table space data or DB2 log data.
58
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
Figure 4-4 shows the storage copy pools constructs and the boot strap data set section of the subsystem setup information.
ARY$SSID ------ Subsystem Setup Information ----- 2008/02/12 18:15:41 Option ===> Scroll ===> CSR ------------------------------------------------------------------------------Subsystem: D8G1 Active: Yes Datasharing: Yes Date of Last Analysis: 02/12/2008 Analysis Recommended: Y Message: Subsystem configuration prevents system-level backup. ---------------------------------------------------Row 10 of 49 -+ Storage Copy Pools Data Copy Pool DSN$DB8G$DB Log Copy Pool DSN$DB8G$LG Line Cmds: (V-Volume List) Boot Strap Datasets D8G1 - BSDS 1 DB8GU.D8G1.BSDS01 D8G1 - BSDS 2 DB8GU.D8G1.BSDS02 D8G2 - BSDS 1 DB8GU.D8G2.BSDS01 D8G2 - BSDS 2 DB8GU.D8G2.BSDS02 Line Cmds: (R-Rename BSDS, M-Move BSDS) Valid Primary Cmds: (Analyze, Reanalyze)
Figure 4-4 Subsystem setup - storage copy pools and boot strap data sets
At this point, the copy pools have not been created. Therefore, the copy pool name will be shown in red if the default colors in ISPF have not been changed. They are shown in bold in this case. The boot strap data set section lists all of the boot strap data sets in use by this DB2 data sharing group. Line commands are provided to rename or move the boot strap data sets. The DB2 subsystems must be stopped before attempting to move or rename the boot strap data sets.
59
Figure 4-5 lists all of the active log data sets in use by this DB2 data sharing group. Line commands are available to rename or move the active log data sets. The DB2 subsystem that is using a given log data set must be stopped in order to rename or move an active log data set.
ARY$SSID ------ Subsystem Setup Information ----- 2008/02/12 18:51:23 Option ===> Scroll ===> CSR ------------------------------------------------------------------------------Subsystem: D8G1 Active: Yes Datasharing: Yes Date of Last Analysis: 02/12/2008 Analysis Recommended: Y Message: Subsystem configuration prevents system level backup. ---------------------------------------------------Row 22 of 49 -+ Active Log Datasets D8G1 - Log 1 DB8GU.D8G1.LOGCOPY1.DS01 Volume TOTDDM D8G1 - Log 1 DB8GU.D8G1.LOGCOPY1.DS02 Volume TOTDDM D8G1 - Log 1 DB8GU.D8G1.LOGCOPY1.DS03 Volume TOTDDM D8G1 - Log 2 DB8GU.D8G1.LOGCOPY2.DS01 Volume TOTDDL D8G1 - Log 2 DB8GU.D8G1.LOGCOPY2.DS02 Volume TOTDDL D8G1 - Log 2 DB8GU.D8G1.LOGCOPY2.DS03 Volume TOTDDL D8G2 - Log 1 DB8GU.D8G2.LOGCOPY1.DS01 Volume TOTDDM D8G2 - Log 1 DB8GU.D8G2.LOGCOPY1.DS02 Volume TOTDDM D8G2 - Log 1 DB8GU.D8G2.LOGCOPY1.DS03 Volume TOTDDM D8G2 - Log 2 DB8GU.D8G2.LOGCOPY2.DS01 Volume TOTDDL D8G2 - Log 2 DB8GU.D8G2.LOGCOPY2.DS02 Volume TOTDDL D8G2 - Log 2 DB8GU.D8G2.LOGCOPY2.DS03 Volume TOTDDL Line Cmds: (R-Rename Log, M-Move Log) Valid Primary Cmds: (Analyze, Reanalyze)
60
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
Figure 4-6 shows the final section of the subsystem setup information. The top part is a list of the aliases in use by this DB2 data sharing group. Line commands are provided to display a list of data sets associated with each alias and to merge the alias into a new ICF user catalog.
ARY$SSID ------ Subsystem Setup Information ----- 2008/02/12 19:01:10 Option ===> Scroll ===> CSR ------------------------------------------------------------------------------Subsystem: D8G1 Active: Yes Datasharing: Yes Date of Last Analysis: 02/12/2008 Analysis Recommended: Y Message: Subsystem configuration prevents system level backup. ---------------------------------------------------Row 37 of 49 Alias used with associated MVS User Catalogs DB8GU UCAT.TOTDDL Data Log Other DB8GUS UCAT.TOTDDL Data Line Cmds: (D-Dataset Display, M-Merge catalog entries, R-Rename Alias) Volumes used by this DB2 Subsystem Volume Data DataCat ActLog DB8GS1 Yes No No TOTDDL Yes Yes Yes TOTDDM Yes No Yes TOTDDZ Yes No No Line Cmds: (D-Dataset Display, M-Move
ArcCat No No No No Volume)
Pool No No No No
Note that the alias DB8GU has data sets that contain DB2 log data, DB2 table space data, and other data sets associated. This must be cleaned up before the subsystem is ready to use the DB2 BACKUP SYSTEM utility. AT the bottom of the subsystem setup information screen, there is a list of the volumes in use by this DB2 subsystem. For each volume, there is a column indicating whether the volume contains any of the following types of data: Data - DB2 data including the DB2 catalog and directory spaces DataCat - the ICF user catalog where the DB2 data is cataloged ActLog - DB2 boot strap or active log data sets ActCat - the ICF user catalog where the DB2 boot strap and active log data sets are cataloged ArcLog - DB2 archive log data sets used by this DB2 subsystem ArcCat - the ICF user catalog where the DB2 archive log data sets are cataloged Other - any other category of data set that resides on the volume Pool - the volume assigned to a SMS copy pool The volumes appear in various ISPF default colors, depending on the status of the volume. (Note that the colors may be different if the ISPF default colors have been changed.) Dark blue: The volume is optimal. Light blue: The volume contains data other than DB2 data. Pink: Both log and object data reside on the volume.
61
Red: The volume cannot be backed up by ARY. In this case, the volumes TOTDDL and TOTDDM contain a mixture of DB2 and other data, and would be shown in pink. However, since the SMS copy pools are not yet defined, all of the volumes would be shown in red (bold in our figure). In many cases there will be a -NONE- volume displayed if DB2 Recovery Expert for z/OS finds table space or index space objects defined to Db2, but no data set has been defined for the object. In addition, archive logs that are still defined in the BSDS, but no longer exist, will cause a -NONE- volume to appear also. The "D" line command on the -NONE- volume will list of all the data sets DB2 Recovery Expert for z/OS expected to find but did not. Now that we have reviewed the subsystem setup information windows, it is time to build a list of things to do to reconfigure this DB2 subsystem to use the DB2 BACKUP SYSTEM UTILITY. Figure 4-2 on page 57 shows that we have a single ICF user catalog with three distinct classes of data. This will need to be corrected by creating new ICF user catalogs for the DB2 data and DB2 logs. Figure 4-3 on page 58 shows that some aliases reference multiple types of data (DB2 data and log data). Figure 4-6 on page 61 shows that the alias entry DB8GU references all three distinct types of data (DB2 table spaces, DB2 logs, and other data). We must rename the data sets and move from one ICF user catalog to another. Figure 4-4 on page 59 shows that the SMS copy pools have not been defined. We must define copy pools Figure 4-6 on page 61 shows that we also need to clean up the volumes TOTDDL and TOTDDM by moving the DB2 data and the log data off of the volume.
62
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
Volume TOTDDL
63
When the Enter key is pressed, the update user catalog information panel for the logs catalog shown in Figure 4-8 is displayed.
ARY$SSBU Option ===> ----- Update User Catalog Information ---- 2008/02/13 18:59:11
Subsystem: D8G1 User Catalog Name User Catalog Volume SMS Storage Class Data Parameters Tracks or Cylinders Primary Quantity Secondary Quantity Data Buffers Index Parameters Tracks or Cylinders Primary Quantity Secondary Quantity Index Buffers User Catalog Aliases ==> ==> ==> UCAT.DB8GLOGS DB8GLOG1
C 10 5 4
(Tracks/Cylinders)
C 1 1 4 DB8GL
(Tracks/Cylinders)
DB8GA
The panel is automatically populated with the catalog name and volume information that we provided. We will update the panel with space information and any aliases that we want associated with this ICF user catalog. We use the PF3 key or end command once we have completed filling in the information.
64
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
---------------- IDCAMS Input Cards ---------------SET MAXCC = 0 DEFINE USERCATALOG(NAME('UCAT.DB8GLOGS') STORCLAS(DB8GLOG1) CYLINDERS(10 5) ICFCATALOG) DATA (BUFND(4) CYLINDERS(10 5) CONTROLINTERVALSIZE(4096)) INDEX (BUFNI(4) CYLINDERS(1 1) CONTROLINTERVALSIZE(2048)) CAT(MCAT.ZOSR18.Z18CAT) DEFINE ALIAS (NAME(DB8GL) RELATE(UCAT.DB8GLOGS)) CATALOG(MCAT.ZOSR18.Z18CAT) DEFINE ALIAS (NAME(DB8GA) RELATE(UCAT.DB8GLOGS)) CATALOG(MCAT.ZOSR18.Z18CAT) Figure 4-9 IDCAMS interface module
From this module, we have three options: Edit the IDCAMS input. Online submission to create the new catalog immediately. Batch submission, which will create a batch job that can be submitted later. Since we do not have UPDATE access to the ICF master catalog, we need to use the batch submission option and have a user with appropriate authorization run the job for us. A panel is displayed for us to enter job card information and specify a data set where the generated JCL should be saved. Note: DB2 Recovery Expert for z/OS automatically determines the ICF master catalog name.
65
Since we elected to create both catalogs, when we have finished with the logs catalog, the update user catalog information for the DB2 data catalog is displayed. This panel is shown in Figure 4-10. We need to repeat the data entry steps as we did for the logs catalog.
ARY$SSBU Option ===> ----- Update User Catalog Information ---- 2008/02/13 19:04:03
Subsystem: D8G1 User Catalog Name User Catalog Volume SMS Storage Class Data Parameters Tracks or Cylinders Primary Quantity Secondary Quantity Data Buffers Index Parameters Tracks or Cylinders Primary Quantity Secondary Quantity Index Buffers User Catalog Aliases ==> ==> ==> UCAT.DB8GDATA DB8GDATA
C 10 5 4
(Tracks/Cylinders)
C 1 1 4
(Tracks/Cylinders)
4.3.3 Renaming and moving the BSDS and log data sets
Once the ICF user catalogs have been created, it is time to rename, re-catalog, and move the DB2 boot strap and active log data sets to their new volumes. DB2 Recovery Expert for z/OS can either rename or move the boot strap data sets. Both functions can also be performed in a single operation.
66
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
ARY$SSID ------ Subsystem Setup Information ----- 2008/02/14 16:06:44 Option ===> Scroll ===> PAGE ------------------------------------------------------------------------------Subsystem: D8G1 Active: No Datasharing: Yes Date of Last Analysis: 02/14/2008 Analysis Recommended: Y Message: Subsystem configuration allows only full restore (data and logs). ---------------------------------------------------Row 15 of 49 -+ Boot Strap Datasets R D8G1 - BSDS 1 DB8GU.D8G1.BSDS01 Volume TOTDDL D8G1 - BSDS 2 DB8GU.D8G1.BSDS02 Volume TOTDDM D8G2 - BSDS 1 DB8GU.D8G2.BSDS01 Volume TOTDDL D8G2 - BSDS 2 DB8GU.D8G2.BSDS02 Volume TOTDDM Line Cmds: (R-Rename BSDS, M-Move BSDS) Active D8G1 D8G1 D8G1 D8G1 D8G1 D8G1 Log Datasets - Log 1 DB8GU.D8G1.LOGCOPY1.DS01 - Log 1 DB8GU.D8G1.LOGCOPY1.DS02 - Log 1 DB8GU.D8G1.LOGCOPY1.DS03 - Log 2 DB8GU.D8G1.LOGCOPY2.DS01 - Log 2 DB8GU.D8G1.LOGCOPY2.DS02 - Log 2 DB8GU.D8G1.LOGCOPY2.DS03
We use the R line command as shown to rename a single boot strap data set. We can optionally rename or move all of the data sets in the section by using the line command on the section header line of the panel. Once the line command is ready, press Enter to process the command.
67
Figure 4-12 shows the boot strap data set rename panel. The panel is displayed after entering a line command in the boot strap data set section of the subsystem setup information panel.
ARY$SSBD ------- Boot Strap Dataset Rename ------- 2008/02/14 16:08:56 Option ===> ------------------------------------------------------------------------------Subsystem: D8G1 You have selected the Rename Boot Strap Dataset Function. You have entered this command on a detail line which updates the alias for DB8GU.D8G1.BSDS01. The New Boot Strap Alias will be substituted for the first node of the the existing dataset name. You may use a symbolic of &SSID for substituting the DB2 subsystem name. New Boot Strap Alias: DB8GL You may optionally specify the following: New Volume: New SMS Storage Class: DB8GLOG1 Ex: DB2&SSID
Press
On this panel, we enter the new high-level qualifier for the boot strap data sets. This must be one of the high-level qualifiers assigned to the ICF user catalog identified in Figure 4-7 on page 63. If we are moving the boot strap data sets, we also need to provide either the new volser or the SMS storage class where the data sets will be moved to. In this example, we are using the SMS storage class to control the volumes used for the new boot strap data set location. The values we entered are shown in bold in Figure 4-12. As shown at the bottom of the panel, press the Enter key to process our request. The IDCAMS interface module panel will be displayed.
68
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
Figure 4-13 shows the IDCAMS interface module. We have three options at this point. We can: Edit the IDCAMS input cards. Process the IDCAMS input online. Save the control cars in a batch job to be submitted later. In this example, we choose to save the input cards and process them as a batch job. We review the results of the batch job in Figure 4-17 on page 73.
ARY$IDCM Option ===> Action ==> B --------- IDCAMS Interface Module -------- 2008/02/14 16:48:37 Scroll ===> PAGE (E - EDIT, O - ONLINE SUBMISSION, B - BATCH SUBMISSION) Row 1 of 16 >
/*--------------------------------------------------------*/ DEFINE CLUSTER (NAME('DB8GL.D8G1.BSDS01') STORAGECLASS(DB8GLOG1) MODEL('DB8GU.D8G1.BSDS01')) IF MAXCC > 0 THEN CANCEL REPRO INDATASET('DB8GU.D8G1.BSDS01') OUTDATASET('DB8GL.D8G1.BSDS01') REPLACE
69
Valid Primary Cmds: (Analyze, Reanalyze) Figure 4-14 Rename active log data sets
Note: The DB2 subsystem owning the active log data sets that are being moved/renamed must not be active during the move/rename process. This includes the process of generating the commands as DB2 has the data sets allocated. We can use the R line command as shown to rename all of the active log data sets in the data sharing group. We can optionally rename or move individual active log data sets in the section by using the line command on an individual data set line of the panel. Once the line command is ready, press Enter to process the command.
70
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
Figure 4-15 shows the active log data set rename panel. On this panel, we enter the new high-level qualifier for the active log data sets. This must be one of the high-level qualifiers assigned to the Log/BSDS ICF user catalog identified in Figure 4-7 on page 63.
ARY$SSAH ------- Active Log Dataset Rename ------- 2008/02/14 17:01:39 Option ===> ------------------------------------------------------------------------------Subsystem: D8G1 You have selected the Rename Active Log Dataset Function. You have entered this command on a header line which update the alias for all Active Log datasets in the list. The New Active Log Alias will be substituted for the first node of the the existing dataset names. You may use a symbolic of &SSID for substituting the DB2 subsystem name. New Boot Strap Alias: DB8GL You may optionally specify the following: New Volume: New SMS Storage Class: DB8GLOG1 Ex: DB2&SSID
Press
Since we are moving the active log data sets, we also need to provide either the new volser or the SMS storage class where the data sets will be moved to. In this example, we are using the SMS storage class to control the volumes used for the new active log data set location. The values we entered are shown in bold in Figure 4-15. We press the Enter key to process the command and display the IDCAMS interface module.
71
Figure 4-16 shows the IDCAMS interface module. We have three options at this point. We can: Edit the IDCAMS input cards. Process the IDCAMS input online. Save the control cards in a batch job to be submitted later. In this example, we choose to edit the input cards to specify different SMS storage classes for the logcopy1 and logcopy2 data sets. Then we save the input cards and process them as a batch job.
ARY$IDCM Option ===> Action ==> B --------- IDCAMS Interface Module -------- 2008/02/14 16:48:37 Scroll ===> PAGE (E - EDIT, O - ONLINE SUBMISSION, B - BATCH SUBMISSION) Row 1 of 16 >
/*--------------------------------------------------------*/ DEFINE CLUSTER (NAME('DB8GL.D8G1.LOGCOPY1.DS01') STORAGECLASS(DB8GLOG1) MODEL('DB8GU.D8G1.LOGCOPY1.DS01')) IF MAXCC > 0 THEN CANCEL REPRO INDATASET('DB8GU.D8G1.LOGCOPY1.DS01') OUTDATASET('DB8GL.D8G1.LOGCOPY1.DS01') REPLACE
Let us review what has been accomplished so far. Figure 4-17 on page 73 shows the results of a re-analysis of our DB2 data sharing group after we have completed the previous steps. Note the following changes in bold in Figure 4-17 on page 73: The ICF user catalogs for the BSDS/logs and the DB2 table space data sets have been created. The new catalogs appear in the New MVS User Catalogs to be used by this DB2 Subsystem section of the display. The SMS copy pools have been defined. They will now appear in blue on the panel if the default ISPF color settings have not been changed. The boot strap data sets have been renamed and recataloged. The active log data sets have been renamed and recataloged. The new alias that we used for the BSDS and logs appears in the Alias used with associated MVS User Catalogs section. The volumes DB8GL1 and DB8GL2 now appear in the Volumes used by this DB2 Subsystem section. Volumes DB8GL1, DB8GL2, and DB8GS1 are shown as being associated with a SMS copy pool.
72
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
ARY$SSID ------ Subsystem Setup Information ----- 2008/02/14 18:21:33 Option ===> Scroll ===> PAGE ------------------------------------------------------------------------------Subsystem: D8G1 Active: Yes Datasharing: Yes Date of Last Analysis: 02/14/2008 Analysis Recommended: Y Message: Subsystem configuration prevents system level backup. ---------------------------------------------------Row 1 of 54 + New MVS User Catalogs to be used by this DB2 Subsystem Log/BSDS Catl UCAT.DB8GLOGS Volume DB8GL1 DB2 Data Catl UCAT.DB8GDATA Volume DB8GD1 Line Cmds: (C-Create, A-Add Alias, D-Dataset Disp, U-Update, V-View Alias) Existing MVS User Catalogs used by this DB2 Subsystem Log UCAT.DB8GLOGS Data Other UCAT.TOTDDL Line Cmds: (D-Dataset Display, V-View Aliases) Storage Copy Pools Data Copy Pool DSN$DB8G$DB Log Copy Pool DSN$DB8G$LG Backup Pool DB8GCPB Line Cmds: (V-Volume List) Boot Strap Datasets D8G1 - BSDS 1 DB8GL.D8G1.BSDS01 D8G1 - BSDS 2 DB8GL.D8G1.BSDS02 D8G2 - BSDS 1 DB8GL.D8G2.BSDS01 D8G2 - BSDS 2 DB8GL.D8G2.BSDS02 Line Cmds: (R-Rename BSDS, M-Move BSDS) Active D8G1 D8G1 D8G1 D8G1 D8G1 D8G1 D8G2 D8G2 D8G2 D8G2 D8G2 D8G2 Line Log Datasets - Log 1 DB8GL.D8G1.LOGCOPY1.DS01 - Log 1 DB8GL.D8G1.LOGCOPY1.DS02 - Log 1 DB8GL.D8G1.LOGCOPY1.DS03 - Log 2 DB8GL.D8G1.LOGCOPY2.DS01 - Log 2 DB8GL.D8G1.LOGCOPY2.DS02 - Log 2 DB8GL.D8G1.LOGCOPY2.DS03 - Log 1 DB8GL.D8G2.LOGCOPY1.DS01 - Log 1 DB8GL.D8G2.LOGCOPY1.DS02 - Log 1 DB8GL.D8G2.LOGCOPY1.DS03 - Log 2 DB8GL.D8G2.LOGCOPY2.DS01 - Log 2 DB8GL.D8G2.LOGCOPY2.DS02 - Log 2 DB8GL.D8G2.LOGCOPY2.DS03 Cmds: (R-Rename Log, M-Move Log)
Volume Volume
DB8GL1 TOTDDL
Volume Volume Volume Volume Volume Volume Volume Volume Volume Volume Volume Volume
DB8GL1 DB8GL1 DB8GL1 DB8GL2 DB8GL2 DB8GL2 DB8GL1 DB8GL1 DB8GL1 DB8GL2 DB8GL2 DB8GL2
Alias used with associated MVS User Catalogs DB8GL UCAT.DB8GLOGS Log DB8GU UCAT.TOTDDL Data Other DB8GUS UCAT.TOTDDL Data Line Cmds: (D-Dataset Display, M-Merge catalog entries, R-Rename Alias) Volumes used by this DB2 Subsystem Volume Data DataCat ActLog ActCat ArcLog ArcCat Other Pool DB8GL1 No No Yes Yes No No No Yes DB8GL2 No No Yes No No No No Yes DB8GS1 Yes No No No No No No Yes TOTDDL Yes Yes No No No No Yes No TOTDDM Yes No No No No No Yes No TOTDDZ Yes No No No No No No No Line Cmds: (D-Dataset Display, M-Move all Datasets on Volume) ***************************** Bottom of Data ********************************** Valid Primary Cmds: (Analyze, Reanalyze)
Figure 4-17 Subsystem information after BSDS and log renames Chapter 4. Configuring DB2 for system backup and restore
73
4.3.4 Moving the DB2 table space data sets to new volumes
Now we are ready to move your DB2 table space data sets to their new volumes. This process is done either one data set at a time or one volume at a time. In this case, we move data sets one volume at a time. We use the M line command as shown in Figure 4-18 to bring up the DB2 data set move panel shown in Figure 4-19 on page 75.
ARY$SSID ------ Subsystem Setup Information ----- 2008/02/14 18:34:19 Option ===> Scroll ===> PAGE ------------------------------------------------------------------------------Subsystem: D8G1 Active: Yes Datasharing: Yes Date of Last Analysis: 02/14/2008 Analysis Recommended: Y Message: Subsystem configuration prevents system level backup. ---------------------------------------------------Row 40 of 54 -+ Alias used with associated MVS User Catalogs DB8GL UCAT.DB8GLOGS Log DB8GU UCAT.TOTDDL Data Other DB8GUS UCAT.TOTDDL Data Line Cmds: (D-Dataset Display, M-Merge catalog entries, R-Rename Alias) Volumes used by this DB2 Subsystem Volume Data DataCat ActLog DB8GL1 No No Yes DB8GL2 No No Yes DB8GS1 Yes No No M TOTDDL Yes Yes No TOTDDM Yes No No TOTDDZ Yes No No Line Cmds: (D-Dataset Display, M-Move Valid Primary Cmds: (Analyze, Reanalyze) Figure 4-18 Moving all data sets on a volume
ArcCat No No No No No No Volume)
We can move all data sets on one volume by using the M line command on a volume listed in the Volumes used by this subsystem list.
74
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
Press
On this panel we enter the volume where we want the data to be moved or the new SMS storage class to be used for the data sets. In this example, we are moving from a non-SMS volume to an SM-managed system, so we enter the storage class and let SMS handle data set placement. The movement of DB2 table space data sets is repeated for each volume where we no longer want to have DB2 table spaces. In this example, we are moving table space data sets off of TOTDDL, TOTDDZ, and TOTDDM. Volumes TOTDDL and TOTDDM contain data sets that use the same high-level qualifier as the DB2 table space data sets. These other data sets need to be renamed to use a different high-level qualifier before we can proceed with the final step. Note: If any of the data sets on the volume are DB2 system catalog or directory data sets, then DB2 Recovery Expert for z/OS detects this and generates a stop for the subsystem. In a data sharing environment, we need to manually stop the members running on other LPARs.
75
4.3.5 Merging the DB2 table space alias to its new ICF user catalog
We are now ready to merge the alias for the DB2 table space data sets to its new ICF user catalog. In this case, we have two high-lever qualifiers to merge. They are DB8GU and DB8GUS. We use DB8GU for our model. We start by using the M line command next to the alias that we want to merge, as shown in Figure 4-20.
ARY$SSID ------ Subsystem Setup Information ----- 2008/02/14 18:34:19 Option ===> Scroll ===> PAGE ------------------------------------------------------------------------------Subsystem: D8G1 Active: Yes Datasharing: Yes Date of Last Analysis: 02/14/2008 Analysis Recommended: Y Message: Subsystem configuration prevents system level backup. ---------------------------------------------------Row 40 of 54 -+ Alias used with associated MVS User Catalogs DB8GL UCAT.DB8GLOGS Log M DB8GU UCAT.TOTDDL Data DB8GUS UCAT.TOTDDL Data Line Cmds: (D-Dataset Display, M-Merge catalog entries, R-Rename Alias) Volumes used by this DB2 Subsystem Volume Data DataCat ActLog DB8GL1 No No Yes DB8GL2 No No Yes DB8GS1 Yes No No TOTDDL Yes Yes No TOTDDM Yes No No TOTDDZ Yes No No Line Cmds: (D-Dataset Display, M-Move Valid Primary Cmds: (Analyze, Reanalyze)
ArcCat No No No No No No Volume)
The job card information window shown in Figure 4-21 is displayed. The panel contains the data the we entered previously. Press the Enter key to edit the generated job.
Edit Generated Job Y (Yes/No) PAOLOR5.JCL.CNTL CATLOGS
Job Cards: ==> //PAOLOR5C JOB (999,POK),HUBBARD, ==> // NOTIFY=&SYSUID,CLASS=A,MSGCLASS=X, ==> // MSGLEVEL=(1,1),REGION=0M ==> //* Press ENTER to process or PF3 to Cancel
The generated JCL to merge the catalog entries is shown in Example 4-1 on page 77. Because we have two alias entries to merge, we need to edit the IDCAMS input cards to add the second alias. The edited control cards are shown in bold in Example 4-1 on page 77. 76
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
Note: The generated job contains a step to automatically stop the DB2 subsystem that we used when we collected the configuration information. We need to be sure to include the JOBPARM JCL card to ensure that the job runs on the LPAR where that DB2 subsystem is active.
Note: Since this is a data sharing group, we must manually shut down all other members of the group running on other LPARs or the job will fail. The DB2 table space data sets can not be in use while the mergecat is running.
Example 4-1 JCL and control cards to merge catalog alias //PAOLOR5C JOB (999,POK),HUBBARD, // NOTIFY=&SYSUID,CLASS=A,MSGCLASS=X, // MSGLEVEL=(1,1),REGION=0M //* /*JOBPARM SYSAFF=SC53 //* //* //** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //* //* STEP: DB2STOP //* //* DESC: THIS STEP WILL STOP DB2 SUBSYSTEM D8G1 //* //** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //* //DB2STOP EXEC PGM=ARY#SDB2,COND=(4,LT),PARM=(D8G1,STOP) //STEPLIB DD DISP=SHR,DSN=ARY.V2R1M0.SARYLOAD //DB2PARMS DD DISP=SHR,DSN=ARY.DB2PARMS.CONTROL //SYSPRINT DD SYSOUT=* //* //** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //* //* STEP: IDCAMS //* //* DESC: THIS STEP WILL EXECUTE THE IDCAMS JOB. //* //** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //* //**************************************************************** //* IDCAMS JOB STEP * //**************************************************************** //IDCAMS EXEC PGM=IDCAMS,REGION=0M,COND=(4,LT) //SYSPRINT DD SYSOUT=* //SYSIN DD * ALTER UCAT.TOTDDL LOCK IF MAXCC > 0 THEN CANCEL ALTER UCAT.DB8GDATA LOCK IF MAXCC > 0 THEN CANCEL REPRO INDATASET(UCAT.TOTDDL) OUTDATASET(UCAT.DB8GDATA) LEVEL(DB8GU) -
* * * * * * * * * * * *
* * * * * * * * * * *
77
MERGECAT IF MAXCC > 0 THEN CANCEL REPRO INDATASET(UCAT.TOTDDL) OUTDATASET(UCAT.DB8GDATA) LEVEL(DB8GUS) MERGECAT IF MAXCC > 0 THEN CANCEL DELETE DEFINE DB8GU ALIAS ALIAS (NAME(DB8GU) REL(UCAT.DB8GDATA))
ALTER UCAT.TOTDDL UNLOCK ALTER UCAT.DB8GDATA UNLOCK //** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //* * //* STEP: DB2START * //* * //* DESC: THIS STEP WILL START DB2 SUBSYSTEM D8G1 * //* * //** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //* * //DB2START EXEC PGM=ARY#SDB2,COND=(4,LT),PARM=(D8G1,START) //STEPLIB DD DISP=SHR,DSN=ARY.V2R1M0.SARYLOAD //DB2PARMS DD DISP=SHR,DSN=ARY.DB2PARMS.CONTROL //SYSPRINT DD SYSOUT=* //* /* //* //** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //* * //* STEP: UPDSTAT * //* * //* DESC: THIS STEP WILL UPDATE THE ANALYSIS STATUS INDICATOR. * //* * //** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //* * //**************************************************************** //* UPDATE ANALYSIS STATUS INDICATOR * //**************************************************************** //UPDSTAT EXEC PGM=ARY#SUPD,COND=(4,LT),PARM=(D8G1) //STEPLIB DD DISP=SHR,DSN=ARY.V2R1M0.SARYLOAD //ARYMOVER DD DISP=SHR,DSN=ARY.SG7606.MOVDATA //SYSPRINT DD SYSOUT=* //* **************************** Bottom of Data ****************************
78
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
ARY$SSID ------ Subsystem Setup Information ----- 2008/02/15 15:36:55 Option ===> Scroll ===> CSR ------------------------------------------------------------------------------Subsystem: D8G1 Active: Yes Datasharing: Yes Date of Last Analysis: 02/15/2008 Analysis Recommended: Y Message: Subsystem configuration is optimal. ---------------------------------------------------Row 1 of 53 + New MVS User Catalogs to be used by this DB2 Subsystem Log/BSDS Catl UCAT.DB8GLOGS Volume DB8GL1 DB2 Data Catl UCAT.DB8GDATA Volume DB8GD1 Line Cmds: (C-Create, A-Add Alias, D-Dataset Disp, U-Update, V-View Alias) Existing MVS User Catalogs used by this DB2 Subsystem Data UCAT.DB8GDATA Log UCAT.DB8GLOGS Line Cmds: (D-Dataset Display, V-View Aliases) Storage Copy Pools Data Copy Pool DSN$DB8G$DB Log Copy Pool DSN$DB8G$LG Backup Pool DB8GCPB Line Cmds: (V-Volume List) Boot Strap Datasets D8G1 - BSDS 1 DB8GL.D8G1.BSDS01 D8G1 - BSDS 2 DB8GL.D8G1.BSDS02 D8G2 - BSDS 1 DB8GL.D8G2.BSDS01 D8G2 - BSDS 2 DB8GL.D8G2.BSDS02 Line Cmds: (R-Rename BSDS, M-Move BSDS) Active D8G1 D8G1 D8G1 D8G1 D8G1 D8G1 D8G2 D8G2 D8G2 D8G2 D8G2 D8G2 Line Log Datasets - Log 1 DB8GL.D8G1.LOGCOPY1.DS01 - Log 1 DB8GL.D8G1.LOGCOPY1.DS02 - Log 1 DB8GL.D8G1.LOGCOPY1.DS03 - Log 2 DB8GL.D8G1.LOGCOPY2.DS01 - Log 2 DB8GL.D8G1.LOGCOPY2.DS02 - Log 2 DB8GL.D8G1.LOGCOPY2.DS03 - Log 1 DB8GL.D8G2.LOGCOPY1.DS01 - Log 1 DB8GL.D8G2.LOGCOPY1.DS02 - Log 1 DB8GL.D8G2.LOGCOPY1.DS03 - Log 2 DB8GL.D8G2.LOGCOPY2.DS01 - Log 2 DB8GL.D8G2.LOGCOPY2.DS02 - Log 2 DB8GL.D8G2.LOGCOPY2.DS03 Cmds: (R-Rename Log, M-Move Log)
Volume Volume
DB8GD1 DB8GL1
Volume Volume Volume Volume Volume Volume Volume Volume Volume Volume Volume Volume
DB8GL1 DB8GL1 DB8GL1 DB8GL2 DB8GL2 DB8GL2 DB8GL1 DB8GL1 DB8GL1 DB8GL2 DB8GL2 DB8GL2
Alias used with associated MVS User Catalogs DB8GL UCAT.DB8GLOGS Log DB8GU UCAT.DB8GDATA Data DB8GUS UCAT.DB8GDATA Data Line Cmds: (D-Dataset Display, M-Merge catalog entries, R-Rename Alias) Volumes used by this DB2 Subsystem Volume Data DataCat ActLog DB8GD1 Yes Yes No DB8GD2 Yes No No DB8GL1 No No Yes DB8GL2 No No Yes DB8GS1 Yes No No Line Cmds: (D-Dataset Display, M-Move
ArcCat No No No No No Volume)
Other No No No No No
79
Take special note of the following changes since our initial analysis: The message in the header now reads Subsystem configuration is optimal. This was our goal when we started. The volumes TOTDDJ, TOTDDM, and TOTDDZ are no longer in the list of volumes used by this DB2 data sharing group. Those volumes no longer contain BSDS data sets, active log data sets, or DB2 table space data sets associated with this DB2 data sharing group. DB2 BSDS and active log data sets are on their own set of volumes along with the associated ICF user catalog. DB2 table space data sets are on their own set of volumes along with the associated ICF user catalog. There are no other data sets in the list of volumes used by this data sharing group. Note: It is extremely important that the DB2 subsystem be optimally configured before using system level backups. Using system level backups of an improperly configured subsystem or data sharing group can cause unpredictable results.
4.4 Profiles
IBM DB2 Recovery Expert for z/OS System Backup and Restore Services (SBRS) allows you to back up and restore entire subsystems, individual objects, or groups of objects. Profiles are used to store the options selected for a particular backup or restore process. DB2 Recovery Expert for z/OS supports and manages the following types of profiles: Backup profiles Object recovery profiles Disaster recovery profiles Note: Recovery Expert stores the profile specifications described in this chapter in the repository described at System Backup and Restore Services VSAM repository on page 8.
80
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
to the source or target volume configuration or unless System Backup and Restore Services detects certain errors while building a backup job. In this case, the profile is flagged as Setup Needed on the Update Backup Profile panel. When building a backup job, if profile setup is needed, it is included as the first job step in the JCL. If you request it, System Backup and Restore Services can build only the profile setup syntax in the JCL. In this case, no backup is taken. This entire process is described in more detail in 5.2, System level backup and restore using Recover Expert ISPF-based System Backup and Restore Services on page 99.
81
Creating, building, and maintaining disaster recovery profiles is discussed in Chapter 5, Local system level backup and restore on page 83.
82
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
Chapter 5.
83
5.1 System level backup using DB2 and Recovery Expert GUI to perform the restore
As of DB2 V8, two new utilities, BACKUP SYSTEM and RESTORE SYSTEM, are provided to utilize and exploit DFSMShsm to take advantage of the fast replication support that was introduced in z/OS V1R5. BACKUP SYSTEM is a method used for creating a system level point-in-time (PIT) backup, and the RESTORE SYSTEM utility is used to recover the entire system. Use the RESTORE SYSTEM utility only when you want to recover a subsystem or data sharing group to an arbitrary point in time including the most current one (PK51979). The utility restores only the database copy pool and then applies logs until it reaches a point in the log equal to the log truncation point specified in a point-in-time conditional restart control record (SYSPITR CRCR) created with DSNJU003 or the end of the log. If you want to restore a full system (including the logs) to the point at which a backup was taken, do not use the RESTORE SYSTEM utility. Use the native DFSMShsm FRRECOV COPYPOOL(cpname) GEN(gen) to restore both database and log copy pools. Then start DB2, which will use normal restart recovery processing to back out inflight URs. In DB2 9 these utilities were enhanced to use new functions available with z/OS V1R8 DFSMShsm. Appendix C, Storage and DB2 functions on page 209, provides an overview of the advanced storage (disk and tape) and DB2 functions that are utilized for backup and restore of DB2 subsystems and the recovery of DB2 objects from volume dumps. The disk functions are provided by the family of Enterprise Storage Servers and follow-on devices. In the next sections we detail the following seven steps for the backup and restore of a DB2 subsystem or data sharing group: Step 1 - Run a BACKUP SYSTEM utility. Step 2 - Build RESTORE SYSTEM jobs. Step 3 - Prepare the environment for RESTORE SYSTEM. Step 4 - Start DB2. Step 5 - Verify that ICF catalogs volumes are not in use by the catalog. Step 7 - STOP and reSTART DB2.
Note: In a data sharing environment, the submitting member records the version in its BSDS and also in the SCA. If you want to see the latest backup system entry, run DSNJU004 with the GROUP DD statement pointing to the BSDS data sets. This will merge all the BSDS information from all the members. During the system level backup, DB2 will record a recovery base log point (RBLP) in the header page of DBD01. The RBLP is identified as the most recent system checkpoint prior to a backup log point, and is the point at which DB2 starts scanning logs during a RESTORE SYSTEM recovery operation. Note: All the BACKUP SYSTEM versions are tracked in the BSDS, whereas the RBLP in DBD01 is updated (overwritten) every time that the BACKUP SYSTEM is run. With DB2 V8 there are two options available when running the BACKUP SYSTEM utility: FULL - This option allows you to copy both the database copy pool and the log copy pool. This is also the default. DATA ONLY - This option allows you to copy the database copy pool only. The log copy pool is not copied. Execute the BACKUP SYSTEM (DB2 Utility) outside of the Recovery Expert product. Recovery Expert does not build a BACKUP SYSTEM job stream in the GUI interface. Example 5-1 shows the JCL for BACKUP SYSTEM.
Example 5-1 BACKUP SYSTEM JCL
//BACKUP EXEC DSNUPROC,SYSTEM=D9CG, // UID='SYSBACK' //STEPLIB DD DISP=SHR,DSN=DB9C9.SDSNEXIT // DD DISP=SHR,DSN=DB9C9.SDSNLOAD //SYSIN DD * BACKUP SYSTEM FULL Example 5-2 shows the job output of the BACKUP SYSTEM.
Example 5-2 FAST REPLICATION output in DFSMShsm for the DB COPYPOOL
ARC1801I FAST REPLICATION BACKUP IS STARTING FOR COPY POOL DSN$DB9C$DB, AT 17:07:44 ON 2008/02/12, TOKEN=X'C4F9C3F1C1F0D91FD1AE7903C1F0D58C8ED3' ARC0640I ARCFRTM - PAGE 0001 5695-DF175 DFSMSDSS V1R09.0 DATA SET SERVICES 2008.043 17:07 ARC0640I ARCFRTM - ADR035I (SCH)-PRIME(06), INSTALLATION EXIT ALTERED BYPASS FAC CLASS CHK DEFAULT TO YES ARC0640I ARCFRTM - PARALLEL ARC0640I ARCFRTM - ADR101I (R/I)-RI01 (01), TASKID 001 HAS BEEN ASSIGNED TO COMMAND 'PARALLEL' ARC0640I ARCFRTM - COPY IDY(SBOX5S) ODY(SBOX6A) DUMPCOND FR(REQ) PUR ALLX ALLD(*) ARC0640I ARCFRTM - ADR101I (R/I)-RI01 (01), TASKID 002 HAS BEEN ASSIGNED TO COMMAND 'COPY ... ... ARC0640I ARCFRTM - ADR012I (SCH)-DSSU (01), 2008.043 17:07:45 DFSMSDSS PROCESSING COMPLETE. HIGHEST RETURN CODE IS 0000 ARC1805I THE FOLLOWING 00004 VOLUME(S) WERE SUCCESSFULLY PROCESSED BY FAST REPLICATION BACKUP OF COPY POOL DSN$DB9C$DB ARC1805I (CONT.) SBOX5S ARC1805I (CONT.) SBOX5T ARC1805I (CONT.) SBOX5U ARC1805I (CONT.) SBOX5V ARC1802I FAST REPLICATION BACKUP HAS COMPLETED FOR COPY POOL DSN$DB9C$DB, AT 17:07:45 ON 2008/02/12, FUNCTION RC=0000, MAXIMUM VOLUME RC=0000
85
Example 5-3 shows the output of the FAST REPLICATION tasks performed by DFSMShsm for the DB and LOG COPYPOOLS.
Example 5-3 FAST REPLICATION output in DFSMShsm for the LOG COPYPOOL
ARC1801I FAST REPLICATION BACKUP IS STARTING FOR COPY POOL DSN$DB9C$LG, AT 17:07:45 ON 2008/02/12, TOKEN=X'C4F9C3F1C1F0D91FD1AE7903C1F0D58C8ED3' ARC0640I ARCFRTM - PAGE 0001 5695-DF175 DFSMSDSS V1R09.0 DATA SET SERVICES 2008.043 17:07 ARC0640I ARCFRTM - ADR035I (SCH)-PRIME(06), INSTALLATION EXIT ALTERED BYPASS FAC CLASS CHK DEFAULT TO YES ARC0640I ARCFRTM - PARALLEL ARC0640I ARCFRTM - ADR101I (R/I)-RI01 (01), TASKID 001 HAS BEEN ASSIGNED TO COMMAND 'PARALLEL' ARC0640I ARCFRTM - COPY IDY(SBOX5Q) ODY(SBOX6G) DUMPCOND FR(REQ) PUR ALLX ALLD(*) ARC0640I ARCFRTM - ADR101I (R/I)-RI01 (01), TASKID 002 HAS BEEN ASSIGNED TO COMMAND 'COPY ' .. .. ARC0640I ARCFRTM - ADR241I (003)-DDTFP(01), TARGET VTOC BEGINNING AT 000005:0000 AND ENDING AT 000016:0014 IS OVERLAID ARC0640I ARCFRTM - ADR806I (003)-T0MI (02), VOLUME SBOX5R WAS COPIED USING A FAST REPLICATION FUNCTION ARC0640I ARCFRTM - ADR006I (003)-STEND(02), 2008.043 17:07:46 EXECUTION ENDS ARC0640I ARCFRTM - ADR013I (003)-CLTSK(01), 2008.043 17:07:54 TASK COMPLETED WITH RETURN CODE 0000 ARC0640I ARCFRTM - ADR006I (019)-STEND(01), 2008.043 17:07:46 EXECUTION BEGINS .. .. ARC1805I (CONT.) SBOX5L ARC1805I (CONT.) SBOX5M ARC1805I (CONT.) SBOX5N ARC1805I (CONT.) SBOX5O ARC1805I (CONT.) SBOX5P ARC1802I FAST REPLICATION BACKUP HAS COMPLETED FOR COPY POOL DSN$DB9C$LG, AT 17:07:55 ON 2008/02/12, FUNCTION RC=0000, MAXIMUM VOLUME RC=0000
86
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
From the GUIs launchpad select the Recovery function window. See Figure 5-1.
Next you can select the DB2 subsystem that you want to recover. The options are: z/OS subsystems z/OS data sharing groups z/OS systems z/OS sysplexes
87
In our example (Figure 5-2) we connect to the DB2 subsystem that we want to recover, from the z/OS Data Sharing Groups selection list.
Member D9C1 is selected. The DB2 subsystem information, such as current restart RBA, last checkpoint, the current active log information, and so on, is shown in the Status window.
88
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
In Figure 5-3 we select member D9C1 and connect to the DB2 subsystem.
89
You now select the Timestamp as the point in time to which you want to recover. The details are shown in Figure 5-4.
Ensure that you select the explicit option for Recovery Expert to read the latest backup system information from the BSDS as your selection choice. You can run DSNJU004 to list the contents of the BSDS as shown in Example 5-4.
Example 5-4 BSDS BACKUP SYSTEM UTILITY HISTORY output from DSNJU004 BACKUP SYSTEM UTILITY HISTORY SUBSYSTEM ID D9C1 20:11:08 FEBRUARY 11, 2008 START STCK DATA COMPLETE DATA/LOG COMPLETE DATA LOG RBLP LRSN DATE LTIME ---------------- ---------------- ------------ ------------ -------------------C1EBB66942D63C09 C1EBB66C54A45D43 C1EA802CE63B C1EBB675C2D2 2008/02/08 15:06:02 TOKEN = C4F9C3F1C1EBB66942D63C09C1EA802CE63B C1EA8EA7799EE44E C1EA8EA9FB0E8443 C1EA802CE63B C1EA8EB4F110 2008/02/07 17:02:51 TOKEN = C4F9C3F1C1EA8EA7799EE44EC1EA802CE63B
90
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
You have to choose Recovery History Events (Figure 5-5) to view the time stamp that is recorded in the BSDS BACKUP SYSTEM UTILITY HISTORY section.
Once you select the time stamp or Logpoint (see Figure 5-5), the associated RBA will be populated as your RBA and will be the time stamp (used for point-in-time system level recovery) to restore to. In this same selection you can choose whether you want to recover the data and the logs or just the data.
91
Note: The DB2 RESTORE utility only restores the data. Next you have the choice to generate the JCL and jobs to restore the subsystem. See Figure 5-6 for the setting up of the generation.
92
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
Figure 5-7 shows the generated JCL. Here you also have the choice to edit the JCL, like the JOBNAME, if needed.
Figure 5-8 shows the window where you will be prompted to export the JCL to a z/OS data set or local file on your workstation. You have to export both jobs (JOB1 and JOB2) separately. Note: The output data set name that you want to export the generated JCL into must not be in use. Recovery Expert requires exclusive control (DISP=OLD) of the data set.
Note: In a Data Sharing environment you have to run JOB1 for each member. This is the job that will update the BSDS with a SYSPITR CRCR entry. Currently, Recovery Expert (in the GUI environment only) generates only one job. You have to clone this JCL in the z/OS data set for each data sharing member.
93
Step 3.1 - Create the SYSPITR CRCR for each DB2 subsystem
Recovery Expert generated two jobs. One is for creating a SYSPITR CRCR (conditional restart control record) called JOB1, which you saved into a PDS in step 2. The other job, JOB2, is the actual RESTORE SYSTEM job that you will run in step 6. The Recovery Expert ISPF-based system restore (as explained later) creates the CRCR jobs for all members. JOB1 is a DB2 DSNJU003 utility that you need to run for each of the DB2 members and that specifies a log truncation point that corresponds to the selected point in time. See Example 5-5. In our example we run JOB1 for D9C2 and D9C2.
Example 5-5 DSNJU003 - Recovery Expert JOB1 //D9C1CRCR //* //STEPLIB // //SYSPRINT //SYSUT1 //SYSUT2 //SYSIN CRESTART EXEC PGM=DSNJU003 DD DISP=SHR,DSN=DB9C9.SDSNEXIT DD DISP=SHR,DSN=DB9C9.SDSNLOAD DD SYSOUT=* DD DISP=SHR,DSN=DB9CL.D9C1.BSDS01 DD DISP=SHR,DSN=DB9CL.D9C1.BSDS02 DD * CREATE,SYSPITR=C1F0D92A16DB,FORWARD=YES,BACKOUT=YES
94
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
In our example we have the DB2 lock structure (LOCK1) and the shared communications area (SCA) to be rebuilt. Example 5-8 shows the command and related output to delete the lock structure.
Example 5-8 Deleting the lock structure SETXCF FORCE,STRUCTURE,STRNAME=DB9CG_LOCK1 IXC579I NORMAL DEALLOCATION FOR STRUCTURE DB9CG_LOCK1 IN 064 COUPLING FACILITY 002094.IBM.02.00000002991E PARTITION: 0F CPCID: 00 HAS BEEN COMPLETED. PHYSICAL STRUCTURE VERSION: C1F0D586 6171CEC6 INFO116: 132C2081 01 2800 00000011 TRACE THREAD: 001079E8. IXC353I THE SETXCF FORCE REQUEST FOR STRUCTURE 065 DB9CG_LOCK1 WAS COMPLETED: STRUCTURE DELETED BUT ALSO RESULTED IN DELETED CONNECTION(S)
95
Example 5-9 shows the command and related output to delete the SCA structure.
Example 5-9 Deleting the SCA structure SETXCF FORCE,STRUCTURE,STRNAME=DB9CG_SCA IXC579I NORMAL DEALLOCATION FOR STRUCTURE DB9CG_SCA IN 067 COUPLING FACILITY 002094.IBM.02.00000002991E PARTITION: 0F CPCID: 00 HAS BEEN COMPLETED. PHYSICAL STRUCTURE VERSION: C1F0D585 326CFE84 INFO116: 132C2081 01 2800 00000010 TRACE THREAD: 001079F7. IXC353I THE SETXCF FORCE REQUEST FOR STRUCTURE 068 DB9CG_SCA WAS COMPLETED: STRUCTURE WAS DELETED
Once both structures have been deleted, you can issue another display to verify that the cleanup took place as in Example 5-10.
Example 5-10 Display to verify delete D XCF,STR IXC359I 17.18.01 STRNAME DB9CG_LOCK1 DB9CG_SCA DISPLAY XCF 070 ALLOCATION TIME -----
TYPE
DSNY001I -D9C2 SUBSYSTEM STARTING DSNJ127I -D9C2 SYSTEM TIMESTAMP FOR BSDS= 08.043 17:14:24.32 142 DSNJ245I -D9C2 CONDITIONAL RESTART RECORD INDICATES TRUNCATION AT LRSN C1F0D92A16DB. REPLY Y TO CONTINUE, N TO CANCEL -D9C1 START DB2 DB2 is restarted with ACCESS(MAINT). See Example 5-12.
Example 5-12 DB2 restarted with ACCESS(MAINT)
-D9C1 DSNRRPRC DB2 STARTED IN SYSTEM RECOVER PENDING MODE -D9C1 RESTART COMPLETED -D9C1 DSNYSTRT DB2 WAS STARTED WITH ACCESS(MAINT)
96
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
IXC582I STRUCTURE DB9CG_SCA ALLOCATED BY SIZE/RATIOS. 080 PHYSICAL STRUCTURE VERSION: C1F0DB95 26B4AAD6 STRUCTURE TYPE: LIST CFNAME: CF1 ALLOCATION SIZE: 8192 K POLICY SIZE: 49152 K POLICY INITSIZE: 8192 K POLICY MINSIZE: 0 K IXLCONN STRSIZE: 0 K ENTRY COUNT: 6464 ELEMENT COUNT: 12607 ENTRY:ELEMENT RATIO: 1 : 2 ALLOCATION SIZE IS WITHIN CFRM POLICY DEFINITIONS IXL014I IXLCONN REQUEST FOR STRUCTURE DB9CG_SCA 081
Step 5 - Verify that ICF catalogs volumes are not in use by the catalog
This is a very critical step for the RESTORE SYSTEM to complete successfully. If any of the volumes are in use by the catalog address space or the LOG and DATA catalogs are still open, the RESTORE SYSTEM (which needs them for the APPLY phase) will not complete, and you may spend a long time troubleshooting the problem. Note: The ICF catalog for the data must be on a separate volume from the ICF catalog for the logs. Your implementation of your SMS and copy pools will affect this task.
Note: Ensure that the DB2 9 address space for the administrative scheduler is also shut down before you verify that the ICF catalog volumes are down. Here is an example of how to shut down the address space: F xxxxADMT,APPL=SHUTDOWN You need to UNALLOCATE your ICF catalogs. In our example, we have two user catalogs to close: UCAT.DB9CLOGS and UCAT.DB9CDATA. See Example 5-14. Note: Although the UNALLOCATE command CLOSEs the ICF catalogs, we chose to CLOSE the ICF CATALOGS separately to verify and ensure that the ICF catalogs are properly closed.
Example 5-14 Closing the ICF catalogs F CATALOG,CLOSE(UCAT.DB9CLOGS) IEC351I CATALOG ADDRESS SPACE MODIFY IEC352I CATALOG ADDRESS SPACE MODIFY F CATALOG,CLOSE(UCAT.DB9CDATA) IEC351I CATALOG ADDRESS SPACE MODIFY IEC352I CATALOG ADDRESS SPACE MODIFY COMMAND ACTIVE COMMAND COMPLETED COMMAND ACTIVE COMMAND COMPLETED
97
Next you have to unallocate the ICF catalogs, as shown in Example 5-15. This ensures that the ICF catalogs for the DB2 data are not active and are not allocated.
Example 5-15 Unallocating the ICF catalogs F CATALOG,UNALLOCATE(UCAT.DB9CLOGS) IEC351I CATALOG ADDRESS SPACE MODIFY IEF196I IGD104I UCAT.DB9CLOGS IEF196I DDNAME=SYS00029 IEC352I CATALOG ADDRESS SPACE MODIFY F CATALOG,UNALLOCATE(UCAT.DB9CDATA) IEC351I CATALOG ADDRESS SPACE MODIFY IEF196I IGD104I UCAT.DB9CDATA IEF196I DDNAME=SYS00030 IEC352I CATALOG ADDRESS SPACE MODIFY COMMAND ACTIVE RETAINED, COMMAND COMPLETED COMMAND ACTIVE RETAINED, COMMAND COMPLETED
98
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
Once all the copy pools have been recovered successfully, you can continue to the next step.
5.2 System level backup and restore using Recover Expert ISPF-based System Backup and Restore Services
IBM DB2 Recovery Expert for z/OS System Backup and Restore Services (SBRS) allows you to back up and restore the entire subsystem on any supported DB2 version via the ISPF interface. Currently, the GUI portion of Recovery Expert does not build backup JCL. In addition to the DB2 V9 and beyond BACKUP SYSTEM and RESTORE SYSTEM utilities, Recovery Expert adds extensive execution steps and validation checking that simplify the backup and restore when running these services. The following sections document the six steps needed to accomplish a successful Recovery Expert backup and restore at a subsystem or data sharing group level. Step 1 - Create BACKUP and RECOVERY profiles - one-time setup. Step 2 - Build and execute the BACKUP SYSTEM Job. Step 3 - Build the RESTORE SYSTEM jobs.
Chapter 5. Local system level backup and restore
99
Step 4 - Prepare the environment and run the RESTORE. Step 5 - Start DB2. Step 6 - Run the RESTORE SYSTEM jobs. Note: There are two parameters in the parmlib: RESET_COPY_PENDING_TS and RESET_COPY_PENDING_IX. If these are set to Y (yes), all copy pending table and index spaces included in the backup will have the COPYP reset. See Step 17 - Change defaults for backup restore on page 31.
100
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
Before you can create a backup profile for the system level recovery (and related backup, as in our example), you may need to perform two one-time steps: Complete the product setup (option S) and the perform a DB2 subsystem analysis (option M) from the main menu in Figure 5-9. You only need to do this once. This is mentioned here as a verification step.
ARY$MAIN Option ===> ------- Recovery Expert for z/OS ------
User: PAOLOR6 - ARY ------------------------------------------------------------------------------B. System Backup Profiles R. System Restore and Offload O. Object Recovery Profiles D. Disaster Recovery Profiles M. DB2 Subsystem Analysis and Setup S. Product Setup X. Exit
101
In Figure 5-10 you see the default values when you start defining a backup system profile for the first time.
ARYPNL0 Option ===> ------------- Setup Parameters ------------ 2008/02/19 14:56:42
Enter or Update Default Values Backup Scope Backup Generations Offline Generations Backup Method Issue Log Suspend Validate Volumes Backup Repository Work File Unit Device Enter DB2 Subsystem Info: DB2 Subsystem ID
F 01 02 F N Y Y SYSALLDA
(Full/Data) (01 - 99) (00 - 99) (Bcv/Snap/Flash/Db2) (Yes/No) (Yes/No) (Yes/No) (SYSDA, DISK, etc.)
==> D9C1
Valid command selection values are 1: ZPARM, BSDS, and Load Library Information 2: DB2 Plans
Figure 5-10 Creating a backup and restore profile for a DB2 system level backup and restore
102
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
In Figure 5-11 we update the profile to indicate that this profile is for a full DB2 backup (data and logs) (F) and that DB2 (BACKUP SYSTEM) is the backup method (D). We also make changes for the work file unit device name from SYSDA to SYSALLDA (which is the unit name for our test environment) and provide the DB2 subsystem ID (D9C1).
ARYPNL0 Option ===> ------------- Setup Parameters ------------ 2008/02/19 14:57:25
Enter or Update Default Values Backup Scope Backup Generations Offline Generations Backup Method Issue Log Suspend Validate Volumes Backup Repository Work File Unit Device Enter DB2 Subsystem Info: DB2 Subsystem ID
F 01 02 D N Y Y SYSALLDA
(Full/Data) (01 - 99) (00 - 99) (Bcv/Snap/Flash/Db2) (Yes/No) (Yes/No) (Yes/No) (SYSDA, DISK, etc.)
==> D9C1
Valid command selection values are 1: ZPARM, BSDS, and Load Library Information 2: DB2 Plans
Note: Recovery Expert does validate the UNIT name and will report if this is incorrect. You also need to specify a valid DB2 SSID. This panel also enables you to view and update the DSNZPARM, BSDS information and review ARYs DB2 plan names to use.
103
In the following panels (Figure 5-12 to Figure 5-15 on page 106) you see the validation analysis that occurred online for the profile that is being created. This information gives you a complete overview of your recovery assets from a single source. Without Recovery Expert you will have to gather the same information from DB2, DFSMShsm, and ICF catalog interrogation, among others. Recovery Expert stores all this information in the system level backup and Recovery Services repository, a VSAM file.
ARY$SSID ------ Subsystem Setup Information ----- 2008/02/19 15:59:00 Option ===> Scroll ===> PAGE ------------------------------------------------------------------------------Subsystem: D9C1 Active: Yes Datasharing: Yes Date of Last Analysis: 02/19/2008 Analysis Recommended: N Message: Other non-DB2 data will be backed up and restored. ---------------------------------------------------Row 1 of 68 + New MVS User Catalogs to be used by this DB2 Subsystem Log/BSDS Catl Volume DB2 Data Catl Volume Line Cmds: (C-Create, A-Add Alias, D-Dataset Disp, U-Update, V-View Alias) Existing MVS User Catalogs used by this DB2 Subsystem Data Other UCAT.DB9CDATA Log UCAT.DB9CLOGS Line Cmds: (D-Dataset Display, V-View Aliases) Storage Copy Pools Data Copy Pool DSN$DB9C$DB Log Copy Pool DSN$DB9C$LG Backup Pool DB9CCPB Valid Primary Cmds: (Analyze, Reanalyze)
In these windows you can see the SMS Copy Pool names and the ICF catalogs used for your data and logs as well as all related volumes. This is very important information to determine the health of your system level backup and recovery implementation.
104
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
Figure 5-13 and Figure 5-14 show the information related to bootstrap data sets and log data sets.
ARY$SSID ------ Subsystem Setup Information ----- 2008/02/19 16:06:40 Option ===> Scroll ===> PAGE ------------------------------------------------------------------------------Subsystem: D9C1 Active: Yes Datasharing: Yes Date of Last Analysis: 02/19/2008 Analysis Recommended: N Message: Other non-DB2 data will be backed up and restored. ---------------------------------------------------Row 15 of 68 -+ Line Cmds: (V-Volume List) Boot Strap Datasets D9C1 - BSDS 1 DB9CL.D9C1.BSDS01 D9C1 - BSDS 2 DB9CL.D9C1.BSDS02 D9C2 - BSDS 1 DB9CL.D9C2.BSDS01 D9C2 - BSDS 2 DB9CL.D9C2.BSDS02 Line Cmds: (R-Rename BSDS, M-Move BSDS) Active D9C1 D9C1 D9C1 D9C1 Log Datasets - Log 1 DB9CL.D9C1.LOGCOPY1.DS01 - Log 1 DB9CL.D9C1.LOGCOPY1.DS02 - Log 1 DB9CL.D9C1.LOGCOPY1.DS03 - Log 2 DB9CL.D9C1.LOGCOPY2.DS01
ARY$SSID ------ Subsystem Setup Information ----- 2008/02/19 16:07:03 Option ===> Scroll ===> PAGE ------------------------------------------------------------------------------Subsystem: D9C1 Active: Yes Datasharing: Yes Date of Last Analysis: 02/19/2008 Analysis Recommended: N Message: Other non-DB2 data will be backed up and restored. ---------------------------------------------------Row 29 of 68 -+ D9C1 - Log 2 DB9CL.D9C1.LOGCOPY2.DS02 Volume SBOX5K D9C1 - Log 2 DB9CL.D9C1.LOGCOPY2.DS03 Volume SBOX5O D9C2 - Log 1 DB9CL.D9C2.LOGCOPY1.DS01 Volume SBOX5C D9C2 - Log 1 DB9CL.D9C2.LOGCOPY1.DS02 Volume SBOX5F D9C2 - Log 1 DB9CL.D9C2.LOGCOPY1.DS03 Volume SBOX5H D9C2 - Log 2 DB9CL.D9C2.LOGCOPY2.DS01 Volume SBOX5M D9C2 - Log 2 DB9CL.D9C2.LOGCOPY2.DS02 Volume SBOX5J D9C2 - Log 2 DB9CL.D9C2.LOGCOPY2.DS03 Volume SBOX5P Line Cmds: (R-Rename Log, M-Move Log) Alias used with associated MVS User Catalogs DB9CA UCAT.DB9CLOGS DB9CD UCAT.DB9CDATA DB9CL UCAT.DB9CLOGS Valid Primary Cmds: (Analyze, Reanalyze)
105
ARY$SSID ------ Subsystem Setup Information ----- 2008/02/19 16:07:18 Option ===> Scroll ===> PAGE ------------------------------------------------------------------------------Subsystem: D9C1 Active: Yes Datasharing: Yes Date of Last Analysis: 02/19/2008 Analysis Recommended: N Message: Other non-DB2 data will be backed up and restored. ---------------------------------------------------Row 43 of 68 -+ Line Cmds: (D-Dataset Display, M-Merge catalog entries, R-Rename Alias) Volumes used by this DB2 Subsystem Volume Data DataCat ActLog SBOX5A No No Yes SBOX5B No No Yes SBOX5C No No Yes SBOX5D No No Yes SBOX5E No No Yes SBOX5F No No Yes SBOX5G No No Yes SBOX5H No No Yes SBOX5I No No Yes ... SBOX5M No No Yes SBOX5N No No Yes SBOX5O No No Yes SBOX5P No No Yes SBOX5S Yes No No SBOX5T Yes No No SBOX5U Yes Yes No SBOX5V Yes No No Line Cmds: (D-Dataset Display, M-Move
ActCat No No No No No No No No No
ArcLog No No No No No No No No No
Other No No No No No No No No No No No No No Yes No No No
Pool Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes Yes
No No No No No No No No No No No No No No No No all Datasets on
As can be seen in Figure 5-15, there exists other non-DB2 data that can be backed up and restored from the volumes when flashed (during the BACKUP SYSTEM and RESTORE SYSTEM processes). The DB2 log and object data are properly segregated, but Recovery Expert has detected other non-DB2 data sets on one or more subsystem volumes. The volumes in question are SBOX5S, SBOX5T, SBOX5U, and SBOX5V. These other data sets (non DB2) will also be backed up and RESTORED when the DB2 system is restored. This may or may not be your desired result. If there is a z/OS user catalog not being used by DB2 on any of the listed volumes, it will not be automatically disconnected and will result in errors when the DB2 system is restored. These catalogs should be moved to other volumes that are not being used by DB2. Empty DB2 catalogs must be manually unallocated (disconnected) from the catalog address space at restore time.
106
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
Figure 5-16 shows the panel that you will see to create a new profile.
ARY$BPRD -------- Backup Profile Display -------- 2008/02/19 16:09:03 Option ===> Scroll ===> PAGE ------------------------------------------------------------------------------Profile Like * Creator Like * Row 1 of 1 > ------------------------------------------------------------------------------Cmd Name Creator SSID Updt C Press Enter to Create Profile ***************************** Bottom of Data *********************************
_____________________________________________________________________________ ARYR031I - No Profiles were found that match your selection criteria. Press enter to create a new profile or change the selection criteria.
Figure 5-18 on page 108 shows the results. In this window the following fields are read only: Current generation - This field is set to 00 when you first create a profile. After the profile has been built and submitted, this field contains the generation that is currently mirroring DB2. Setup Needed - This field is set to Y when you create a profile. Once profile setup has been performed, this field contains an N when you update the profile. The following fields should be specified: DB2 Subsystem - The subsystem for this profile in the DB2 Subsystem field. Backup Method - B for BCV backup. Backup Scope - A full backup to be taken (both data and logs) or to back up data only. Backup Generations - The number of generations of backups that you want to keep. Valid values are 1 to 8.
107
Validate Volumes - Y or N as the default for the Validate Volumes field. This field determines whether the volumes in the profile are validated against current DB2 volumes. Backup Repository - Y or N as the default for whether the System Backup and Restore Services repository is backed up as part of building the backup job. Setup Needed - If you want to use this profile to create another backup. Offload Options - Y if you want to retain more backups than the number specified in the Backup Generations field. Issue Log Suspend - Y if you want System Backup and Restore Services to stop all logging activity on the subsystem while the backup is made. Validate DB2 Vols - Y if every time the backup job is run you want System Backup and Restore Services to determine what volumes the subsystem is using and ensure that the volumes are included in the backup. Enable Obj Restore - Y to enable System Backup and Restore Services for object level recovery from backups created by this profile. For more information, see Creating a BCV backup profile in DB2 Recovery Expert for z/OS Users Guide Version 2 Release 1, SC19-1222. ARY$BPRU ---------- Update Backup Profile --------- 2008/02/19 16:18:41 Option ===> Scroll ===> PAGE ------------------------------------------------------------------------------Creator: PAOLOR6 Name: D9C1 User: PAOLOR6 Share Option: U (Upd,View,No) Description: D9C1 SYSTEM LEVEL BACKUP -------------------------------- Backup Options ------------------------------DB2 Subsystem ==> D9C1 Current Generation==> 00 Backup Method ==> D (Bcv/Snap/Flash/Db2) Setup Needed ==> Y Backup Scope ==> F (Full/Data) Issue Log Suspend ==> N (Yes/No) Backup Generations==> 02 (01 - 99) Validate DB2 Vols ==> Y (Yes/No) Offload Options ==> N (Yes/No/Update) Enable Obj Restore==> N (Yes/No) ------------------ Volume Mappings ----------------Row 1 of 44 + Source Dev Src Target Cmd Volumes Type Unit Volumes Message Area SBOX5A 3390-9 D800 SBOX6I SBOX7I SBOX5B 3390-9 D900 SBOX6J SBOX7J SBOX5C 3390-9 DA00 SBOX6K SBOX7K SBOX5D 3390-9 DB00 SBOX6L .. ..
Valid Line Cmds: (I-Insert, D-Delete)
108
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
Once you have entered your choices (in our example we chose D for a DB2 system level backup and restore method) you can save the information. See Figure 5-19.
ARY$BPRD -------- Backup Profile Display -------- 2008/02/19 16:20:01 Option ===> Scroll ===> PAGE ------------------------------------------------------------------------------Profile Like * Creator Like * Row 1 of 1 > ------------------------------------------------------------------------------Cmd Name Creator SSID Updt D9C1 PAOLOR6 D9C1 U ---------------------------- Bottom of Data -----------------------------
------------------------------------------| ARYR069I - Profile "PAOLOR6.D9C1" saved | Valid Line Cmds: ------------------------------date, V-View)
The profile will be saved and will be used for both backup and recovery processes using Recovery Expert.
This builds the job in two phases. The first job does a SETUP and the second job performs the actual BACKUP SYSTEM. The SETUP process reads the PROFILE and validates the volumes. This is a safeguard to ensure that the system level backup will not encounter any volume-related or DFSMShsm-related problems.
109
Figure 5-21 shows the option to edit the generated JCL and build the job with the SETUP option. This is also where you can change the JOBCARD information. This information will be stored in your ISPF PROFILE data set for use in the future.
Edit Generated Job Setup Job Perform Offload Backup Repository Build job in Dataset Member DB2BACK Y Y N N (Yes/No) (Yes/No) (Yes/No) (Yes/No)
PAOLOR6.SLB.JCL
Press ENTER to process or PF3 to Cancel Figure 5-21 Building backup job - specify JOB card and data set name that will contain JCL
110
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
This JCL will not do the backup, but will validate and save the validated information in the BACKUP PROFILE. You are now ready to perform a system level backup verification. The output is shown in Example 5-18.
Example 5-18 Output of backup JCL with SETUP
ARYS001I ARYS162I ARYS003I ARYS004I ARYS004I ARYS013I ARYS038I ARYS039I ARYS075I ARYS076I ARYS079I ARYS002I
Recovery Expert for DB2 z/OS Starting. Version 02.01.013 Parmlib used for this execution Control Cards: BACKUP PAOLOR6.D9C1 SETUP Backup profile PAOLOR6.D9C1 was read from the repository. Performing profile volume map validation... Volume map validation complete. Performing DB2 source volume validation... DB2 source volume validation complete. All DB2 volumes are in this profile. Profile setup is complete. Remove the "SETUP" control card to run the backup. Recovery Expert for DB2 z/OS complete. RC=000. You can now run the BACKUP SYSTEM job.
111
There are two ways to run the job: Edit the JCL online and remove SETUP and re-submit. Press PF3 and the Recovery Expert will remove the SETUP keyword and then submit the job. The output of the system level backup invokes BACKUP SYSTEM via Recovery Experts ARY@MAIN program. This is shown in Example 5-19.
Example 5-19 Output of Recovery Expert generated system level backup ARYS001I ARYS162I ARYS003I ARYS004I ARYS004I ARYS013I ARYS039I ARYS075I ARYS076I ARYS275I ARYS004I ARYS020I ARYS080I ARYS002I Recovery Expert for DB2 z/OS Starting. Version 02.01.013 Parmlib used for this execution Control Cards: BACKUP PAOLOR6.D9C1 Backup profile PAOLOR6.D9C1 was read from the repository. Volume map validation complete. Performing DB2 source volume validation... DB2 source volume validation complete. All DB2 volumes are in this profile. DB2 checkpoint taken at RBA/LRSN C1F99FB8D64A Invoking IBM System Level Backup utility... IBM System Backup Utility Complete. Token = C4F9C3F1C1F99FBBA7F5594BC1F88875EE61 Backup with timestamp 2008/02/19-16:39:06, generation 01 was saved in the repository. Recovery Expert for DB2 z/OS complete. RC=000. Recovery Expert for DB2 z/OS Backup Summary Report
Utility Executed:......... Backup Profile Name:............. PAOLOR6.D9C1 DB2 Subsystem:............ D9C1 DB2 Version:.............. 0910 Backup Type:.............. IBM System Level Backup Backup Contains:.......... Object Data and Log Data Nbr of Volumes:........... 0022 HSM Backup Token:......... C4F9C3F1C1F99FBBA7F5594BC1F88875EE61 Backup LRSN:.............. C1F99FBBA7F5 Last Checkpoint LRSN:..... C1F99FB8D64A Backup Date:.............. 02/19/2008 Backup Time:.............. 16:39:06 Consistency Method:....... IBM System Level Backup Supports Object Restore:.. No I/O Suspend Time:......... 2008-02-19-16.38.53.613941 I/O Resume Time:.......... 2008-02-19-16.39.06.195328 Backup Elapsed:........... 12.58 Seconds Recovery Expert for DB2 z/OS Backup Volume Detail Report <-Source Volumes-> Volser Ucb# Devtyp ------ ---- -----SBOX5A D800 3390-9 SBOX5B D900 3390-9 SBOX5C DA00 3390-9 .... SBOX5R D902 3390-9 SBOX5S DA02 3390-9 <-Targets-> Volser Ucb# ------ ---SBOX7I D807 SBOX7J D907 SBOX7K DA07 <--------Data Obj OCat ALog --- ---- ---No No Yes No No Yes No No Yes No No Types--------> ACat RLog RCat ---- ---- ---No No Yes No No No No No No No No No No No No
112
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
SBOX7B D906 Yes No No SBOX7C DA06 Yes Yes No SBOX7D DB06 Yes No No
No No No
No No No
No No No
The output differs from a standard DB2 BACKUP SYSTEM utility job. It will show the volumes that were successfully copied (which you have to view from the SYSLOG or DFSMShsm log). It records the backup in the BSDS as well as in the Recovery Services repository. The usual updates that BACKUP SYSTEM performs (updating the RBLP in DBD01) also happen.
The LRSN (in our recovery example we are restoring the DB2 subsystem in a data sharing environment) in the following figures is highlighted in order to follow the next sequence of events via the screen captures.
113
In the next series of screens in Figure 5-23 through Figure 5-25 on page 115 we select a recovery point, view a detailed display, and build the RESTORE SYSTEM jobs. Three jobs are built: Creating the CRCR record in the members BSDS Creating the RESTORE SYSTEM JCL Creating the LOG RESTORE JCL
ARY$MAIN ------- Recovery Expert for DB2 z/OS -----Option ===> R User: PAOLOR6 - ARY ------------------------------------------------------------------------------B. System Backup Profiles R. System Restore and Offload O. Object Recovery Profiles D. Disaster Recovery Profiles M. DB2 Subsystem Analysis and Setup S. Product Setup X. Exit
Figure 5-23 Selecting the system restore option to build RESTORE SYSTEM JCL
-------- Restore System Display -------- 2008/02/19 17:06:04 Scroll ===> PAGE
DB2 Subsystem ID * ------------------------------------------------------------------------------Select a row from the list of recovery points displayed below. To enter an RBA/LRSN and have a recovery point automatically selected for you, enter the RESTORE primary command followed by a DB2 subsystem ID. ------------------------------------------------------------------------------Row 1 of 2 > Data Mixed On On Obj Nbr Cmd Date Time Only Data Disk Offload Rcvr Type Vols 02/19/2008 16:39:06 No No Yes No No DB2 0022 V SSID: D9C1 RBA/LRSN: C1F99FBBA7F5 ***************************** Bottom of Data ********************************* Valid Line Commands: ( S - Select, D - Delete, V - View Report, O - Offload )
114
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
--------- Backup Report Display -------- 2008/02/19 17:07:58 Scroll ===> PAGE Row 1 of 49 +>
----------------------------------------------------Recovery Expert for DB2 z/OS Backup Summary Report Utility Executed:......... Profile Name:............. DB2 Subsystem:............ DB2 Version:.............. Backup Type:.............. Backup Contains:.......... Nbr of Volumes:........... HSM Backup Token:......... Backup LRSN:.............. Last Checkpoint LRSN:..... Backup Date:.............. Backup Time:.............. Consistency Method:....... Supports Object Restore:.. I/O Suspend Time:......... I/O Resume Time:..........
Backup PAOLOR6.D9C1 D9C1 0910 IBM System Level Backup Object Data and Log Data 0022 C4F9C3F1C1F99FBBA7F5594BC1F88875EE61 C1F99FBBA7F5 C1F99FB8D64A 02/19/2008 16:39:06 IBM System Level Backup No 2008-02-19-16.38.53.613941 2008-02-19-16.39.06.195328
Recovery Expert for DB2 z/OS Backup Volume Detail Report <-Source Volumes-> <-Targets-> <--------Data Types--------> Volser Ucb# Devtyp Volser Ucb# Obj OCat ALog ACat RLog RCat ------ ---- ------ ------ ---- --- ---- ---- ---- ---- ---SBOX5A D800 3390-9 SBOX7I D807 No No Yes No No Yes SBOX5B D900 3390-9 SBOX7J D907 No No Yes No No No SBOX5C DA00 3390-9 SBOX7K DA07 No No Yes No No No ... SBOX5R D902 3390-9 SBOX7H DF06 No No No No No No SBOX5S DA02 3390-9 SBOX7A D806 Yes No No No No No SBOX5T DB02 3390-9 SBOX7B D906 Yes No No No No No SBOX5U DC02 3390-9 SBOX7C DA06 Yes Yes No No No No SBOX5V DD02 3390-9 SBOX7D DB06 Yes No No No No No ***************************** Bottom of Data *********************************
115
The system level recovery information of Figure 5-26 is sourced from the Recovery Expert SLBRS Repository.
ARY$REST Option ===> -------- Restore System Display -------- 2008/02/19 17:12:26 Scroll ===> CSR
DB2 Subsystem ID * ------------------------------------------------------------------------------Select a row from the list of recovery points displayed below. To enter an RBA/LRSN and have a recovery point automatically selected for you, enter the RESTORE primary command followed by a DB2 subsystem ID. ------------------------------------------------------------------------------Row 1 of 2 > Data Mixed On On Obj Nbr Cmd Date Time Only Data Disk Offload Rcvr Type Vols S 02/19/2008 16:39:06 No No Yes No No DB2 0022 SSID: D9C1 RBA/LRSN: C1F99FBBA7F5 ***************************** Bottom of Data *********************************
As mentioned before, the BACKUP SYSTEM time stamp in BSDS is updated, too (in step 2), and in Example 5-20 the job output from a DSNJU004 utility run is listed to show the contents for informational purposes only.
Example 5-20 DSNJU004 Output - BACKUP SYSTEM UTILITY HISTORY - showing the backup entry BACKUP SYSTEM UTILITY HISTORY SUBSYSTEM ID D9C1 22:52:03 FEBRUARY 19, 2008 START STCK DATA COMPLETE DATA LOG RBLP LRSN ---------------- ---------------- ------------ -----------C1F99FBBA7F5594B C1F99FBD2B868C46 C1F88875EE61 C1F99FC6EC25 TOKEN = C4F9C3F1C1F99FBBA7F5594BC1F88875EE61 C1F888B380EEBD43 C1F888B42BFF8904 C1F8886C1B39 C1F888BD41E9 TOKEN = C4F9C3F1C1F888B380EEBD43C1F8886C1B39 C1F86E8E03F0E5C3 C1F86E90A8DEA183 C1F1161A0D5F C1F86E9AB8B0 TOKEN = C4F9C3F1C1F86E8E03F0E5C3C1F1161A0D5F
DATA/LOG COMPLETE DATE LTIME -------------------2008/02/19 16:39:06 2008/02/18 2008/02/18 19:50:42 17:53:46
116
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
In Figure 5-27 you can see the window that enables you to build the RESTORE SYSTEM JCL.
Restore Only Data Select a Recovery Point Recover to RBA/LRSN Y N C1F99FBBA7F5
Select whether to Restore Data and Logs or Data only. If restoring Data and Logs you will not be able to select a Timestamp Recovery Point or change the Recover to RBA/LRSN. Press ENTER to generate the Restore Job or PF3 to Cancel Figure 5-27 Selection choice for the recovery
Recovery Expert SBRS optionally restores both data volumes and log volumes. This is not possible with DB2 RESTORE only. If both data and logs are restored, DB2 will be restored back to the point of the full system backup. When DB2 is started, it will backout any transactions that were uncommitted at the time of the system backup. In the screen shown in Figure 5-28 you enter the data set and member names for the RESTORE SYSTEM JCL. The first member, SLBRES0, updates the BSDS of each member in the data sharing group (our example has two members, D9C1 and D9C2) in two steps. The JCL has basic comments about the instructions for running the RESTORE SYSTEM jobs. Note: Recovery Expert SBRS will help you with most of the manual steps needed to successfully RESTORE an entire DB2 subsystem from a system level backup.
(Yes/No)
PAOLOR6.SLB.JCL SLBRES0 Conditional Restart Member SLBRES1 Restore System Member SLBRES2 Log Restore Member
Job Cards: ==> //PAOLOR6Y JOB (XXX,POK),HENNIE,CLASS=A,MSGCLASS=X ==> /*JOBPARM SYSAFF=SC63 ==> //* ==> //* Press ENTER to process or PF3 to Cancel
Figure 5-28 JCL generation window with data set name and members for restore system jobs
117
Figure 5-29 shows the conditional restart JCL for the two DB2 members.
//ARYCRCR EXEC PGM=DSNJU003,REGION=006M,COND=(4,LT) //* //STEPLIB DD DISP=SHR,DSN=DB9C9.SDSNEXIT // DD DISP=SHR,DSN=DB9C9.SDSNLOAD //SYSPRINT DD SYSOUT=* //SYSUT1 DD DISP=SHR,DSN=DB9CL.D9C1.BSDS01 //SYSUT2 DD DISP=SHR,DSN=DB9CL.D9C1.BSDS02 //SYSIN DD * CRESTART CREATE,SYSPITR=C1F99FBBA7F5,FORWARD=YES,BACKOUT=YES /* //* //ARYCRCR EXEC PGM=DSNJU003,REGION=006M,COND=(4,LT) //* //STEPLIB DD DISP=SHR,DSN=DB9C9.SDSNEXIT // DD DISP=SHR,DSN=DB9C9.SDSNLOAD //SYSPRINT DD SYSOUT=* //SYSUT1 DD DISP=SHR,DSN=DB9CL.D9C2.BSDS01 //SYSUT2 DD DISP=SHR,DSN=DB9CL.D9C2.BSDS02 //SYSIN DD * CRESTART CREATE,SYSPITR=C1F99FBBA7F5,FORWARD=YES,BACKOUT=YES /* Figure 5-29 Conditional restart control record create for each DB2 member
This is the two-step job that uses the DB2 utility DSNJU003 to update both members in our data sharing group with the correct SYSPITR LRSN to enable the RESTORE SYSTEM job to execute successfully.
118
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
Figure 5-30 shows the step to invoke the Recovery Expert restore job.
//** * * * //* //* Step: //* //* Desc: //* //* //* //* //* //* //* //** * * * //* //ARYREST //* //STEPLIB //DB2PARMS //ARYBPROF //ARYBOFFL //ARYBPMAP //ARYBPCAT //ARYSBACK //ARYSBOBJ //ARYSBVOL //ARYSBSSD //ARYBREPT //ARY#REPT //SYSOUT //ARYOUT //ARYSNAPO //ARY#PARM //ARYIN RESTORE * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ARYREST * * This step will invoke the System Restore job. * * When this job is complete. DB2 can be restarted. If * you did not restore the DB2 logs, you will need to * respond Yes to the WTOR: * XXXX CONDITIONAL RESTART RECORD INDICATES TRUNCATION * AT RBA XXXXXXXXXXXX. REPLY Y OR N * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * EXEC PGM=ARY@MAIN,REGION=006M,COND=(4,LT) DD DISP=SHR,DSN=ARY.V2R1M0.SARYLOAD DD DISP=SHR,DSN=ARY.DB2PARMS.CONTROL DD DISP=SHR,DSN=ARY.PROFILES DD DISP=SHR,DSN=ARY.OFFOPTS DD DISP=SHR,DSN=ARY.PROFILE.MAPS DD DISP=SHR,DSN=ARY.PROFILE.CATS DD DISP=SHR,DSN=ARY.SYSBACK DD DISP=SHR,DSN=ARY.SYSBACK.OBJS DD DISP=SHR,DSN=ARY.SYSBACK.VOLS DD DISP=SHR,DSN=ARY.SYSBACK.SSIDS DD DISP=SHR,DSN=ARY.BREPORT DD SYSOUT=* DD SYSOUT=* DD SYSOUT=* DD SYSOUT=* DD DSN=ARY.V2R1M0.SARYSAMP(ARY#PARM),DISP=SHR DD * PAOLOR6.D9C1 GENERATION 01 DATE 02/19/2008 TIME 16:39:06
119
Figure 5-31 shows the Recovery Expert job for the restore log only.
//** * * * //* //* Step: //* //* Desc: //* //* //* //* //* //* //* //** * * * //* //ARYLOG //* //STEPLIB // //SYSPRINT //SYSOUT //UTPRINT //SYSIN RESTORE /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ARYLOG * * This step will invoke the IBM DSNUTILB stand alone * utility to Restore the System Logs. * * DB2 must be up and you must have responded Yes to the * WTOR: * XXXX CONDITIONAL RESTART RECORD INDICATES TRUNCATION * AT RBA XXXXXXXXXXXX. REPLY Y OR N * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * EXEC PGM=DSNUTILB,REGION=006M,PARM=(D9C1,) DD DISP=SHR,DSN=DB9C9.SDSNEXIT DD DISP=SHR,DSN=DB9C9.SDSNLOAD DD SYSOUT=* DD SYSOUT=* DD SYSOUT=* DD * SYSTEM LOGONLY
Step 4.1 - Run the jobs to create the SYSPITR CRCR for each DB2 subsystem
Note: Before you run the jobs to create the SYSPITR CRCR, ensure that all DB2 members in a data sharing environment are stopped. In a non-data sharing environment, Recovery Managers SBRS function will generate a step to stop DB2 for you. Run job SLBRES0, which was built and saved in the previous step. This job has two steps, one for each DB2 member, to update the BSDS with the CRCR information. See Step 3 - Prepare the environment for RESTORE SYSTEM on page 94.
120
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
See the commands and description as well as examples in Step 5 - Verify that ICF catalogs volumes are not in use by the catalog on page 97.
Step 4.3 - Run the job to restore the system database volumes
This job restores the system database volumes to the backup points.
121
Table 5-1 Comparing Recovery Expert GUI and ISPF system level backup and recovery Task Build and run the BACKUP SYSTEM job. GUI SBRS X Comments GUI comments: You currently do not build the BACKUP SYSTEM JCL in the GUI interface. This is something you build and run outside of the GUI interface. You use the standard DB2 BACKUP SYSTEM utility JCL. ISPF comments: You can build various system level backups via the ISPF interface. In our example in this chapter we build the BACKUP SYSTEM job using the ISPF interface. This was done after we defined a BACKUP PROFILE in step 1. Notes: In both our examples we executed the BACKUP SYSTEM utility. Both performed the same function. Recovery Expert records all the information about the backup, its copy pools, the volumes in the stogroups, and user catalogs in its repository. This is in addition to the DB2 BACKUP SYSTEM utility updating DB2 with the relevant system level backup information. Recovery Expert will source this information when building recovery (system level) or restore (object level) jobs in any supported version of DB2. Build the system level restore jobs. Unallocate and close the ICF catalogs. X X X GUI comments: You have to perform this function manually. ISPF: Recovery Experts SBRS function will perform this function as part of the recovery. Delete the XCF structures for the data sharing environment. X GUI comments: You have to perform this function manually outside of Recovery Expert. ISPF: With APAR PK59675 applied RE will reset the structures for you.
122
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
GUI
SBRS X
Comments GUI comments: You have to start DB2 manually outside of the GUI. ISPF: The ISPF interfaces SBRS function will start DB2 in a non-data sharing environment. For data sharing, you currently still need to start it manually.
In addition to the specific benefits listed above, Recover Experts System Backup and Restore Services offer a comprehensive list of validity checking. It: Ensures that the ICF user catalogs are included in the backup, ensuring integrity of the restoration. Verifies that the target volumes for a backup are not in use by another backup profile. Verifies that the log and object data are on separate volumes. If not, a backup is still allowed but System Backup and Restore Services will issue warnings as seen in our examples. Validates that DB2 log data sets and object data sets are cataloged in separate user catalogs. If not, the backup is still allowed but System Backup and Restore Services will issue warnings, and you can only back up and restore the full subsystem (both logs and data). System Backup and Restore Servicess subsystem setup facility collects and displays information about the DB2 subsystems user catalogs, boot strap data sets, active logs, and related DB2 object data sets.
123
124
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
Chapter 6.
125
126
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
If there are no profiles previously defined, press Enter and you will see the panel shown in Figure 6-2.
ARY$OPRD -------- Objects Profile Display ------- 2008/02/14 16:33:01 Option ===> Scroll ===> PAGE ------------------------------------------------------------------------------Profile Like * Creator Like PAOLOR7 Row 1 of 1 > ------------------------------------------------------------------------------Cmd Name Creator SSID Updt C Press Enter to Create Profile ***************************** Bottom of Data *********************************
_____________________________________________________________________________ ARYR031I - No Profiles were found that match your selection criteria. Press enter to create a new profile or change the selection criteria.
Press Enter again in the Objects Profile Display window with a C under the Line Commands column (Cmd). You will get to the window shown in Figure 6-3, which serves as the entry window for the objects profile name.
Enter New Objects Profile Data Creator PAOLOR7
Profile Name OBJECT RECOVERY PROFILE#1 Description A MEANINGFUL DESCRIPTION DB2 SSID D8F1 (Update, View only, No access)
Update Option U
Press ENTER to process or PF3 to Cancel Figure 6-3 Objects profile name
In the window shown in Figure 6-3: Profile Name Creator DB2 SSID Update Option Can be up to 30 characters long and is a required field Is the profile creator. Is the DB2 subsystem ID for which the profile was created, obtained from the ISPF profile pool. This field indicates how users other than the profile creator may use the profile. U(pdate) Allows other users to update the profile. V(iew) allows other users to view but not update the profile. N(o access) Prevents other users from viewing or updating the profile. Is the profile description and is optional.
Description
127
Press Enter at the window shown in Figure 6-3 on page 127 to switch to the Add Objects to the Object Profile window shown in Figure 6-4.
Press ENTER to process or PF3 to Cancel Figure 6-4 Add Objects to the Object Profile
Type Y at Add Tablespaces. This option can include the table space and all indexes dependent on this table space. The indexes can be confirmed in the next panel, as shown in Figure 6-5.
Enter Tablespaces Like to Display Database Like Tablespace Like Creator Like SAMPLE1 RAVI* * Wildcard N Exclude I > (Y or N) (E or I)
Process Dependent Indexes Y (Y or N) Figure 6-5 Enter recovery object (database or table space) name
If you would like to include indexes selectively, then type Y for the Add Indexes option, also. Then press Enter to go to the window shown in Figure 6-5, where you can type the object name as shown. Press PF3 if you have typed Y for the Add Indexes option to go to the window shown in Figure 6-6 to add indexes selectively.
Enter Indexes Like to Display Database Creator Index Like Like Like Y * * Wildcard N > Exclude I (Y or N) >
The window shown in Figure 6-5 allows you to: Set a filter to limit the table spaces from which to select on the window that follows. Automatically select all table spaces that meet your selection criteria by using the Wildcard option field as shown. If you set the Wildcard option to Y, you will not be presented with a table space selection list. However, all table spaces that qualify the selection criteria will be included in the objects profile. If new table spaces are added that qualify the selection
128
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
criteria then those objects will be automatically included when the profile is reused afterwards Specify whether the objects that you select are to be included or excluded from the profile. Specify whether indexes dependent on the selected table spaces are to be included. To select table spaces from a list, enter a database, table space, or creator name or mask in the appropriate fields. For DB2 9 for z/OS and later subsystems only, you can specify whether clone tables are to be processed, as shown in Figure 6-7. Type Y in the Process Cloned Tables field to process only clone tables. Type B to process both clone table and base tables. Or type N to process only the base table.
Enter Tablespaces Like to Display Database Like Tablespace Like Creator Like * * * Wildcard N Exclude I > (Y or N) (E or I)
Process Dependent Indexes Y (Y or N) Process Cloned Tables N (Y, N or B) Figure 6-7 Recovery object (database or table space) name for DB2 9 for z/OS
For DB2 V8 and later subsystems, the Creator Like field allows up to 128 bytes. To scroll in this field, place the cursor in the field and use the PF11 key to scroll right and the PF10 key to scroll left. Leave N in the Wildcard field. When you press Enter, you will see the panel shown in Figure 6-8.
ARY$OPRT --- Include Tablespace Selection --2008/02/14 18:31:43 Option ===> Scroll ===> PAGE ------------------------------------------------------------------------------Row 1 of 1 > Database Like * Tablespace Like RJTS2 Creator Like * > ------------------------------------------------------------------------------Cmd DBNAME TSNAME PART CREATOR DBID OBID PSID BPOOL LOCKRULE RJDB2 RJTS2 0 PAOLOR4 277 1 2 BP1 P ***************************** Bottom of Data *********************************
129
You can scroll to the right by using the PF11 key and to the left using the PF10 key to view all the attributes of the table space being displayed. You can enter the line command s to select the object and press PF3 to modify the object selection queue. You will see the message window shown in Figure 6-9.
ARYR338I - Object Queue has been Modified. Figure 6-9 Object Queue message
If you press Enter then you will see the window shown in the Figure 6-10. Here you may use the Explode option to verify the selected object. This window also allows you to add or remove objects.
ARY$OPRU ----- Update Object Profile Display ---- 2008/02/14 20:14:01 Option ===> Scroll ===> PAGE ------------------------------------------------------------------------------Creator: PAOLOR7 Name: OBJECT RECOVERY PROFILE#1 User: PAOLOR7 Share Option: U (Upd,View,No) Description: DB2 Subsystem: D8F1 Update Recovery Options: N (Yes/No) ---------------------------------------------------- Row 1 of 1 > Wild Process Include/ IX Crtr/ IX Name/ IX DB Name/ Cmd Type Card Indexes Exclude DB Name TS Name TS Crtr Part TS N Y INC RJDB2 RJTS2 PAOLOR4 0 ***************************** Bottom of Data *********************************
Valid Line Commands: (Add, Delete, Explode) Primary Commands: (Explode) Figure 6-10 Update Object Profile Display
You can press PF3 from this window to go back to the Objects Profile Display window, which would display a window as shown in Figure 6-11.
ARYR419I - Profile PAOLOR7.OBJECT RECOVERY PROFILE#1 has been successfully updated. Figure 6-11 Profile update confirmation
130
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
131
Valid Line Cmds: (B-Build, C-Create, D-Delete, R-Rename, V-View, U-Update) Figure 6-12 Update Objects Profile Display
Then enter Y next to the Edit Recovery Options option, as shown in Figure 6-13.
ARY$OPRU ----- Update Object Profile Display ---- 2008/02/15 03:32:25 Option ===> Scroll ===> PAGE ------------------------------------------------------------------------------Creator: PAOLOR7 Name: OBJECT RECOVERY PROFILE#1 User: PAOLOR7 Share Option: U (Upd,View,No) Description: DB2 Subsystem: D8F1 Update Recovery Options: Y (Yes/No) ---------------------------------------------------- Row 1 of 1 > Wild Process Include/ IX Crtr/ IX Name/ IX DB Name/ Cmd Type Card Indexes Exclude DB Name TS Name TS Crtr Part TS N Y INC RJDB2 RJTS2 PAOLOR4 0 ***************************** Bottom of Data *********************************
Valid Line Commands: (Add, Delete, Explode) Primary Commands: (Explode) Figure 6-13 Update recovery options through Update Object Profile Display
Various recovery options are discussed in detail in 6.1.2, Recover object to current using system level backup on page 135, through 6.1.4, Recovery object to copy (full or incremental copy or quiesce) on page 138.
132
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
Valid Line Cmds: (B-Build, C-Create, D-Delete, R-Rename, V-View, U-Update) Figure 6-14 Build recovery job selection from Objects Profile Display
You get to the window shown in Figure 6-15 for the build job.
Build Job for PAOLOR7.OBJECT RECOVERY PROFILE#1 Build Online or Batch Edit Generated Job Edit Recovery Options Build job in Dataset Member O Y Y (Online/Batch) (Yes/No) (Yes/No)
PAOLOR7.JCL.CNTL LINK1
Job Cards: ==> //PAOLOR7R JOB REGION=0M,CLASS=A, ==> // NOTIFY=&SYSUID,MSGLEVEL=(1,1),MSGCLASS=X ==> /*JOBPARM S=SC53 ==> //* Press ENTER to process or PF3 to Cancel Figure 6-15 Build object recovery job
The fields in the window shown in Figure 6-15 indicate: Build Online or Batch When you want to build the job: Enter O for online. When you choose to build the job online, System Backup and Restore Services builds the object restore job immediately. Enter B for batch. When you choose this option, System Backup and Restore Services builds a job that, when executed, builds the object restore job. Edit Generated Job Type Y to view the job in an ISPF edit session after generation. If you enter N, after the job is generated you will return to the Objects Profile Display.
133
Edit Recovery Options Type Y if you want to edit or review the recovery options before building the JCL. When you press Enter, the Object Recovery Options window appears. Build job in data set/Member Enter the fully qualified data set name (without quotation marks) where you want to save the generated job. This data set must exist and can be sequential or a PDS. If the data set is a PDS, enter a member name. If the member does not exist, System Backup and Restore Services will create it. Job Cards Enter a valid job card for your site. Ensure that a valid SLB is available: Make sure that the SLB was taken with the Enable Obj Restore option set to Y in the corresponding backup profile. Creating and managing backup profiles is discussed in Chapter 4, Configuring DB2 for system backup and restore on page 53. If you do not have a full image copy available for the object that you are dealing with then the last SLB taken from RE will be used by RE to restore the object to current, as described in this section. To perform object recovery to current: 1. Go to the Edit Recovery Options window as described in Building object recovery job and editing recovery options on page 133. 2. If you need to edit recovery options from the window shown in Figure 6-15 on page 133, type Y in the Edit Recovery Options field to get to the window shown in Figure 6-16 on page 135.
134
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
When the profile build is performed and the recover point is To Current, RBA/LRSN, or Last Quiesce, Recovery Expert analyzes both its system backup repository and SYSIBM.SYSCOPY and generates JCL to restore the object from the first backup that it finds preceding the point in time to which you wish to restore the object. Figure 6-16 shows the options. This may be restoring table space or index data sets from system backups or from image copies, whichever is found first.
Enter END command to return to the previous window Figure 6-16 Object Recovery Options for recover to current
The top portion of the window shows the object profile information. Under "Enter the Recovery options to associate with this Object Profile," specify appropriate values for the fields as discussed below: Recovery Point Enter 1 to recover the object to the current point in time. RBA/LRSN This field s required only for option 2. Site Specify which copies are to be used in the recovery. Enter L for local site, R for recovery site, or Z to use the site specified in the DSNZPARM member for this DB2 subsystem. From Offload Enter Y in this field to specify that if the generated recovery JCL will use an System Backup and Restore Services system backup, the recovery is to use an appropriate offloaded backup (either local or remote), even if the backup still resides on disk.
135
Reuse (IBM recover) Enter Y to specify that the IBM RECOVER utility is to logically reset and reuse DB2-managed data sets without deleting and redefining them. If you enter N, DB2-managed data sets are deleted and redefined. Utility ID Enter a 1-to-16-character utility ID to be used to uniquely identify the utility to DB2. The ID must begin with a letter. The remainder can be alphanumeric or the following special characters: #, $, @, , !, , . Parallel tasks If you want the utility to process objects in parallel from backups on tape, enter the maximum number of objects to be processed in parallel. Number of tape units If specifying processing in parallel, indicate the maximum number of tape drives to be dynamically allocated. Edit Rebuild IX Options When indexes are included in the objects to be recovered, System Backup and Restore Services chooses to either recover or rebuild the index, depending on the index and the type of recovery. Enter Y in this field to set options for REBUILD INDEX. Online Rebuild Index (DB2 9 for z/OS and later) Type Y in this field to specify that the REBUILD INDEX should be performed online, as shown in Figure 6-18 on page 137. Edit Online Rbld opts (DB2 9 for z/OS and later) To set options for an online REBUILD INDEX, type Y in this field and press Enter. If you have any SYSCOPY entries with ICTYPE=P then you may see the message shown in Figure 6-17 when you press Enter to generate the job.
ARYS314W - Partial Recovery has been found. Recovery still allowed for object: ARYS324I - Tablespace DBNAME.TSNAME Figure 6-17 Partial recovery message
136
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
Z (Zparm/Local site/Recovery site) N (Yes/No) Y (Yes/No) RESTORE.CURRENT1 04 (01 - 99) 02 (01 - 99) N (Yes/No) Y (Yes/No) Y (Yes/No)
The job generated typically has the following steps: Step RECOBJST This step restores the data sets of table spaces or index spaces from a system level backup. This step executes the ARY@MAIN program and contains a control statement similar to: ORESTORE "PAOLOR4"."BKUP-1" GENERATION 01 DATE 02/15/2008 TIME 04:49:20 MAX-TASKS 04 START-SPACE-MODE NONE LOCAL-SITE TABLESPACE RJDB2.RJTS2 INDEXSPACE RJDB2.RJIX2 Step START#UT This step starts all the spaces being recovered in UT (utility access only) mode. Step: RCVRLOGO This step recovers objects via LOGONLY that had their data sets recovered from a system level backup. Step: START#RW This step starts all the spaces back to RW (read write) mode. Submit the JCL generated to restore the object to current.
137
Enter END command to return to the previous screen Figure 6-19 Object Recovery Options for recover to RBA/LRSN
The recovery process statements generated depend on the type of backup (SLB or Imagecopy) available. We described this situation in 6.1.2, Recover object to current using system level backup on page 135. In order for a table space or index space be restored using a system backup, the requested recovery point must be the RBA/LRSN of the backup + 1.
138
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
Figure 6-20 shows that we have selected option 3 to let DB2 Recovery Expert select the latest image copy available, either last full imagecopy or last incremental copy.
ARY$RECO --------- Object Recovery Options ---- "DOWN " is not active Option ===> ------------------------------------------------------------------------------Creator: PAOLOR4 Name: REST-1 User: PAOLOR4 Share Option: U (Upd,View,No) Description: OBJECT RECOVERY PROFILE DB2 Subsystem: D8F1 ------------------------------------------------------------------------------Enter the Recovery options to associate with this Object profile: Recovery Point ==> 3 ( 1 To Current, 2 RBA/LRSN, 3 Last Copy, 4 Last Incr, 5 Last Full, 6 Last Quiesce) RBA/LRSN ==> Site ==> Z (Zparm/Local site/Recovery site) From Offload ==> N (Yes/No) Reuse (IBM recover) ==> N (Yes/No) Utility ID ==> PAOLOR4.RECORAJ1 Parallel Tasks ==> 01 (01 - 99) Number of Tape Units ==> 01 (01 - 99) Edit Rebuild IX Options ==> N (Yes/No)
DB2 Recovery Expert generates the RECOVER TOLOGPOINT utility statement to the LRSN value that corresponds to either the last full imagecopy or last incremental copy. Choose option 4 to specify that you would like DB2 Recovery Expert to recover from the last incremental copy. DB2 Recovery Expert generates a RECOVER TOLOGPOINT utility statement to the LRSN value that corresponds to the last incremental copy. Choose option 5 to specify that you would like DB2 Recovery Expert to recover from the last full image copy. DB2 Recovery Expert generates a RECOVER TOLOGPOINT utility statement to the LRSN value that corresponds to last full imagecopy. Choose option 6 to specify that you would like DB2 Recovery Expert to recover to the last quiesce point. The type of backup (SLB or imagecopy) available prior to the quiesce point influences the recovery process statements generated by DB2 Recovery Expert.
6.2 Object Recovery using DB2 9 for z/OS system level backup
The backup taken by the BACKUP SYSTEM utility (system level backups) in V8 is used for a restore of the entire DB2 system. DB2 9 for z/OS has an enhancement to allow a DB2 object to be recovered from the system level backup. Recovery is via the RECOVER utility, which is now capable of using system level backups for the restore phase in addition to the usual image copies. In order to allow RECOVER to consider using system level backups, specify YES for the new SYSTEM_LEVEL_BACKUPS installation option in panel DSNTIP6. See also BACKUP and RESTORE enhancements with DB2 9 for z/OS on page 238. For details, refer to DB2 Version 9.1 for z/OS Utility Guide and Reference, SC18-9855-02.
139
In our scenario we want to recover a table space and related indexes from a system level backup. We take a system level backup as shown in Example 6-1.
Example 6-1 SMS output on successful system level backup
ARC1805I THE FOLLOWING 00004 VOLUME(S) WERE SUCCESSFULLY PROCESSED BY FAST REPLICATION BACKUP OF COPY ARC1805I (CONT.) SBOX5S ARC1805I (CONT.) SBOX5T ARC1805I (CONT.) SBOX5U ARC1805I (CONT.) SBOX5V ARC1802I FAST REPLICATION BACKUP HAS COMPLETED FOR COPY POOL DSN$DB9C$DB, AT 16:59:15 ON 2008/04/17, MAXIMUM VOLUME RC=0000 ARC1801I FAST REPLICATION BACKUP IS STARTING FOR COPY POOL DSN$DB9C$LG, AT 16:59:15 ON 2008/04/17, TOKEN=X'C4F9C3F1C24281BC99549809C24274AD53E6' ARC1805I THE FOLLOWING 00018 VOLUME(S) WERE SUCCESSFULLY PROCESSED BY FAST REPLICATION BACKUP OF COPY ARC1805I (CONT.) SBOX5Q ARC1805I (CONT.) SBOX5R ARC1805I (CONT.) SBOX5A ARC1805I (CONT.) SBOX5B ARC1805I (CONT.) SBOX5C ARC1805I (CONT.) SBOX5D ARC1805I (CONT.) SBOX5E ARC1805I (CONT.) SBOX5F ARC1805I (CONT.) SBOX5G ARC1805I (CONT.) SBOX5H ARC1805I (CONT.) SBOX5I ARC1805I (CONT.) SBOX5J ARC1805I (CONT.) SBOX5K ARC1805I (CONT.) SBOX5L ARC1805I (CONT.) SBOX5M ARC1805I (CONT.) SBOX5N ARC1805I (CONT.) SBOX5O ARC1805I (CONT.) SBOX5P ARC1802I FAST REPLICATION BACKUP HAS COMPLETED FOR COPY POOL DSN$DB9C$LG, AT 16:59:21 ON 2008/04/17, MAXIMUM VOLUME RC=0000 POOL DSN$DB9C$DB
FUNCTION RC=0000,
POOL DSN$DB9C$LG
FUNCTION RC=0000,
We use the RECOVER utility for the partitioned table space. DB2 recognizes that the object is available from a volume of the recent system level backup and executes it. The RECOVER utility chooses the most recent backup (among possible image copies, concurrent copies, or system level backups) to restore based on the recovery point for the table spaces or indexes (with the COPY YES attribute) being recovered. Our indexes have not been defined with the COPY YES attribute, so we add a REBUILD INDEX(ALL) as an additional step within the RECOVER. Example 6-2 shows the RECOVER job output, which provides details on the execution of the FlashCopy restore and the log apply phase. In our case fast log apply was not enabled and log apply found no records in the log to apply.
Example 6-2 Output from a DB2 RECOVER utility that selects FLASHCOPY as input
IEF375I JOB/PAOLOR6P/START 2008112.1919 IEF376I JOB/PAOLOR6P/STOP 2008112.1919 CPU 0MIN 00.32SEC SRB 0MIN 00.00SEC 1DSNU000I 112 19:19:19.16 DSNUGUTC - OUTPUT START FOR UTILITY, UTILID = PAOLOR6.PAOLOR6P DSNU1044I 112 19:19:19.29 DSNUGTIS - PROCESSING SYSIN AS EBCDIC 0DSNU050I 112 19:19:19.38 DSNUGUTC - RECOVER TABLESPACE DSN8D91A.DSN8S91E DSNUM ALL DSNU1520I 112 19:19:19.75 DSNUCBMT - THE RECOVERY BASE FOR TABLESPACE DSN8D91A.DSN8S91E IS THE SYSTEM LEVEL BACKUP WITH DATE = 20080417, TIME 165921, AND TOKEN X'C4F9C3F1C24281BC99549809C24274AD53E6' DSNU1527I 112 19:19:20.34 DSNUCBMT - TABLESPACE DSN8D91A.DSN8S91E DSNUM 1 WAS SUCCESSFULLY RESTORED FROM A FLASHCOPY, ELAPSED TIME=00:00:00 DSNU1527I 112 19:19:20.55 DSNUCBMT - TABLESPACE DSN8D91A.DSN8S91E DSNUM 2 WAS SUCCESSFULLY RESTORED FROM A FLASHCOPY, ELAPSED TIME=00:00:00 DSNU1527I 112 19:19:20.81 DSNUCBMT - TABLESPACE DSN8D91A.DSN8S91E DSNUM 3 WAS SUCCESSFULLY RESTORED FROM A FLASHCOPY,
140
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
ELAPSED TIME=00:00:00 DSNU1527I 112 19:19:21.06 DSNUCBMT - TABLESPACE DSN8D91A.DSN8S91E DSNUM 4 WAS SUCCESSFULLY RESTORED FROM A FLASHCOPY, ELAPSED TIME=00:00:00 DSNU1527I 112 19:19:21.27 DSNUCBMT - TABLESPACE DSN8D91A.DSN8S91E DSNUM 5 WAS SUCCESSFULLY RESTORED FROM A FLASHCOPY, ELAPSED TIME=00:00:00 DSNU1511I -D9C1 112 19:19:21.47 DSNUCALA - FAST LOG APPLY WAS NOT USED FOR RECOVERY DSNU1510I 112 19:19:21.47 DSNUCBLA - LOG APPLY PHASE COMPLETE, ELAPSED TIME = 00:00:00 DSNU500I 112 19:19:22.11 DSNUCBDR - RECOVERY COMPLETE, ELAPSED TIME=00:00:02 0DSNU050I 112 19:19:22.12 DSNUGUTC - REBUILD INDEX(ALL) TABLESPACE DSN8D91A.DSN8S91E SORTDEVT SYSDA SORTNUM 4 DSNU395I 112 19:19:22.37 DSNUCRIB - INDEXES WILL BE BUILT IN PARALLEL, NUMBER OF TASKS = 6 DSNU555I -D9C1 112 19:19:22.45 DSNUCRUL - UNLOAD PHASE STATISTICS - NUMBER OF RECORDS PROCESSED=0 DSNU555I -D9C1 112 19:19:22.48 DSNUCRUL - UNLOAD PHASE STATISTICS - NUMBER OF RECORDS PROCESSED=84 DSNU705I 112 19:19:22.48 DSNUCRIB - UNLOAD PHASE COMPLETE - ELAPSED TIME=00:00:00 DSNU394I -D9C1 112 19:19:23.89 DSNURBXC - SORTBLD PHASE STATISTICS - NUMBER OF KEYS=42 FOR INDEX DSN8910.XEMP2 DSNU394I -D9C1 112 19:19:23.97 DSNURBXC - SORTBLD PHASE STATISTICS - NUMBER OF KEYS=42 FOR INDEX DSN8910.XEMP1 DSNU391I 112 19:19:23.98 DSNUCRIB - SORTBLD PHASE STATISTICS. NUMBER OF INDEXES = 2 DSNU392I 112 19:19:23.98 DSNUCRIB - SORTBLD PHASE COMPLETE, ELAPSED TIME = 00:00:01 DSNU010I 112 19:19:24.13 DSNUGBAC - UTILITY EXECUTION COMPLETE, HIGHEST RETURN CODE=0 ICE091I 0 OUTPUT LRECL = 12, TYPE = F ICE080I 0 IN MAIN STORAGE SORT ICE055I 0 INSERT 42, DELETE 42 ICE054I 0 RECORDS - IN: 0, OUT: 0 ICE134I 0 NUMBER OF BYTES SORTED: 504 ICE165I 0 TOTAL WORK DATA SET TRACKS ALLOCATED: 0 , TRACKS USED: 0 ICE199I 0 MEMORY OBJECT STORAGE USED = 0M BYTES ICE180I 0 HIPERSPACE STORAGE USED = 0K BYTES ICE188I 0 DATA SPACE STORAGE USED = 0K BYTES ICE052I 0 END OF DFSORT
In Example 6-3 we list the output from SMS on the FlashCopy FRR execution, which lists the five partitions of the table space restored by fast replication from COPYPOOL=DSN$DB9C$DB.
Example 6-3 DFSHSsms output - RECOVER TS with 5 data sets selecting FlashCopy backup ARC1801I FAST REPLICATION DATA SET RECOVERY IS 597 ARC1801I (CONT.) STARTING FOR DATA SET ARC1801I (CONT.) DB9CD.DSNDBC.DSN8D91A.DSN8S91E.I0001.A001, AT ARC1801I (CONT.) 19:19:19 ON 2008/04/21 $HASP100 IEESYSAS ON STCINRDR IEF196I IEF237I D51C ALLOCATED TO SYS00183 $HASP373 IEESYSAS STARTED IEF403I IEESYSAS - STARTED - TIME=19.19.19 - ASID=0097 - SC63 IEF196I IEF285I SYS1.CSSLIB KEPT IEF196I IEF285I VOL SER NOS= Z19RE1. ARC1861I THE FOLLOWING 0001 DATA SET(S) WERE 604 ARC1861I (CONT.) SUCCESSFULLY PROCESSED DURING FAST REPLICATION DATA ARC1861I (CONT.) SET RECOVERY: ARC1861I (CONT.) DB9CD.DSNDBC.DSN8D91A.DSN8S91E.I0001.A001, COPYPOOL=DSN$DB9C$DB, DEVTYPE=DASD ARC1802I FAST REPLICATION DATA SET RECOVERY HAS 606 ARC1802I (CONT.) COMPLETED FOR DATA SET ARC1802I (CONT.) DB9CD.DSNDBC.DSN8D91A.DSN8S91E.I0001.A001, AT ARC1802I (CONT.) 19:19:20 ON 2008/04/21, FUNCTION RC=0000, MAXIMUM ARC1802I (CONT.) DATA SET RC=0000 ARC1801I FAST REPLICATION DATA SET RECOVERY IS 607 ARC1801I (CONT.) STARTING FOR DATA SET ARC1801I (CONT.) DB9CD.DSNDBC.DSN8D91A.DSN8S91E.I0001.A002, AT ARC1801I (CONT.) 19:19:20 ON 2008/04/21 ARC1861I THE FOLLOWING 0001 DATA SET(S) WERE 608 ARC1861I (CONT.) SUCCESSFULLY PROCESSED DURING FAST REPLICATION DATA ARC1861I (CONT.) SET RECOVERY:
141
ARC1861I (CONT.) DB9CD.DSNDBC.DSN8D91A.DSN8S91E.I0001.A002, COPYPOOL=DSN$DB9C$DB, DEVTYPE=DASD ARC1802I FAST REPLICATION DATA SET RECOVERY HAS 610 ARC1802I (CONT.) COMPLETED FOR DATA SET ARC1802I (CONT.) DB9CD.DSNDBC.DSN8D91A.DSN8S91E.I0001.A002, AT ARC1802I (CONT.) 19:19:20 ON 2008/04/21, FUNCTION RC=0000, MAXIMUM ARC1802I (CONT.) DATA SET RC=0000 ARC1801I FAST REPLICATION DATA SET RECOVERY IS 611 ARC1801I (CONT.) STARTING FOR DATA SET ARC1801I (CONT.) DB9CD.DSNDBC.DSN8D91A.DSN8S91E.I0001.A003, AT ARC1801I (CONT.) 19:19:20 ON 2008/04/21 ARC1861I THE FOLLOWING 0001 DATA SET(S) WERE 612 ARC1861I (CONT.) SUCCESSFULLY PROCESSED DURING FAST REPLICATION DATA ARC1861I (CONT.) SET RECOVERY: ARC1861I (CONT.) DB9CD.DSNDBC.DSN8D91A.DSN8S91E.I0001.A003, COPYPOOL=DSN$DB9C$DB, DEVTYPE=DASD ARC1802I FAST REPLICATION DATA SET RECOVERY HAS 614 ARC1802I (CONT.) COMPLETED FOR DATA SET ARC1802I (CONT.) DB9CD.DSNDBC.DSN8D91A.DSN8S91E.I0001.A003, AT ARC1802I (CONT.) 19:19:20 ON 2008/04/21, FUNCTION RC=0000, MAXIMUM ARC1802I (CONT.) DATA SET RC=0000 ARC1801I FAST REPLICATION DATA SET RECOVERY IS 615 ARC1801I (CONT.) STARTING FOR DATA SET ARC1801I (CONT.) DB9CD.DSNDBC.DSN8D91A.DSN8S91E.I0001.A004, AT ARC1801I (CONT.) 19:19:20 ON 2008/04/21 ARC1861I THE FOLLOWING 0001 DATA SET(S) WERE 616 ARC1861I (CONT.) SUCCESSFULLY PROCESSED DURING FAST REPLICATION DATA ARC1861I (CONT.) SET RECOVERY: ARC1861I (CONT.) DB9CD.DSNDBC.DSN8D91A.DSN8S91E.I0001.A004, COPYPOOL=DSN$DB9C$DB, DEVTYPE=DASD ARC1802I FAST REPLICATION DATA SET RECOVERY HAS 618 ARC1802I (CONT.) COMPLETED FOR DATA SET ARC1802I (CONT.) DB9CD.DSNDBC.DSN8D91A.DSN8S91E.I0001.A004, AT ARC1802I (CONT.) 19:19:21 ON 2008/04/21, FUNCTION RC=0000, MAXIMUM ARC1802I (CONT.) DATA SET RC=0000 ARC1801I FAST REPLICATION DATA SET RECOVERY IS 619 ARC1801I (CONT.) STARTING FOR DATA SET ARC1801I (CONT.) DB9CD.DSNDBC.DSN8D91A.DSN8S91E.I0001.A005, AT ARC1801I (CONT.) 19:19:21 ON 2008/04/21 ARC1802I FAST REPLICATION DATA SET RECOVERY HAS 618 ARC1802I (CONT.) COMPLETED FOR DATA SET ARC1802I (CONT.) DB9CD.DSNDBC.DSN8D91A.DSN8S91E.I0001.A004, AT ARC1802I (CONT.) 19:19:21 ON 2008/04/21, FUNCTION RC=0000, MAXIMUM ARC1802I (CONT.) DATA SET RC=0000 ARC1801I FAST REPLICATION DATA SET RECOVERY IS 619 ARC1801I (CONT.) STARTING FOR DATA SET ARC1801I (CONT.) DB9CD.DSNDBC.DSN8D91A.DSN8S91E.I0001.A005, AT ARC1801I (CONT.) 19:19:21 ON 2008/04/21 IEF196I IEF237I D51C ALLOCATED TO SYS00184 IEF196I IEF285I SYS1.LINKLIB KEPT IEF196I IEF285I VOL SER NOS= Z19RE1. ARC1861I THE FOLLOWING 0001 DATA SET(S) WERE 623 ARC1861I (CONT.) SUCCESSFULLY PROCESSED DURING FAST REPLICATION DATA ARC1861I (CONT.) SET RECOVERY: ARC1861I (CONT.) DB9CD.DSNDBC.DSN8D91A.DSN8S91E.I0001.A005, COPYPOOL=DSN$DB9C$DB, DEVTYPE=DASD ARC1802I FAST REPLICATION DATA SET RECOVERY HAS 625 ARC1802I (CONT.) COMPLETED FOR DATA SET ARC1802I (CONT.) DB9CD.DSNDBC.DSN8D91A.DSN8S91E.I0001.A005, AT ARC1802I (CONT.) 19:19:21 ON 2008/04/21, FUNCTION RC=0000, MAXIMUM
142
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
6.3 Object recovery with Recovery Expert using system level backup
In Example 6-4 we list the full output of the job steps created by DB2 Recovery Expert under a DB2 9 for z/OS environment. The setup follows the same steps as described in 6.1, Object recovery with Recovery Expert under DB2 V8 on page 126. The job steps have been created for the same partitioned table space and indexes of 6.2, Object Recovery using DB2 9 for z/OS system level backup on page 139.
Example 6-4 Job steps created by Recovery Expert for object recovery
1 J E S 2 J O B L O G -- S Y S T E M S C 6 4 -- N O D E W T S C P L X 2 0 21.50.17 JOB02621 ---- MONDAY, 21 APR 2008 ---21.50.17 JOB02621 IRR010I USERID PAOLOR6 IS ASSIGNED TO THIS JOB. 21.50.17 JOB02621 ICH70001I PAOLOR6 LAST ACCESS AT 21:42:50 ON MONDAY, APRIL 21, 2008 21.50.17 JOB02621 $HASP373 PAOLOR6O STARTED - INIT 1 - CLASS A - SYS SC64 21.50.17 JOB02621 IEF403I PAOLOR6O - STARTED - TIME=21.50.17 - ASID=0032 - SC64 21.50.17 JOB02621 --TIMINGS (MINS.)-- ----PAGING COUNTS--21.50.17 JOB02621 -JOBNAME STEPNAME PROCSTEP RC EXCP CPU SRB CLOCK SERV PG PAGE SWAP STEPNO 21.50.17 JOB02621 -PAOLOR6O START#UT 00 162 .00 .00 .00 775 0 0 0 0 0 1 21.50.18 JOB02621 -PAOLOR6O RCVRFRIC 00 596 .00 .00 .02 1451 0 0 0 0 0 2 21.50.23 JOB02621 -PAOLOR6O REBUILD 00 857 .00 .00 .07 33974 0 3 0 0 0 3 21.50.23 JOB02621 -PAOLOR6O START#RW 00 159 .00 .00 .00 758 0 0 0 0 0 4 21.50.23 JOB02621 IEF404I PAOLOR6O - ENDED - TIME=21.50.23 - ASID=0032 - SC64 21.50.23 JOB02621 -PAOLOR6O ENDED. NAME-DB2 UTILITY TOTAL CPU TIME= .00 TOTAL ELAPSED TIME= 21.50.23 JOB02621 $HASP395 PAOLOR6O ENDED 0------ JES2 JOB STATISTICS ------ 21 APR 2008 JOB EXECUTION DATE 134 CARDS READ 426 SYSOUT PRINT RECORDS 0 SYSOUT PUNCH RECORDS 26 SYSOUT SPOOL KBYTES 0.10 MINUTES EXECUTION TIME 1 //PAOLOR6O JOB (ACCNT#),'DB2 UTILITY', JOB02621 // REGION=0M,NOTIFY=&SYSUID, // MSGCLASS=X, // CLASS=A /*JOBPARM SYSAFF=SC64 //* //** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //* * //* Profile: PAOLOR6.D9C2 SINGLE OBJECT * //* Job: 01 of 01 * //* Desc: DB DSN8D91A * //* User: PAOLOR6 * //* Date: Monday 21, 2008 * //* Time: 21:41:10.71 * //* * //** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //* * //** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
VIO SWAPS
.10
143
2 3 4 5 6 7
9 10 11 12 13 14
15
16 17 18 19 20 21
//* * //* Step: START#UT * //* * //* Desc: This step will start all the spaces being recovered * //* in UT (Utility Access Only) mode. * //* * //** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //* * IEFC653I SUBSTITUTION JCL - (ACCNT#),'DB2UTILITY',REGION=0M,NOTIFY=PAOLOR6,MSGCLASS=X,CLASS=A //START#UT EXEC PGM=IKJEFT01,DYNAMNBR=20,COND=(4,LT) //STEPLIB DD DISP=SHR,DSN=DB9C9.SDSNEXIT // DD DISP=SHR,DSN=DB9C9.SDSNLOAD //SYSTSPRT DD SYSOUT=* //SYSPRINT DD SYSOUT=* //SYSTSIN DD * //* //** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //* * //* Step: RCVRFRIC * //* * //* Desc: This step will recover objects requiring a DB2 * //* image copy (or log records) as the starting point * //* of the recovery. * //* * //** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //* * //RCVRFRIC EXEC PGM=DSNUTILB,REGION=006M,COND=(4,LT), // PARM=(D9C2) //* //STEPLIB DD DISP=SHR,DSN=DB9C9.SDSNEXIT // DD DISP=SHR,DSN=DB9C9.SDSNLOAD //SYSPRINT DD SYSOUT=* //SYSOUT DD SYSOUT=* //UTPRINT DD SYSOUT=* //* //SYSIN DD * //* //** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //* * //* Step: REBUILD * //* * //* Desc: This step will rebuild all indexes that could not * //* be recovered via the RECOVER Utility. * //* * //** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //* * //REBUILD EXEC PGM=DSNUTILB,REGION=006M,COND=(4,LT), // PARM=(D9C2) //* //STEPLIB DD DISP=SHR,DSN=DB9C9.SDSNEXIT // DD DISP=SHR,DSN=DB9C9.SDSNLOAD //SYSPRINT DD SYSOUT=* //SYSOUT DD SYSOUT=* //UTPRINT DD SYSOUT=* //* //SYSIN DD * //* //** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //* * //* Step: START#RW * //* * //* Desc: This step will start all the spaces back to RW (Read * //* Write) mode. * //* * //** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //* *
144
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
22 23 24 25 26 27
... ...
1READY DSN SYSTEM(D9C2) DSN -STA DB(DSN8D91A) SP(DSN8S91E) PART(001) ACCESS(UT) DSNT309I -D9C2 DSNTDCST PARTITION DSN8D91A.DSN8S91E.0001 IS CURRENTLY START UT. DSN9022I -D9C2 DSNTDDIS 'START DATABASE' NORMAL COMPLETION DSN -STA DB(DSN8D91A) SP(DSN8S91E) PART(002) ACCESS(UT) DSNT309I -D9C2 DSNTDCST PARTITION DSN8D91A.DSN8S91E.0002 IS CURRENTLY START UT. DSN9022I -D9C2 DSNTDDIS 'START DATABASE' NORMAL COMPLETION DSN -STA DB(DSN8D91A) SP(DSN8S91E) PART(003) ACCESS(UT) DSNT309I -D9C2 DSNTDCST PARTITION DSN8D91A.DSN8S91E.0003 IS CURRENTLY START UT. DSN9022I -D9C2 DSNTDDIS 'START DATABASE' NORMAL COMPLETION DSN -STA DB(DSN8D91A) SP(DSN8S91E) PART(004) ACCESS(UT) DSNT309I -D9C2 DSNTDCST PARTITION DSN8D91A.DSN8S91E.0004 IS CURRENTLY START UT. DSN9022I -D9C2 DSNTDDIS 'START DATABASE' NORMAL COMPLETION DSN -STA DB(DSN8D91A) SP(DSN8S91E) PART(005) ACCESS(UT) DSNT309I -D9C2 DSNTDCST PARTITION DSN8D91A.DSN8S91E.0005 IS CURRENTLY START UT. DSN9022I -D9C2 DSNTDDIS 'START DATABASE' NORMAL COMPLETION DSN -STA DB(DSN8D91A) SP(XEMP1) PART(001) ACCESS(UT) DSNT309I -D9C2 DSNTDCST PARTITION DSN8D91A.XEMP1 .0001 IS CURRENTLY START UT. DSN9022I -D9C2 DSNTDDIS 'START DATABASE' NORMAL COMPLETION DSN -STA DB(DSN8D91A) SP(XEMP2) ACCESS(UT) DSNT309I -D9C2 DSNTDCST PARTITION DSN8D91A.XEMP2 .0001 IS CURRENTLY START UT. DSNT309I -D9C2 DSNTDCST PARTITION DSN8D91A.XEMP2 .0002 IS CURRENTLY START UT. DSNT309I -D9C2 DSNTDCST PARTITION DSN8D91A.XEMP2 .0003 IS CURRENTLY START UT. DSNT309I -D9C2 DSNTDCST PARTITION DSN8D91A.XEMP2 .0004 IS CURRENTLY START UT. DSNT309I -D9C2 DSNTDCST PARTITION DSN8D91A.XEMP2 .0005 IS CURRENTLY START UT. DSN9022I -D9C2 DSNTDDIS 'START DATABASE' NORMAL COMPLETION DSN -STA DB(DSN8D91A) SP(XEMP1) PART(002) ACCESS(UT) DSNT309I -D9C2 DSNTDCST PARTITION DSN8D91A.XEMP1 .0002 IS CURRENTLY START UT. DSN9022I -D9C2 DSNTDDIS 'START DATABASE' NORMAL COMPLETION DSN -STA DB(DSN8D91A) SP(XEMP1) PART(003) ACCESS(UT) DSNT309I -D9C2 DSNTDCST PARTITION DSN8D91A.XEMP1 .0003 IS CURRENTLY START UT. DSN9022I -D9C2 DSNTDDIS 'START DATABASE' NORMAL COMPLETION DSN -STA DB(DSN8D91A) SP(XEMP1) PART(004) ACCESS(UT) DSNT309I -D9C2 DSNTDCST PARTITION DSN8D91A.XEMP1 .0004 IS CURRENTLY START UT. DSN9022I -D9C2 DSNTDDIS 'START DATABASE' NORMAL COMPLETION DSN -STA DB(DSN8D91A) SP(XEMP1) PART(005) ACCESS(UT) DSNT309I -D9C2 DSNTDCST PARTITION DSN8D91A.XEMP1 .0005 IS CURRENTLY START UT. DSN9022I -D9C2 DSNTDDIS 'START DATABASE' NORMAL COMPLETION DSN END 1DSNU000I 112 21:50:17.33 DSNUGUTC - OUTPUT START FOR UTILITY, UTILID = PAOLOR6.PAOLOR6O DSNU1044I 112 21:50:17.37 DSNUGTIS - PROCESSING SYSIN AS EBCDIC 0DSNU050I 112 21:50:17.37 DSNUGUTC - RECOVER TABLESPACE DSN8D91A.DSN8S91E DSNUM(1) TABLESPACE DSN8D91A.DSN8S91E DSNUM(2) TABLESPACE DSN8D91A.DSN8S91E DSNUM(3) TABLESPACE DSN8D91A.DSN8S91E DSNUM(4) TABLESPACE DSN8D91A.DSN8S91E DSNUM(5) PARALLEL(4) TAPEUNITS(2) REUSE LOCALSITE DSNU427I 112 21:50:17.43 DSNUCBMT - OBJECTS WILL BE PROCESSED IN PARALLEL, NUMBER OF OBJECTS = 4 DSNU1520I 112 21:50:17.43 DSNUCBMT - THE RECOVERY BASE FOR TABLESPACE DSN8D91A.DSN8S91E DSNUM 1 IS THE SYSTEM LEVEL BACKUP WITH DATE = 20080417, TIME 165921, AND TOKEN X'C4F9C3F1C24281BC99549809C24274AD53E6' DSNU1527I 112 21:50:17.68 DSNUCBMT - TABLESPACE DSN8D91A.DSN8S91E DSNUM 1 WAS SUCCESSFULLY RESTORED FROM A FLASHCOPY, ELAPSED TIME=00:00:00 DSNU1520I 112 21:50:17.68 DSNUCBMT - THE RECOVERY BASE FOR TABLESPACE DSN8D91A.DSN8S91E DSNUM 2 IS THE SYSTEM LEVEL BACKUP WITH DATE = 20080417, TIME 165921, AND TOKEN X'C4F9C3F1C24281BC99549809C24274AD53E6' DSNU1527I 112 21:50:17.84 DSNUCBMT - TABLESPACE DSN8D91A.DSN8S91E DSNUM 2 WAS SUCCESSFULLY RESTORED FROM A FLASHCOPY, ELAPSED TIME=00:00:00 DSNU1520I 112 21:50:17.84 DSNUCBMT - THE RECOVERY BASE FOR TABLESPACE DSN8D91A.DSN8S91E DSNUM 3 IS THE SYSTEM LEVEL BACKUP WITH DATE = 20080417, TIME 165921, AND TOKEN X'C4F9C3F1C24281BC99549809C24274AD53E6' DSNU1527I 112 21:50:18.06 DSNUCBMT - TABLESPACE DSN8D91A.DSN8S91E DSNUM 3 WAS
145
SUCCESSFULLY RESTORED FROM A FLASHCOPY, ELAPSED TIME=00:00:00 DSNU1520I 112 21:50:18.06 DSNUCBMT - THE RECOVERY BASE FOR TABLESPACE DSN8D91A.DSN8S91E DSNUM 4 IS THE SYSTEM LEVEL BACKUP WITH DATE = 20080417, TIME 165921, AND TOKEN X'C4F9C3F1C24281BC99549809C24274AD53E6' DSNU1527I 112 21:50:18.24 DSNUCBMT - TABLESPACE DSN8D91A.DSN8S91E DSNUM 4 WAS SUCCESSFULLY RESTORED FROM A FLASHCOPY, ELAPSED TIME=00:00:00 DSNU1520I 112 21:50:18.24 DSNUCBMT - THE RECOVERY BASE FOR TABLESPACE DSN8D91A.DSN8S91E DSNUM 5 IS THE SYSTEM LEVEL BACKUP WITH DATE = 20080417, TIME 165921, AND TOKEN X'C4F9C3F1C24281BC99549809C24274AD53E6' DSNU1527I 112 21:50:18.42 DSNUCBMT - TABLESPACE DSN8D91A.DSN8S91E DSNUM 5 WAS SUCCESSFULLY RESTORED FROM A FLASHCOPY, ELAPSED TIME=00:00:00 DSNU1511I -D9C2 112 21:50:18.56 DSNUCALA - FAST LOG APPLY WAS NOT USED FOR RECOVERY DSNU1510I 112 21:50:18.56 DSNUCBLA - LOG APPLY PHASE COMPLETE, ELAPSED TIME = 00:00:00 DSNU500I 112 21:50:18.67 DSNUCBDR - RECOVERY COMPLETE, ELAPSED TIME=00:00:01 DSNU010I 112 21:50:18.68 DSNUGBAC - UTILITY EXECUTION COMPLETE, HIGHEST RETURN CODE=0 1DSNU000I 112 21:50:18.75 DSNUGUTC - OUTPUT START FOR UTILITY, UTILID = PAOLOR6.PAOLOR6O DSNU1044I 112 21:50:18.79 DSNUGTIS - PROCESSING SYSIN AS EBCDIC 0DSNU050I 112 21:50:18.79 DSNUGUTC - REBUILD INDEX(ALL) TABLESPACE DSN8D91A.DSN8S91E SORTDEVT SYSDA SORTNUM 4 DSNU395I 112 21:50:19.05 DSNUCRIB - INDEXES WILL BE BUILT IN PARALLEL, NUMBER OF TASKS = 6 DSNU555I -D9C2 112 21:50:19.14 DSNUCRUL - UNLOAD PHASE STATISTICS - NUMBER OF RECORDS PROCESSED=0 DSNU555I -D9C2 112 21:50:19.21 DSNUCRUL - UNLOAD PHASE STATISTICS - NUMBER OF RECORDS PROCESSED=84 DSNU705I 112 21:50:19.21 DSNUCRIB - UNLOAD PHASE COMPLETE - ELAPSED TIME=00:00:00 DSNU394I -D9C2 112 21:50:23.14 DSNURBXC - SORTBLD PHASE STATISTICS - NUMBER OF KEYS=42 FOR INDEX DSN8910.XEMP2 DSNU394I -D9C2 112 21:50:23.29 DSNURBXC - SORTBLD PHASE STATISTICS - NUMBER OF KEYS=42 FOR INDEX DSN8910.XEMP1 DSNU391I 112 21:50:23.29 DSNUCRIB - SORTBLD PHASE STATISTICS. NUMBER OF INDEXES = 2 DSNU392I 112 21:50:23.29 DSNUCRIB - SORTBLD PHASE COMPLETE, ELAPSED TIME = 00:00:04 DSNU010I 112 21:50:23.36 DSNUGBAC - UTILITY EXECUTION COMPLETE, HIGHEST RETURN CODE=0 1READY DSN SYSTEM(D9C2) DSN -STA DB(DSN8D91A) SP(DSN8S91E) PART(001) ACCESS(RW) DSN9022I -D9C2 DSNTDDIS 'START DATABASE' NORMAL COMPLETION DSN -STA DB(DSN8D91A) SP(DSN8S91E) PART(002) ACCESS(RW) DSN9022I -D9C2 DSNTDDIS 'START DATABASE' NORMAL COMPLETION DSN -STA DB(DSN8D91A) SP(DSN8S91E) PART(003) ACCESS(RW) DSN9022I -D9C2 DSNTDDIS 'START DATABASE' NORMAL COMPLETION DSN -STA DB(DSN8D91A) SP(DSN8S91E) PART(004) ACCESS(RW) DSN9022I -D9C2 DSNTDDIS 'START DATABASE' NORMAL COMPLETION DSN -STA DB(DSN8D91A) SP(DSN8S91E) PART(005) ACCESS(RW) DSN9022I -D9C2 DSNTDDIS 'START DATABASE' NORMAL COMPLETION DSN -STA DB(DSN8D91A) SP(XEMP1) PART(001) ACCESS(RW) DSN9022I -D9C2 DSNTDDIS 'START DATABASE' NORMAL COMPLETION DSN -STA DB(DSN8D91A) SP(XEMP2) ACCESS(RW) DSN9022I -D9C2 DSNTDDIS 'START DATABASE' NORMAL COMPLETION DSN -STA DB(DSN8D91A) SP(XEMP1) PART(002) ACCESS(RW) DSN9022I -D9C2 DSNTDDIS 'START DATABASE' NORMAL COMPLETION DSN -STA DB(DSN8D91A) SP(XEMP1) PART(003) ACCESS(RW) DSN9022I -D9C2 DSNTDDIS 'START DATABASE' NORMAL COMPLETION DSN -STA DB(DSN8D91A) SP(XEMP1) PART(004) ACCESS(RW) DSN9022I -D9C2 DSNTDDIS 'START DATABASE' NORMAL COMPLETION DSN -STA DB(DSN8D91A) SP(XEMP1) PART(005) ACCESS(RW) DSN9022I -D9C2 DSNTDDIS 'START DATABASE' NORMAL COMPLETION DSN END
... ... 1
The sample output shows how Recovery Expert automatically built the steps for: Starting all the spaces being recovered in UT (utility access only) mode Recovering the table space Rebuilding all indexes that could not be recovered via the RECOVER utility Starting all the spaces back to RW (read write) mode
146
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
6.4 PPRC/XRC restriction for using data set level recover from FlashCopy
If the productions volumes have been defined as PPRC or XRC primary, there are some restrictions. They are the same as described in APAR PK23288 for CHECK INDEX SHARELEVEL CHANGE. Since DFSHSM does not currently have support for FlashCopy to a PPRC or XRC Primary volume, the attempt to do a FlashCopy fails and standard I/O is used. If the recovery always needs to be done to a PPRC or XRC Primary volume, then SETSYS FASTREPLICATION(DSR(NONE)) should be issued before. This eliminates the overhead of always failing the FlashCopy and then dropping back to standard I/O.
SLB
Quiesce
Reorg
Imagecopy Quiesce
Restore
Start
Q1 Q2 R1
In this restore scenario 1 (R1), when the object is recovered to the quiesce point (Q2), Recovery Expert detects an imagecopy from the logs and RECOVERs to the LOGPOINT that corresponds to the LRSN of Q2. This involves applying the imagecopy and rolling forward through the logs to the LRSN of Q2. Though there is an SLB prior to the imagecopy, it is expensive to use SLB and roll through the logs. The best solution in this case is to use the imagecopy and roll through the logs as demonstrated in this restore scenario (R1).
147
In restore scenario 2 (R2), shown in Figure 6-22, the object needs to be restored to the quiesce point (Q2). DB2 Recovery Expert detected an SLB closer to the recovery point (Q2) and restores the object to the SLB. Following this, it rolls forward through the logs to complete the recovery to the LRSN of Q2.
Imagecopy
Quiesce
SLB
Quiesce
Restore
Start
Q1
Q2
R2
Though there was a full imagecopy available prior to the SLB, there could be a large amount of log records between these two points, and hence picking up the SLB would be the optimal recovery solution for the recovery scenario 2 (R2). Note: The SLBs shown in this scenario are taken from RE V2.1 with the Enable Obj Restore option set to Y on the corresponding backup profiles. Recovery Expert verifies the availability of the components for the possible solutions and chooses the most productive. If a copy has become unavailable at the execution time, Recovery Expert will automatically revert to the previous copy.
148
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
Part 3
Part
149
150
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
Chapter 7.
151
7.1 Overview
The objective of the traditional DB2 disaster recovery is to transfer processing to a recovery site while losing the minimum amount possible of: Data Work Time Various methods can be used to move the data to a recovery location. Traditionally, many organizations use physical tapes transported by road. An alternative is to transmit the data over the network. The frequency at which the data is shipped determines how much data is lost in case of disaster. This approach typically leaves the system less than a day out of date and does not require a shutdown of the local DB2. However, restoring requires DB2 knowledge at the remote site and the approach is more difficult to synchronize with IMS and CICS. In Figure 7-1, we consider a DFDSS dump of all DB2-related volumes that include DB2 catalog, DB2 directory, user data, BSDS, active logs, ICF catalogs, SMP data sets, and program libraries. The dump is taken periodically (typically, once a week), shipped to the recovery site, and restored.
N o rm a l S ite
D is a s te r R e c o v e r y S ite
P e r io d ic a lly
In c lu d in g D B 2 c a t a lo g /D ir e c t o r y , U s e r d a t a , B S D S , A c tiv e L o g s , IC F c a t a lo g s , S M P d a ta s e ts , P r o g r a m L ib r a r ie s
D F D S S D u m p o f a ll D B 2 - r e la te d v o lu m e s
152
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
In Figure 7-2, on a more frequent basis, for example, nightly, at least, we additionally consider taking and shipping image copies of the DB2 catalog, the DB2 directory, user table spaces, and the integrated catalog facility (ICF) catalog backup. We also force the log to archive in order to be able to recover to the point in time when the archive log was created.
N o r m a l S it e
D is a s te r R e c o v e r y S ite
O N G O IN G
A r c h iv e L o g s U s e r D a t a I m a g e C o p ie s B S D S L is ts
N IG H T L Y (a t le a s t)
U s e r D a ta Im a g e C o p ie s C a ta lo g /D ire c to r y Im a g e C o p ie s L a t e s t A r c h iv e L o g IC F C a ta lo g B a c k u p
For disaster recovery to be successful, consider taking image copies of user page sets, archive logs, and BSDS lists on an ongoing basis, and send to the recovery site. Additional image copies can be created anytime after creation of the original copy by using the COPYTOCOPY utility. With a daily business approach that includes a nightly basis and an ongoing basis (see Figure 7-2), once recovered, the data will be up to date through the last archive log sent. This scenario bases recovery on the latest available archive log and assumes that all copies and BSDS lists (print log map utility output) have arrived at the recovery site.
153
A disadvantage of this option is that, to obtain data consistency, you must bring down DB2 for the length of time it takes to dump the DB2 environment.
To perform the backup, copy and send the following objects to the recovery site on a nightly basis, at least after dumping has been taken periodically as in the previous method (see Figure 7.2.1 on page 153): 1. Image copies of the DB2 catalog, the DB2 directory, and the user table space. Run the COPY utility with RECOVERYDDN (in most cases, in tape). 2. Force archiving to create a consistent set of archive log and BSDS lists. Consider the use of the -ARCHIVE LOG command to force archiving. Consider also issuing the -SET LOG LOGLOAD(0) or -SET LOG CHKTIME(0) command before issuing the -ARCHIVE LOG command so that you have the checkpoint on the truncated active log. Although there is no need to stop DB2 or even to quiesce during this procedure, MODE(QUIESCE) has some advantages. It simplifies restart since there will be no indoubt or inflight URs. There still may be incommit URs and pending writes. It may also make it possible to establish a coordinated quiesce point in IMS or CICS. Once the message DSNJ139I LOG OFFLOAD TASK ENDED is issued, you can release the batch job to run your DSNJU004 report. 3. Integrated catalog facility (ICF) catalog EXPORT and list. Synchronize ICF catalog backup with the cataloging of image copies and archive logs.
154
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
With this option, in addition to copies taken in the previous method (see 7.2.2, Consistent point-in-time recovery on page 154), copy and send the following objects to the recovery site as you produce them on an ongoing basis: 1. Image copies of user page sets Run the COPY utility with RECOVERYDDN (in most cases on tape). If you have a lot of changes to the DB2 catalog and the DB2 directory in the daytime, you should also have frequent image copies of them. COPYTOCOPY allows you to create additional image copies any time after the original has been created. 2. Archive logs You usually use dual archive logging. The second archive log (in most cases sent directly to tape via the install option) is intended as a backup or can be sent to the recovery site in preparation for disaster recovery. 3. BSDS lists You will use the report to determine the fully qualified name of the archive log that you need to restore from and the RBA that you will need to give in the CRESTART statement of DSNJU003. Your system should usually schedule a search for the message DSNJ139I LOG OFFLOAD TASK ENDED. Once the message is issued, you can release the batch job to run your DSNJU004 report.
155
Archive Logs used at DR Set this field to C to have System Backup and Restore Services create copies of the DB2 archive logs that will be used at the disaster recovery site. This option allows us to leave our original archive logs at the local site where they will be available for recoveries or other processing. Once we select this option, we must also fill out the following fields on the window: Copy Local site Logs Specify which archive logs should be used to create the copies for use at the disaster recovery site. Unit for copying archive logs Specify the device type for the copies of the archive logs. DR Archive Log Prefix 1 The data set name prefix to be used when creating copy 1 of the archive logs. This prefix will replace the prefix used when the original archive log was created. DR Archive Log Prefix 2 The data set name prefix to be used when creating copy 2 of the archive logs. This prefix will replace the prefix used when the original archive log was created. Note: If the archive logs are not copied for use at the DR site, the fields in the list above are ignored. Force a checkpoint before Archiving Type Y to force a checkpoint before archiving the logs. System Backup and Restore Services issues a SET LOG LOGLOAD (0) command when this field is set to Y. Force the Active log to Archive This field allows us to force an ARCHIVE LOG command. The current active log is archived when this field is set to Y. For a data sharing group, each members logs are archived individually. If a member of a data sharing group is excluded via the Process Datasharing Subsystems field, that members log is not archived. Only run Archive Log Update Process The value in this field must be set to N for the primary profile. Note: Using a value of Y causes System Backup and Restore Services to only update the archive logs, and back up and rebuild the BSDS. This activity must be performed in a secondary disaster recovery profile. Process Datasharing Subsystems This field allows you to choose how to process archive log subtasks for data sharing group members. A- Process all data sharing group members on all LPARs. S - Process only the SSID under which the recovery profile is being built. This profile must also be generated under this SSID. If you choose this setting, you should ensure that only one of the profiles built for the data sharing group forces a checkpoint and archives the active log. The other profiles should have the Only run Archive Log Update Process field set to Y. This avoids duplicating work already done by the DR job on other subsystems.
156
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
L - Process only the data sharing group members on the current LPAR (under which the profile is being built) If you are building profiles separately for the other LPARs in the data sharing group, then only one of the profiles needs to force a checkpoint and archive the active log. The other profiles should have the Only run Archive Log Update Process field set to Y. This avoids duplicating work already done by the DR job on other subsystems. Note: We recommend that when processing data sharing groups, the profiles specify A for all members of the group. For details on the fields in Figure 7-3, see Creating disaster recovery profiles in DB2 Recovery Expert for z/OS Users Guide Version 2 Release 1, SC19-1222.
ARY$DPRU ---- Update Disaster Recovery Profile ---- 2008/02/26 13:12:08 Option ===> ------------------------------------------------------------------------------Creator: PAOLOR6 Name: D9CG User: PAOLOR6 Share Option: U (Upd,View,No) Description: DB2 Subsystem: D9C1 ------------------------------------------------------------------------------Disaster Recovery Method ==> I (Image copy/System backup) Archive Logs used at DR ==> C (Copied/1/2) Copy Localsite Logs ==> B (1/2/Both/Create 2 copies from 1) Force a checkpoint before Archiving ==> Y (Yes/No) Force the Active log to Archive ==> Y (Yes/No) Only run Archive Log Update Process ==> N (Yes/No) Process Datasharing Subsystems ==> A (All,Ssid,Lpar) Archive Logs needed at DR ==> 014 (days) and/or 000 (hours) Copy Archive Logs to DASD ==> 007 (days) and/or 000 (hours) Unit for copying Archive Logs ==> CART DR Archive Log Prefix 1 ==> D9C1.ARCHLOG1.DR DR Archive Log Prefix 2 ==> D9C1.ARCHLOG2.DR Image copy Options Image Copies (or SLB) used at DR ==> R (Localsite/Recoverysite) Catalog x days of Image Copies at DR==> 007 (0-365) Enter END command to Update Disaster Recover Profile
157
Only run Archive Log Update Process The value in this field must be set to Y in the secondary profile. Figure 7-4 shows the settings for our secondary profile.
ARY$DPRU ---- Update Disaster Recovery Profile ---- 2008/02/26 13:12:08 Option ===> ------------------------------------------------------------------------------Creator: PAOLOR6 Name: D9CG User: PAOLOR6 Share Option: U (Upd,View,No) Description: DB2 Subsystem: D9C1 ------------------------------------------------------------------------------Disaster Recovery Method ==> I (Image copy/System backup) Archive Logs used at DR ==> C (Copied/1/2) Copy Localsite Logs ==> B (1/2/Both/Create 2 copies from 1) Force a checkpoint before Archiving ==> N (Yes/No) Force the Active log to Archive ==> N (Yes/No) Only run Archive Log Update Process ==> Y (Yes/No) Process Datasharing Subsystems ==> A (All,Ssid,Lpar) Archive Logs needed at DR ==> 014 (days) and/or 000 (hours) Copy Archive Logs to DASD ==> 007 (days) and/or 000 (hours) Unit for copying Archive Logs ==> CART DR Archive Log Prefix 1 ==> D9C1.ARCHLOG1.DR DR Archive Log Prefix 2 ==> D9C1.ARCHLOG2.DR Image copy Options Image Copies (or SLB) used at DR ==> R (Localsite/Recoverysite) Catalog x days of Image Copies at DR==> 007 (0-365) Enter END command to Update Disaster Recover Profile
158
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
The build should be scheduled as frequently as we want to establish a point of consistency for recovery. This can be daily or weekly depending on recovery objectives. The output from the build job is a PDS containing the JCL necessary to recover the DB2 subsystem at the remote site. Note: A PDS/E should be used to hold the output from the build jobs. This eliminates the need to frequently compress the output data set. When the primary profile is built, System Backup and Restore Services performs the following tasks: 1. Searches the catalog and finds all appropriate image copies that will be needed at the recovery site. 2. Generates control cards to catalog the image copies at the DR site. 3. Creates the copies and the archive logs to be used at the DR site if requested in the profile. 4. Generates an updated BSDS for use at the DR site with the copied archive log names and stores the resulting file in the PDS to be shipped to the recovery site. The PDS that contains the DR jobs and control records will contain the contents of the BSDS. This eliminates the need to mount tapes at the recovery site to build the BSDS. Also, the BSDS is updated with the new archive log name created if the archive logs were copied. 5. Generates IDCAMS control cards to delete all table space and index space data sets and to create all user-defined table spaces at the DR site. It uses the current table space and index space data set attributes to ensure that the data sets are created with the same attributes at the DR site. Note: A copy of the BSDS is created prior to any updates by System Backup and Restore Services. The original BSDS is never updated by System Backup and Restore Services. The PDS is now ready to be shipped to the recovery site along with the application image copies and the newly created copies of the archive logs. Figure 7-5 on page 160 shows the JCL generated to build the primary profile.
159
//** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //* //* Step: ARY@BULD //* //* Desc: This job will generate the JCL for DR profile //* PAOLOR6.D9CGIC in a batch mode. //* The generated job will be placed in dataset //* PAOLOR6.IC.JCL. //* //* Return Codes: //* //* //* (00) - Disaster Recovery Jobs built successfully //* (12) - Problem occurred during the DR build process //* //** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //* Run ARY DR Build //** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //ARY@BULD EXEC PGM=ARY@BULD,REGION=006M //STEPLIB DD DISP=SHR,DSN=ARY.V2R1M0.SARYLOAD // DD DISP=SHR,DSN=DB9C9.SDSNEXIT // DD DISP=SHR,DSN=DB9C9.SDSNLOAD //DB2PARMS DD DISP=SHR,DSN=ARY.DB2PARMS.CONTROL //ARYBPROF DD DISP=SHR,DSN=ARY.PROFILES //ARYBOFFL DD DISP=SHR,DSN=ARY.OFFOPTS //ARYBPMAP DD DISP=SHR,DSN=ARY.PROFILE.MAPS //ARYBPCAT DD DISP=SHR,DSN=ARY.PROFILE.CATS //ARYSBACK DD DISP=SHR,DSN=ARY.SYSBACK //ARYSBOBJ DD DISP=SHR,DSN=ARY.SYSBACK.OBJS //ARYSBVOL DD DISP=SHR,DSN=ARY.SYSBACK.VOLS //ARYSBSSD DD DISP=SHR,DSN=ARY.SYSBACK.SSIDS //ARYBREPT DD DISP=SHR,DSN=ARY.BREPORT //ISPFILE DD DISP=SHR,DSN=PAOLOR6.IC.JCL //ISPLOG DD SYSOUT=*,DCB=(RECFM=VA,LRECL=125,BLKSIZE=129) //ISPWRK1 DD UNIT=SYSALLDA,SPACE=(CYL,(30,30)), // DCB=(RECFM=FB,LRECL=133,BLKSIZE=1330) //ARYERROR DD SYSOUT=* //SYSTSPRT DD SYSOUT=* //SYSOUT DD SYSOUT=* //ARYDEBUG DD SYSOUT=* //ARY#DATA DD * DISASTER_RECOVERY ( DB2_SUBSYSTEM D9C1 GEN_TO_DATASET PAOLOR6.IC.JCL PROFILE_NAME 'D9CGIC' PROFILE_CREATOR PAOLOR6 EXECUTION_LIB_1 ARY.V2R1M0.SARYLOAD JOB_CARD_1_1 '//PAOLOR62 JOB (XXX,POK),DRJOB2,CLASS=A,' JOB_CARD_1_2 'MSGCLASS=X' JOB_CARD_2_1 '/*JOBPARM SYSAFF=SC63' JOB_CARD_3_1 '//*' JOB_CARD_4_1 '//*' ) //* Figure 7-5 Disaster recovery job that builds DR JCL
* * * * * * * * * * * * * * * * * *
160
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
( D9C1 ARY 'D9CGIC' PAOLOR6 ARY.V2R1M0.SARYLOAD PAOLOR6.IC.JCL '//PAOLOR62 JOB (XXX,POK),DRJOB2,CLASS=A,' 'MSGCLASS=X' '/*JOBPARM SYSAFF=SC63' '//*' '//*' ARY.PROFILES ARY.OFFOPTS ARY.PROFILE.MAPS ARY.PROFILE.CATS ARY.SYSBACK ARY.SYSBACK.OBJS ARY.SYSBACK.VOLS ARY.SYSBACK.SSIDS ARY.BREPORT ARY.OBJECTS ARY.V2R1M0.SARYSAMP ARY#PARM ARY.DB2PARMS.CONTROL ) . . . . . . . . . . . . . . . . .
. .
161
162
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
D9C1#JC2
D9C1#JC3
This job restores the DB2 data sets in the correct order.
163
Description Defines the VSAM clusters for the DB2 catalog and directory, BSDS, active logs, and user-defined VCAT spaces. Contains a copy of the bootstrap data set in 80-byte records. Contains control cards for cataloging the image copies at the recovery site. Contains control cards for copying the archive logs from the tape to the recovery site. Contains the control card for creating the conditional restart. Contains control cards to delete the archive logs (with the NOSCRATCH option) from the recovery site z/OS catalog. Those logs are on tape and will be copied to disk, then cataloged. Contains control cards to uncatalog DB2 spaces at the recovery site, before restoring them from tape. Contains control cards for starting application table spaces in the DB2 subsystem with RW access. Contains a copy of the bootstrap data set in 80-byte records.
D9C1BSDS
D9C1CATL
D9C1CPYL
This member is used by job D9C1#JC1. It is a list of all the archive logs that will be copied to disk. This member is called twice in job D9C1#JC1. It is called once for each DB2 member. This member is used by job D9C1#JC1.
D9C1CRCR D9C1DELA
D9C1DELC
D9C1STRF
D9C2BSDS
This member is used by job D9C1#JC2. It is for the second member in our data sharing group, D9C2.
164
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
165
2. Recreate the DB2 catalog VSAM files. All VSAM and non-VSAM catalog files, log files, BSDS, and user VCAT-defined objects are created with the proper allocations. A sample of the JCL generated by System Backup and Restore Services is shown in Figure 7-8. //** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //* * //* Disaster Recovery Allocate DB2 Datasets * //* 1. DB2 Catalog and Directory Spaces * //* 2. Boot Strap Datasets * //* 3. Active Logs * //* 4. User Defined VCAT Spaces * //* * //* Return Codes: 0 - Successful * //* * //** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //* * //D9C1ALLC EXEC PGM=IDCAMS,REGION=006M //SYSPRINT DD SYSOUT=* //SYSOUT DD SYSOUT=* //SYSIN DD DISP=SHR,DSN=PAOLOR6.IC.JCL(D9C1ALLC) DEFINE CLUSTER ( NAME ('DB9CL.D9C1.BSDS01') REUSE RECORDSIZE(4089 4089) FREESPACE(0 20) KEYS(4 0) CONTROLINTERVALSIZE(04096) STORAGECLASS(DB9CLOG1) MANAGEMENTCLASS(MCDB22) VOLUMES(SBOX5E) TRACKS(00000078,00000002) SHAREOPTIONS(2 3) ) DATA ( NAME ('DB9CL.D9C1.BSDS01.DATA') ) INDEX ( NAME ('DB9CL.D9C1.BSDS01.INDEX') ) ... -
Figure 7-8 The second step of DR job, ssid#JC1, to allocate the DB2 data sets
166
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
3. Catalog all the image copies from the last n number of days (as specified in the DR profile). A sample of the JCL generated by System Backup and Restore Services is shown in Figure 7-9. Note: For data sharing environments, the next substeps are performed for each group member.
//** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //* * //* Disaster Recovery Catalog Image Copies * //* 1. Make sure all image copies needed at DR are cataloged * //* * //* Return Codes: 0 - Successful * //* * //** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //* * //D9C1CATL EXEC PGM=IDCAMS,REGION=006M //SYSPRINT DD SYSOUT=* //SYSOUT DD SYSOUT=* //SYSIN DD DISP=SHR,DSN=PAOLOR6.IC.JCL(D9C1CATL) //*
Figure 7-9 The third step of the ssid#JC1 DR job - recover
4. Rebuild the BSDS from the 80-byte record file, placing it back into 4,089-byte records. A sample of the JCL generated by System Backup and Restore Services is shown in Figure 7-10. //** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //* //* Disaster Recovery Rebuild Boot Strap Dataset into 4080 byte recs //* //* Return Codes: 0 - Successful //* //** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //* //D9C1RBSR EXEC PGM=ARY@YRBS,REGION=006M //STEPLIB DD DISP=SHR,DSN=ARY.V2R1M0.SARYLOAD //BSDS#IN DD DISP=SHR,DSN=PAOLOR6.IC.JCL(D9C1BSDS) //BSDS#OUT DD DSN=&BSDS,DISP=(NEW,PASS,DELETE), // UNIT=3390,SPACE=(TRK,(10,10),RLSE), // DCB=(RECFM=V,LRECL=4093)
Figure 7-10 Fourth step of ssid#JC1 job - rebuild the BSDS
* * * * * * * *
167
5. Restores the BSDS by placing the 4,089-byte records into a VSAM file. A sample of the JCL generated by System Backup and Restore Services is shown in Figure 7-11. //** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //* * //* Disaster Recovery Copy Boot Strap Dataset into VSAM datasets * //* * //* Return Codes: 0 - Successful * //* * //** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //* * //D9C1CPBS EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SYSOUT DD SYSOUT=* //BSDSI DD DSN=&BSDS,DISP=(OLD,DELETE,DELETE) //BSDS1 DD DISP=SHR,DSN=DB9CL.D9C1.BSDS01 //BSDS2 DD DISP=SHR,DSN=DB9CL.D9C1.BSDS02 //SYSIN DD * REPRO INFILE(BSDSI) OUTFILE(BSDS1) REUSE REPRO INFILE(BSDSI) OUTFILE(BSDS2) REUSE
Figure 7-11 The fifth step uses REPRO to update the BSDS with the information from the previous step
6. Create a conditional restart. A sample of the JCL generated by System Backup and Restore Services is shown in Figure 7-12. //** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //* * //* Disaster Recovery Create Conditional Restart Control Record * //* * //* Return Codes: 0 - Successful * //* * //** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //* * //D9C1CRCR EXEC PGM=DSNJU003,REGION=006M //STEPLIB DD DISP=SHR,DSN=ARY.V2R1M0.SARYLOAD // DD DISP=SHR,DSN=DB9C9.SDSNEXIT // DD DISP=SHR,DSN=DB9C9.SDSNLOAD //SYSPRINT DD SYSOUT=* //SYSUT1 DD DISP=SHR,DSN=DB9CL.D9C1.BSDS01 //SYSUT2 DD DISP=SHR,DSN=DB9CL.D9C1.BSDS02 //SYSIN DD DISP=SHR,DSN=PAOLOR6.IC.JCL(D9C1CRCR) .. CRESTART CREATE,ENDLRSN=C20EE3B28480,FORWARD=YES,BACKOUT=YES
Figure 7-12 The sixth step creates the CRCR record for DB2 to restart properly for recovery
168
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
7. Print the contents of the BSDS. A sample of the JCL generated by System Backup and Restore Services is shown in Figure 7-13. //** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //* * //* Disaster Recovery Print the Boot Strap Dataset 1 * //* * //* Return Codes: 0 - Successful * //* * //** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //* * //D9C1PRNT EXEC PGM=DSNJU004,REGION=006M //STEPLIB DD DISP=SHR,DSN=ARY.V2R1M0.SARYLOAD // DD DISP=SHR,DSN=DB9C9.SDSNEXIT // DD DISP=SHR,DSN=DB9C9.SDSNLOAD //SYSPRINT DD SYSOUT=* //SYSUT1 DD DISP=SHR,DSN=DB9CL.D9C1.BSDS01
Figure 7-13 The seventh step prints the BSDS information
8. Uncatalog the tape archive logs. 9. Copy the uncataloged tape archive logs to disk and catalog them. This step speeds the recoveries at the DR site because the tape logs will be copied to disk, and all recovers that apply the log will use the disk copy instead of the tape copy. A sample of the JCL generated by System Backup and Restore Services is shown in Figure 7-14. //** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //* * //* Disaster Recovery Copy Archive Logs from Tape to DASD * //* * //* Return Codes: 0 - Successful * //* * //** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //* * //D9C1YCPL EXEC PGM=ARY@YCPL,REGION=006M //STEPLIB DD DISP=SHR,DSN=ARY.V2R1M0.SARYLOAD //SYSPRINT DD SYSOUT=* //SYSOUT DD SYSOUT=* //ARY@CNTL DD DISP=SHR,DSN=PAOLOR6.IC.JCL(D9C1CPYL)
Figure 7-14 The last step of job ssid#JC1 copies the archives logs from tape to DASD
169
b. Set the site as local or recovery. c. Change the INSTALLSYSADM and INSTALLSYSOPR user IDs to the user ID that will be recovering the DB2 catalog. Note: You can create a DR DSNZPARMS member at the local site with the necessary settings for the recovery site, and maintain it in the local site SDSNEXIT library for the subsystem. When the MVS catalog is restored at the recovery site, this ZPARMS member will already be on site and contain the proper settings for disaster recovery. 2. Start DB2 using the reassembled DSNZPARMs. Note: When restoring DB2 9 subsystems using the image copy method, DB2 must be started with ACCESS(MAINT). For all other restorations, we recommend that DB2 be started with ACCESS(MAINT). 3. Reply to conditional restart messages for each subsystem with Y. 4. Run the ssid#JC2 job to force application table spaces to start in RW mode. This job starts all application table spaces in the DB2 subsystem with read-write (RW) access. See Figure 7-15. Note: While optional, we recommend this job. If any table space is not in RW mode, the recovery will fail.
//** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //* * //* Step: * //* * //* Desc: This job is an optional Disaster Recovery job. This * //* job is to be run after the DB2 Subsystem has been * //* started and the DB2 Catalog and Directory have been * //* recovered. * //* * //* This step will start all spaces in the entire DB2 * //* subsystem in RW (Read Write) mode. If any spaces * //* have an invalid status pending, the recovery of that * //* object will fail and your recovery job will be * //* terminated. Starting all spaces in RW mode will * //* ensure that the your application recovery job will * //* not fail and require a utility restart. * //* * //** * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //* // EXEC PGM=IKJEFT1A,REGION=006M //STEPLIB DD DISP=SHR,DSN=ARY.V2R1M0.SARYLOAD // DD DISP=SHR,DSN=DB9C9.SDSNEXIT // DD DISP=SHR,DSN=DB9C9.SDSNLOAD //SYSTSPRT DD SYSOUT=* //SYSTSIN DD DISP=SHR,DSN=PAOLOR6.IC.JCL(D9C1STRF)
Figure 7-15 The second DR job, xxxx$JC1, is optional
170
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
Figure 7-16 DR Job xxx#JC3 recovers DB2 data sets in the proper order
171
7.5 Considerations
The solution we discussed here just addressed a DB2 subsystem. If you have CICS or IMS installed as transaction a manager, you need to consider the challenges associated with keeping resources from all the subsystems in sync. Because of difficulties in coordinating across DB2 and CICS or IMS, other more general solutions may be preferable.
172
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
Chapter 8.
173
In the next scenario we provide an example of how to select a specific system level backup for offloading to tape. You will select the backup based upon information stored in the Recovery Expert System Backup Recovery Services repository. There are two ways to offload your system level backup to tape: During your system level backup execution This is an option that you select and that is part of your BACKUP PROFILE. As a stand-alone task This option generates a task that allows you to perform an offload to tape at any time. It is dependant on a previously successful execution of a BACKUP SYSTEM.
174
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
In the example in Figure 8-2 a BACKUP PROFILE that was previously created and used will be updated to enable offloading from DASD to tape.
ARY$BPRD -------- Backup Profile Display -------- 2008/02/22 19:40:05 Option ===> Scroll ===> CSR ------------------------------------------------------------------------------Profile Like * Creator Like * Row 1 of 1 > ------------------------------------------------------------------------------Cmd Name Creator SSID Updt U D9C1 PAOLOR6 D9C1 U ***************************** Bottom of Data ********************************
In Figure 8-2 the backup profile, D9C1, is selected for update. Backup profiles are reusable and editable, and are created on a per-subsystem basis. After profile setup has been run, you cannot change the SSID or method of backup in a profile, but you can change other settings, as well as redefine the source and target volumes for the offload options. See Figure 8-3.
ARY$BPRU ---------- Update Backup Profile --------- 2008/02/22 19:43:18 Option ===> Scroll ===> CSR ------------------------------------------------------------------------------Creator: PAOLOR6 Name: D9C1 User: PAOLOR6 Share Option: U (Upd,View,No) Description: D9C1 SYSTEM LEVEL BACKUP -------------------------------- Backup Options -----------------------------DB2 Subsystem ==> D9C1 Current Generation==> 02 Backup Method ==> D (Bcv/Snap/Flash/Db2) Setup Needed ==> N Backup Scope ==> F (Full/Data) Issue Log Suspend ==> N (Yes/No) Backup Generations==> 02 (01 - 99) Validate DB2 Vols ==> Y (Yes/No) Offload Options ==> Y (Yes/No/Update) Enable Obj Restore==> N (Yes/No) ------------------ Volume Mappings ----------------Row 1 of 44 + Source Dev Src Target Cmd Volumes Type Unit Volumes Message Area SBOX5A 3390-9 D800 SBOX6I SBOX7I SBOX5B 3390-9 D900 SBOX6J SBOX7J SBOX5C 3390-9 DA00 SBOX6K SBOX7K SBOX5D 3390-9 DB00 SBOX6L Valid Line Cmds: (I-Insert, D-Delete) Figure 8-3 Selecting the offload options to update the backup profile
175
When you initially select this option, the Offload Options window appears in order for you to specify offload options. See Figure 8-4. If you edit the profile at a later time and wish to update the offload options, enter U in this field.
ARY$OFF1 ------------- Offload Options ------------ 2008/02/22 19:44:33 Option ===> ------------------------------------------------------------------------------Creator: PAOLOR6 Name: D9C1 User: PAOLOR6 Share Option: U (Upd,View,No) Description: D9C1 SYSTEM LEVEL BACKUP ------------------------------------------------------------------------------Enter the Offload options to associate with this Backup profile: Local Primary Local Backup Recovery Site Primary Recovery Site Backup Offload Generations Delete Aged Backup files Compress Data Data Mover Number of Tasks ==> ==> ==> ==> ==> ==> ==> ==> ==> Y N Y N 01 Y N D 02 (Yes/No/Update) (Yes/No/Update) (Yes/No/Update) (Yes/No/Update) (1 - 99) (Yes/No) (Yes/No) (Dfsmsdss, Fdr, or fdrInstant) (1 - 99)
The Offload Options window, shown in Figure 8-5 on page 177, allows you to define offload specifications to meet your site's needs, such as the backup destination, data set naming conventions, and which data mover you want to use for the offload. When you build a backup profile and set the Perform Offload field to Y, ARY offloads the backup per these specifications when the job is run. Specify how many generations of backups you want to keep. ARY rolls off the oldest copy if required. Note: All backup types (LP, LB, RP, and RB) are done simultaneously. If you specify four backups to offload and specify one task, four tape drives will be required. The example above will cause the backup to ask for four drives two backup types (LP and RP) and two tasks.
176
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
ARY$OFF1 ------------- Offload Options ------------ 2008/03/09 22:46:09 Option ===> ------------------------------------------------------------------------------Creator: PAOLOR6 Name: D9C1 User: PAOLOR6 Share Option: U (Upd,View,No) Description: D9C1 SYSTEM LEVEL BACKUP ------------------------------------------------------------------------------Enter the Offload options to associate with this Backup profile: Local Primary Local Backup Recovery Site Primary Recovery Site Backup Offload Generations Delete Aged Backup files Compress Data Data Mover Number of Tasks ==> ==> ==> ==> ==> ==> ==> ==> ==> U N U N 02 Y Y D 02 (Yes/No/Update) (Yes/No/Update) (Yes/No/Update) (Yes/No/Update) (1 - 99) (Yes/No) (Yes/No) (Dfsmsdss, Fdr, or fdrInstant) (1 - 99)
Enter END command to return to the previous screen Figure 8-5 Offload options specification for the LP and RP copies
You have the choice to update the output options for each copy type. Enter U to update the options, as shown in Figure 8-6.
ARY$OFF2 ----------- LP Offload Options ----------- 2008/03/09 23:00:19 Option ===> ------------------------------------------------------------------------------Creator: PAOLOR6 Name: D9C1 User: PAOLOR6 Share Option: U (Upd,View,No) Description: D9C1 SYSTEM LEVEL BACKUP ------------------------------------------------------------------------------Update DSN Specification Unit Type Catalog Data Class Storage Class Management Class Tape specific parameters Stack Backups on Tape Tape Stack Limit Expiration date *or* Retention period Maximum Tapes => Y (Yes/No) => CART (CART/DISK/etc.) => Y (Yes/No) => (8 character class) => (8 character class) => (8 character class) (only needed if Unit Type is a Tape device): => Y (Yes/No) => 005 (1 - 999) => (YYYYDDD/YYDDD) => 0060 (4 digit number) => 005 (1-256)
Enter END command to return to the previous screen Figure 8-6 Offload options specifications for the local copy
This Offload Options window allows you to define parameters for your backup files, such as SMS data set information, storage location, and tape options.
177
Each volume in the system backup is dumped (or copied to tape) in one file. The most important fields are: Unit Type - This is checked to be a valid unit at your site. It might be possible to enter a disk unit that is set up as a remote disk at the disaster recovery site. Catalog - Controls whether the dump files are cataloged at the local site. Stack - Controls whether Recovery Expert will stack the volume dumps onto tape. If yes, the tape stack limit indicates how many volume dumps will be written before a new tape is requested. Recovery Expert SBRS will dynamically allocate all tapes and keep the tape mounted across all tape-stacking activities. Expiration date - The date at which the tape management system will place the tape volser back in the scratch pool. Retention period - The number of days before the TMS will place the tape back in the scratch pool. U (update) is entered in Figure 8-7 to build the output data set names for the local copy.
ARY$OFF3 ------ LP Offload DSN Specification ------ 2008/03/09 23:04:09 Option ===> ------------------------------------------------------------------------------Creator: PAOLOR6 Name: D9C1 User: PAOLOR6 Share Option: U (Upd,View,No) Description: D9C1 SYSTEM LEVEL BACKUP ------------------------------------------------------------------------------Enter codes to create a dataset name specification: Qualifier code ==> Free form literal ==> Show DSN ==> N Current dataset name qualifier string: &UID..&SSID..D&DAY..OFFLOD1.&VOLSER Valid dataset name specification codes are: 1. Volser 9. Day (DD) 2. Vcatname 10. Julian Day (DDD) 3. Subsystem ID 11. Hours (HH) 4. User ID 12. Minutes (MM) 5. Time (HHMMSS) 13. Seconds (SS) 6. Date (YYYYDDD) 14. Timestamp 7. Year (YYYY) 15. Random Number 8. Month (MM) 16. GDG (+1)..(+n)
17. Backup Type (#18.#19) 18. Local/Recovery (L/R) 19. Primary/Backup (P/B) 20. Job Name 21. Step Name 22. Profile Creator 23. Profile Name 24. Substring Qualifier 25. Use freeform literal Enter END command to return to the previous screen Figure 8-7 Updating the output naming convention for the offload
The Offload DSN Specification window allows you to build data set names using variables that are resolved at runtime. You need to review and update all the data set naming conventions for each copy type (LP, LB, RP, RB) that you selected for offloading. Note that you should include the VOLSER parameter somewhere in the data set name. We also recommend including a time stamp or some sort of time/date variable. This will make the data set names used to hold the volume dumps unique across each offload and multiple offloads.
178
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
Once you have updated the backup profile you can build the system level backup job. The system level backup JOB will now have an additional step that offloads the backup to tape. as shown in Figure 8-8.
... //ARY#REPT //ARYSNAPO //ARY#PARM //ARYIN BACKUP /* //* //** * * * //* //* Step: //* //* Desc: //* //** * * * //* //ARYJOFFL //* //STEPLIB // // //DB2PARMS //ARYBPROF //ARYBOFFL //ARYBPMAP //ARYBPCAT //ARYSBACK //ARYSBOBJ //ARYSBVOL //ARYSBSSD //ARYBREPT //ARY#REPT //SYSOUT //ARYOUT //ARYSNAPO //ARY#PARM //ARYIN OFFLOAD
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * ARYJOFFL * * This step will invoke the Offload job. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * EXEC PGM=ARY@MAIN,REGION=006M,COND=(4,LT) DD DISP=SHR,DSN=ARY.V2R1M0.SARYLOAD DD DISP=SHR,DSN=DB9C9.SDSNEXIT DD DISP=SHR,DSN=DB9C9.SDSNLOAD DD DISP=SHR,DSN=ARY.DB2PARMS.CONTROL DD DISP=SHR,DSN=ARY.PROFILES DD DISP=SHR,DSN=ARY.OFFOPTS DD DISP=SHR,DSN=ARY.PROFILE.MAPS DD DISP=SHR,DSN=ARY.PROFILE.CATS DD DISP=SHR,DSN=ARY.SYSBACK DD DISP=SHR,DSN=ARY.SYSBACK.OBJS DD DISP=SHR,DSN=ARY.SYSBACK.VOLS DD DISP=SHR,DSN=ARY.SYSBACK.SSIDS DD DISP=SHR,DSN=ARY.BREPORT DD SYSOUT=* DD SYSOUT=* DD SYSOUT=* DD SYSOUT=* DD DSN=ARY.V2R1M0.SARYSAMP(ARY#PARM),DISP=SHR DD * PAOLOR6.D9C1 GENERATION LAST-BACKUP
179
The example in Figure 8-9 shows how to select a DASD-based system level backup for offloading to tape.
ARY$MAIN ------- Recovery Expert for DB2 -----Option ===> R User: PAOLOR6 - ARY ------------------------------------------------------------------------------B. System Backup Profiles R. System Restore and Offload O. Object Recovery Profiles D. Disaster Recovery Profiles M. DB2 Subsystem Analysis and Setup S. Product Setup X. Exit
Enter END command to return to ISPF. Figure 8-9 Selection options for an offload - R
180
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
In Figure 8-10, a list of valid recovery points is displayed. The Restore System Display shows a list of valid system restore points from which you can choose the event that you need to restore a subsystem. V (View Reports) is entered to show the details of the system level backup.
ARY$REST Option ===> -------- Restore System Display -------- 2008/03/09 23:22:06 Scroll ===> CSR
DB2 Subsystem ID * ------------------------------------------------------------------------------Select a row from the list of recovery points displayed below. To enter an RBA/LRSN and have a recovery point automatically selected for you, enter the RESTORE primary command followed by a DB2 subsystem ID. ------------------------------------------------------------------------------Row 1 of 6 > Data Mixed On On Obj Nbr Cmd Date Time Only Data Disk Offload Rcvr Type Vols V 03/06/2008 17:17:40 No No Yes Yes No DB2 0022 SSID: D9C1 RBA/LRSN: C20DC63434CC 03/04/2008 18:34:35 No No No Yes No DB2 0022 SSID: D9C1 RBA/LRSN: C20B53AAF74B 03/04/2008 15:49:16 No No Yes Yes No DB2 0022 SSID: D9C1 RBA/LRSN: C20B2EB5DC9F ***************************** Bottom of Data *********************************
Valid Line Commands: ( S - Select, D - Delete, V - View Report, O - Offload ) Figure 8-10 Selecting a valid recovery point for an offload - view details
181
The view report (Figure 8-11) gives you detailed information about the system level backup, which completed successfully.
ARY$BREP Option ===> --------- Backup Report Display -------- 2008/03/09 23:26:10 Scroll ===> CSR Row 1 of 112 +>
----------------------------------------------------Recovery Expert for DB2 z/OS Backup Summary Report Utility Executed:......... Profile Name:............. DB2 Subsystem:............ DB2 Version:.............. Backup Type:.............. Backup Contains:.......... Nbr of Volumes:........... HSM Backup Token:......... Backup LRSN:.............. Last Checkpoint LRSN:..... Backup Date:.............. Backup Time:.............. Consistency Method:....... Supports Object Restore:.. I/O Suspend Time:......... I/O Resume Time:..........
Backup PAOLOR6.D9C1 D9C1 0910 IBM System Level Backup Object Data and Log Data 0022 C4F9C3F1C20DC63434CCF686C20DC486FBCE C20DC63434CC C20DC6305D36 03/06/2008 17:17:40 IBM System Level Backup No 2008-03-06-17.17.29.040237 2008-03-06-17.17.40.684636
Backup Volume Detail Report <-Source Volumes-> Volser Ucb# Devtyp ------ ---- -----SBOX5A D800 3390-9 SBOX5B D900 3390-9 SBOX5C DA00 3390-9 ... SBOX5U DC02 3390-9 SBOX5V DD02 3390-9 <-Targets-> Volser Ucb# ------ ---SBOX7I D807 SBOX7J D907 SBOX7K DA07 <--------Data Obj OCat ALog --- ---- ---No No Yes No No No No No Yes Types--------> ACat RLog RCat ---- ---- ---No No Yes No No No No No No
SBOX7C DA06 Yes Yes No No No No SBOX7D DB06 Yes No No No No No Recovery Expert for DB2 z/OS Volume Offload Summary Report
Utility Executed:......... Offload Profile Name:............. PAOLOR6.D9C1 Offload Date:............. 03/06/2008 Offload Time:............. 17:17:42 Data Mover:............... DFSMSdss Compress:................. Yes Generation:............... 0002 Nbr Of Volumes:........... 0022 ------ ---- ---- -------------------------------------------SBOX5A D800 LP PAOLOR6.D9C1.D06.OFFLOD1.SBOX7I RP PAOLOR6.D9C1.D066.OFFLOD1.P.SBOX7I SBOX5B D900 LP PAOLOR6.D9C1.D06.OFFLOD1.SBOX7J RP PAOLOR6.D9C1.D066.OFFLOD1.P.SBOX7J ... Figure 8-11 Example of the view report output
182
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
This same information was produced when the system level backup job ran and is part of the job output. See Figure 8-12.
(Yes/No)
Job Cards: //PAOLOR6O JOB (XXX,POK),PAOLOR6,CLASS=A,MSGCLASS=H /*JOBPARM SYSAFF=SC63 //* //* Press ENTER to process or PF3 to Cancel
Figure 8-12 Window to specify JOBCARD information and output data set name for offload JCL
The Build Offload Job window, shown in Figure 8-13, lets you specify locations for the output of the offload job.
//ARYJOFFL //* //STEPLIB // // //DB2PARMS //ARYBPROF //ARYBOFFL //ARYBPMAP //ARYBPCAT //ARYSBACK //ARYSBOBJ //ARYSBVOL //ARYSBSSD //ARYBREPT //ARY#REPT //SYSOUT //ARYOUT //ARYSNAPO //ARY#PARM //ARYIN OFFLOAD EXEC PGM=ARY@MAIN,REGION=006M,COND=(4,LT) DD DISP=SHR,DSN=ARY.V2R1M0.SARYLOAD DD DISP=SHR,DSN=DB9C9.SDSNEXIT DD DISP=SHR,DSN=DB9C9.SDSNLOAD DD DISP=SHR,DSN=ARY.DB2PARMS.CONTROL DD DISP=SHR,DSN=ARY.PROFILES DD DISP=SHR,DSN=ARY.OFFOPTS DD DISP=SHR,DSN=ARY.PROFILE.MAPS DD DISP=SHR,DSN=ARY.PROFILE.CATS DD DISP=SHR,DSN=ARY.SYSBACK DD DISP=SHR,DSN=ARY.SYSBACK.OBJS DD DISP=SHR,DSN=ARY.SYSBACK.VOLS DD DISP=SHR,DSN=ARY.SYSBACK.SSIDS DD DISP=SHR,DSN=ARY.BREPORT DD SYSOUT=* DD SYSOUT=* DD SYSOUT=* DD SYSOUT=* DD DSN=ARY.V2R1M0.SARYSAMP(ARY#PARM),DISP=SHR DD * PAOLOR6.D9C1 GENERATION 01 DATE 02/26/2008 TIME 18:05:03
183
Profile Name:............. Offload Date:............. Offload Time:............. Data Mover:............... Compress:................. Generation:............... Nbr Of Volumes:...........
Recovery Expert for DB2 z/OS Volume Offload Detail Report <---DB2---> <----Tape----> Volser Ucb# Type Offloaded to Filename FileSeq Volser ------ ---- ---- -------------------------------------------- ------- -----SBOX5A D800 LP PAOLOR6.D9C1.D06.OFFLOD1.SBOX7I 001 CART0B RP PAOLOR6.D9C1.D066.OFFLOD1.P.SBOX7I 001 CART0D SBOX5B D900 LP PAOLOR6.D9C1.D06.OFFLOD1.SBOX7J 001 CART0A RP PAOLOR6.D9C1.D066.OFFLOD1.P.SBOX7J 001 CART0C SBOX5C DA00 LP PAOLOR6.D9C1.D06.OFFLOD1.SBOX7K 002 CART0B ... 17:17:42 ARYS001I - Recovery Expert for DB2 z/OS Starting. Version 02.01.013 17:17:42 ARYS162I - Parmlib used for this execution 17:17:42 ARYS003I - Control Cards: 17:17:42 ARYS004I OFFLOAD PAOLOR6.D9C1 17:17:42 ARYS004I GENERATION LAST-BACKUP 17:17:42 ARYS004I 17:17:42 ARYS123I - Backup PAOLOR6.D9C1 generation 002 was read from the repository. 17:17:42 ARYS004I - Performing full volume offload. 17:17:42 ARYS249I - Task 02 - Offload process starting for unit D907 (Source volser SBOX5B). 17:17:42 ARYS249I - Task 01 - Offload process starting for unit D807 (Source volser SBOX5A). 17:20:00 ARYS263I - Task 02 - Unit D907 offloaded to local primary dataset PAOLOR6.D9C1.D06.OFFLOD1.SBOX7J 17:20:00 ARYS263I - Task 02 - Unit D907 offloaded to remote primary dataset PAOLOR6.D9C1.D066.OFFLOD1.P.SBOX7J 17:20:00 ARYS254I - Task 02 - Offload process for unit D907 (Source volser SBOX5B) is complete. 17:20:00 ARYS249I - Task 02 - Offload process starting for unit DB07 (Source volser SBOX5D). 17:20:19 ARYS263I - Task 01 - Unit D807 offloaded to local primary dataset PAOLOR6.D9C1.D06.OFFLOD1.SBOX7I 17:20:19 ARYS263I - Task 01 - Unit D807 offloaded to remote primary dataset PAOLOR6.D9C1.D066.OFFLOD1.P.SBOX7I 17:20:19 ARYS254I - Task 01 - Offload process for unit D807 (Source volser SBOX5A) is complete. 17:20:19 ARYS249I - Task 01 - Offload process starting for unit DA07 (Source volser SBOX5C).
...
184
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
Preparing your disaster recovery profiles at your local site is the first step to perform to eventually build JOBS to recover your subsystem at a remote site. Once the profiles have been created you can run the jobs on a continuous basis as part of your scheduler. Specify D for Disaster Recovery Profile in the menu shown in Figure 8-14. Note: For a data sharing group, you only need to specify one profile for the group if you want to process all the members. System Backup and Restore Services will start a recovery subtask for each member in the data sharing group, including the copying of all the archive logs in one multi-tasking job for the entire data sharing group.
ARY$MAIN ------- Recovery Expert for DB2 z/OS -----Option ===> D User: PAOLOR6 - ARY ------------------------------------------------------------------------------B. System Backup Profiles R. System Restore and Offload O. Object Recovery Profiles D. Disaster Recovery Profiles M. DB2 Subsystem Analysis and Setup S. Product Setup X. Exit
Figure 8-14 Recovery Expert main menu - using option D to create a disaster recovery profile
The accuracy of your disaster recovery depends on how you define your disaster recovery profiles. To ensure an accurate recovery, you may need to build several disaster recovery profiles and ensure that the jobs produced from the profile are executed on a regular basis. This can be achieved via your job scheduler. Disaster recovery profiles can be renamed, viewed, and deleted in the same manner as backup object profiles. The updates to the disaster recovery profile are shown in Figure 8-15 on page 186. We list the values specified for the fields shown in the window in the example in Figure 8-15 on page 186: We select the disaster recovery method for this disaster recovery profile by specifying S for system level backups. By contrast, in Chapter 7, Traditional image copy recovery on page 151, the image copy selection was used for the recovery method at the disaster recovery site. We specify C for archive logs used at DR. Archive logs will be copied and will be used at the disaster recovery site. For copy localsite logs, we choose B for both.
185
We specify Y for force a checkpoint before archiving. This will cause ARY to issue a SET LOG LOGLOAD(0) command. When Y is specified in this field, the recovery job only includes archive log processing. Specify this option to reduce the overhead involved in deleting and creating catalog entries for image copies when no changes have been made other than table updates. This option should only be specified for jobs after a comprehensive recovery job has been built. We also set Force the Active log to Archive to Y. The option between Y and N for Only run Archive Log Update Process has some performance implications. If you specify N, Recovery Expert will build members ARYREPOC and ARYREPOD, which are used to define the VSAM Repository files, and it will create all the catalog entries for image copies. Building members ARYREPOC and ARYREPOD is only needed once. Once you have run with this option at least once in N, then you can change it to Y, as it will reduce the work involved in building the jobs.
ARY$DPRU ---- Update Disaster Recovery Profile ---- 2008/02/26 13:12:08 Option ===> ------------------------------------------------------------------------------Creator: PAOLOR6 Name: D9CG User: PAOLOR6 Share Option: U (Upd,View,No) Description: DB2 Subsystem: D9C1 ------------------------------------------------------------------------------Disaster Recovery Method ==> S (Image copy/System backup) Archive Logs used at DR ==> C (Copied/1/2) Copy Localsite Logs ==> B (1/2/Both/Create 2 copies from 1) Force a checkpoint before Archiving ==> Y (Yes/No) Force the Active log to Archive ==> Y (Yes/No) Only run Archive Log Update Process ==> N (Yes/No) Process Datasharing Subsystems ==> A (All,Ssid,Lpar) Archive Logs needed at DR ==> 014 (days) and/or 000 (hours) Copy Archive Logs to DASD ==> 007 (days) and/or 000 (hours) Unit for copying Archive Logs ==> CART DR Archive Log Prefix 1 ==> D9C1.ARCHLOG1.DR DR Archive Log Prefix 2 ==> D9C1.ARCHLOG2.DR Image copy Options Image Copies (or SLB) used at DR ==> R (Localsite/Recoverysite) Catalog x days of Image Copies at DR==> 007 (0-365) Enter END command to Update Disaster Recover Profile
Note: We recommend that you create two disaster recovery profiles. One should be a primary profile that includes forcing both a checkpoint and an active log to archive, and that has the Only run Archive Log Update Process field set to N. The other profile to be created should have the Only run Archive Log Update Process field set to Y. This will not force a checkpoint or force the active log to archive. This job should be run periodically throughout the day to keep the recovery information up to date as much as possible and be added to your scheduler.
186
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
In Figure 8-16, the batch option of building the actual disaster recovery JCL was chosen. ----------------------- Build Job for PAOLOR6.D9C1 ---------------------Build Online or Batch B Edit Generated Job Y Build job in Dataset Member (Batch) (Yes/No)
PAOLOR6.SLB.JCL DRJOB1
Job Cards: //PAOLOR6D JOB (XXX,POK),DR,CLASS=A,MSGCLASS=X /*JOBPARM SYSAFF=SC63 //* //* Press ENTER to process or PF3 to Cancel
Figure 8-16 Build disaster recovery job window - options for JOBCARD and JCL placement
You can build the disaster recovery jobs in batch. The JCL is shown in Figure 8-17.
------------------------ Build Job for PAOLOR6.D9C1 -----------------------You have selected your job to be built in batch mode. The batch generation JCL will be stored in dataset PAOLOR6.SLB.JCL Please specify in the dataset below where you want the JCL built by the batch module to be placed. Build job in Dataset PAOLOR6.SLB.JCL
Jobcard data to be used on the generated job: //PAOLOR62 JOB (XXX,POK),DRJOB2,CLASS=A,MSGCLASS=X /*JOBPARM SYSAFF=SC63 //* //*
Press ENTER to process or PF3 to Cancel Figure 8-17 Building the disaster recovery JCL - actual DR JCL JOBVCARD and placement options
187
Figure 8-18 shows the first step of the JOB for building the disaster recovery procedure.
//ARY@BULD EXEC PGM=ARY@BULD,REGION=006M //* //STEPLIB DD DISP=SHR,DSN=ARY.V2R1M0.SARYLOAD // DD DISP=SHR,DSN=DB9C9.SDSNEXIT // DD DISP=SHR,DSN=DB9C9.SDSNLOAD //DB2PARMS DD DISP=SHR,DSN=ARY.DB2PARMS.CONTROL //ARYBPROF DD DISP=SHR,DSN=ARY.PROFILES //ARYBOFFL DD DISP=SHR,DSN=ARY.OFFOPTS //ARYBPMAP DD DISP=SHR,DSN=ARY.PROFILE.MAPS //ARYBPCAT DD DISP=SHR,DSN=ARY.PROFILE.CATS //ARYSBACK DD DISP=SHR,DSN=ARY.SYSBACK //ARYSBOBJ DD DISP=SHR,DSN=ARY.SYSBACK.OBJS //ARYSBVOL DD DISP=SHR,DSN=ARY.SYSBACK.VOLS //ARYSBSSD DD DISP=SHR,DSN=ARY.SYSBACK.SSIDS //ARYBREPT DD DISP=SHR,DSN=ARY.BREPORT //ISPFILE DD DISP=SHR,DSN=PAOLOR6.SLB.JCL //ISPLOG DD SYSOUT=*,DCB=(RECFM=VA,LRECL=125,BLKSIZE=129) //ISPWRK1 DD UNIT=SYSALLDA,SPACE=(CYL,(30,30)), // DCB=(RECFM=FB,LRECL=133,BLKSIZE=1330) //ARYERROR DD SYSOUT=* //SYSTSPRT DD SYSOUT=* //SYSOUT DD SYSOUT=* //ARYDEBUG DD SYSOUT=* //ARY#DATA DD * DISASTER_RECOVERY ( DB2_SUBSYSTEM D9C1 GEN_TO_DATASET PAOLOR6.SLB.JCL PROFILE_NAME 'D9C1' PROFILE_CREATOR PAOLOR6 EXECUTION_LIB_1 ARY.V2R1M0.SARYLOAD JOB_CARD_1_1 '//PAOLOR62 JOB (XXX,POK),DRJOB2,CLASS=A,' JOB_CARD_1_2 'MSGCLASS=X' JOB_CARD_2_1 '/*JOBPARM SYSAFF=SC63' JOB_CARD_3_1 '//*' JOB_CARD_4_1 '//*' ) //* Figure 8-18 First step of batch JOB that will build the disaster recovery JCL
188
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
Figure 8-19 shows the second step of the JOB for building the disaster recovery procedure.
//ARY#DATA DD * DISASTER_RECOVERY DB2_SUBSYSTEM USER_INDICATOR PROFILE_NAME PROFILE_CREATOR EXECUTION_LIB_1 GEN_TO_DATASET JOB_CARD_1_1 JOB_CARD_1_2 JOB_CARD_2_1 JOB_CARD_3_1 JOB_CARD_4_1 BPROF_DSN BOFFL_DSN BPMAP_DSN BPCAT_DSN SBACK_DSN SBOBJ_DSN SBVOL_DSN SBSSD_DSN BREPT_DSN POBJS_DSN PARML_DSN PARML_MEMBER DB2CNTL_DSN //* Figure 8-19 The second step of the batch job that builds disaster recovery JCL
( D9C1 ARY 'D9C1' PAOLOR6 ARY.V2R1M0.SARYLOAD PAOLOR6.SLB.JCL '//PAOLOR62 JOB (XXX,POK),DRJOB2,CLASS=A,' 'MSGCLASS=X' '/*JOBPARM SYSAFF=SC63' '//*' '//*' ARY.PROFILES ARY.OFFOPTS ARY.PROFILE.MAPS ARY.PROFILE.CATS ARY.SYSBACK ARY.SYSBACK.OBJS ARY.SYSBACK.VOLS ARY.SYSBACK.SSIDS ARY.BREPORT ARY.OBJECTS ARY.V2R1M0.SARYSAMP ARY#PARM ARY.DB2PARMS.CONTROL )
Once the batch job listed in Figure 8-18 on page 188 and Figure 8-19 completes successfully, you will have the actual disaster recovery JCL built and added to a data set. The disaster recovery jobs are stored in the data set that you specified when you built the job via the ISPF interface. Note: We recommend running the disaster recovery batch jobs on a regular basis. The disaster recovery batch jobs should be added to your job scheduler. The JCL that was created performs the following steps for a system level backup: 1. Restores the System Backup and Restore Services repository at the disaster recovery site. 2. Restores the DB2 volumes from the most recent offloaded system backup. 3. Copies the archive logs. 4. Rebuilds the BSDS. The PDS that contains the disaster recovery jobs and control records will contain the contents of the BSDS. This eliminates the need to mount tapes at the recovery site to build the BSDS.
189
Note: Make sure that you sent the recovery PDS, which contains the disaster recovery JCL, off site. Place this data set on tape that you sent off-site with the rest of your off-site tape backups. We assume that you will have a process in place to ship your DASD-to-Tape offloaded system level backups off-site as well.
190
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
Table 8-1 Summary of steps built in the job to RESTORE the subsystem at the remote site Member name D9C1#JC1 Description Recovery JCL to RESTORE the subsystem at the remote site Comments This job contains the following steps: Step REPODFN - an IDCAMS step to define the VSAM files needed by Recovery Expert. It uses member ARYREPOC. It defines the following VSAM data sets:DB2PARMS, PROFILES, OFFOPTS, PROFILE.MAPS, PROFILE.CATS, SYSBACK, SYSBACK.OBJS, SYSBACK.VOLS, SYSBACK.SSIDS, and REPORT. Step REPOLOAD - invokes Recovery Expert program ARy#YMCR to load the repository records. It used member ARYREPOD. Step ARYREST - This step invokes the Recovery Export restore system utility using the system level backup. Step D9C1DELC - an IDCAMS step to DELETE the BSDS and ACTIVE LOG data sets for both our data sharing members. It uses member D9C1DELC. Step D9C1ALLC - an IDCAMS step to DEFINE the BSDS and ACTIVE LOG data sets. It uses member D9C1ALLC. Step D9C1CATL- an ICAMS step to verify that all IC data sets are cataloged at the disaster recovery site. It uses member D9C1CATL. Step D9C1RBSR- invokes a Recovery Expert program, ARY@YRBS, to rebuild the BSDS into 4,080-byte records. It uses member D9C1BSDS. Step D9C1CRCR - an IDCAMS step that performs a REPRO to insert the BSDS data created in the previous step, D9C1RBSR, into the two BSDS data sets. Step D9C1PRNT- invokes DSNJU004 to print the contents of the BSDS for member D9C1. Step D9C2RBSR - invokes a Recovery Expert program, ARY@YRBS, to rebuild the BSDS into 4,080-byte records. It uses member D9C1BSDS. Step D9C2CPBS - an IDCAMS step that performs a REPRO to insert the BSDS data created in the previous step, D9C1RBSR, into the two BSDS data sets. Step D9C2CRCR - invokes DSNJU003 to create a CRCR in the BSDS. It uses member D9C1CRCR. This is for the second DB2 member D9C2. Step D9C1DELA - an IDCAMS step to delete the ARCHIVE data sets on tape. Step D9C2YCPL - invokes the Recovery Expert program, ARy@YCPL, to copy the archives logs from tape to DASD. It uses member D9C1CPYL. This step invokes the IBM DSNUTILB stand-alone utility to restore the system logs. DB2 must be up and you must have responded yes to the WTOR: XXXX CONDITIONAL RESTART RECORD INDICATES TRUNCATION AT RBA XXXXXXXXXXXX. REPLY Y OR N. This job is optional. This disaster recovery job can be run after the DB2 subsystem has been started and the DB2 catalog and directory have been successfully restored. Although optional, we recommend running this job. It uses member D9C1STRF. This member contains all the IDCAMS DEFINE CLUSTERs for the Recovery Expert VSAM files.
D9C1#JC2
D9C1#JC3
ARYREPOC
191
Description Controls records (data) for the Recovery Expert VSAM files Defines the VSAM clusters for the DB2 catalog and directory, BSDS, active logs, and user-defined VCAT spaces Contains a copy of the bootstrap data set in 80-byte records Contains control cards for cataloging the image copies at the recovery site Contains control cards for copying the archive logs from the tape to the recovery site Contains the control card for creating the system point- in-time conditional restart record Contains control cards to delete the archive logs (with the NOSCRATCH option) from the recovery site z/OS catalog (Those logs are on tape and will be copied to DASD, then cataloged.) Contains control cards to uncatalog the active logs and BSDS at the disaster site if they exist Contains control cards for starting application table spaces in the DB2 subsystem with RW access Contains a copy of the bootstrap data set in 80 byte records
Comments This member is a data file containing the data that is loaded into the Recovery Expert VSAM files. This member is used by job D9C1#JC1.
D9C1ALLC
D9C1BSDS
D9C1CATL
D9C1CPYL
D9C1CRCR
This member is called twice in job D9C1#JC1. It is called once for each DB2 member.
D9C1DELA
D9C1DELC
D9C1STRF
D9C2BSDS
This member is used by job D9C1#JC1. This is for the second DB2 member, D9C2.
192
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
3. Invokes the System Backup and Restore Services job to restore the volume backups from tape. See Example 8-3.
Example 8-3 Output from the step to restore the volumes backups from tape ARYS001I ARYS162I ARYS003I ARYS004I ARYS004I ARYS004I ARYS004I ARYS004I ARYS004I - Recovery Expert for DB2 z/OS Starting. Version 02.01.013 - Parmlib used for this execution - Control Cards: RESTORE PAOLOR6.D9C1 GENERATION 02 DATE 03/06/2008 TIME 17:17:40 RECOVERY-SITE FROM-OFFLOAD Chapter 8. System level backup based remote recovery
193
ARYS004I ARYS123I ARYS013I ARYS038I ARYS146I ARYS146I ARYS146I ARYS146I .. .. ARYS039I ARYS137I ARYS136I ARYS217I ARYS217I ARYS217I ARYS137I ARYS004I ARYS277I ARYS277I ARYS277I .. .. ARYS277I ARYS277I ARYS277I ARYS002I
Backup PAOLOR6.D9C1 generation 02 was read from the repository. Backup profile PAOLOR6.D9C1 was read from the repository. Performing profile volume map validation... Removing volser SBOX5C from this restore. It contains only log Removing volser SBOX5K from this restore. It contains only log Removing volser SBOX5D from this restore. It contains only log Removing volser SBOX5E from this restore. It contains only log
Volume map validation complete. Varying volumes offline. Disconnecting user catalogs. User catalog UCAT.DB9CDATA disconnected. User catalog UCAT.DB9CLOGS disconnected. User catalog UCAT.VSBOX01 disconnected. Varying volumes online. Restoring volumes from offloaded backup... Task 02 - Volser SBOX5B was restored from PAOLOR6.D9C1.D066.OFFLOD1. Task 01 - Volser SBOX5I was restored from PAOLOR6.D9C1.D066.OFFLOD1. Task 02 - Volser SBOX5J was restored from PAOLOR6.D9C1.D066.OFFLOD1.
Task 02 - Volser SBOX5T Task 01 - Volser SBOX5U Task 02 - Volser SBOX5V Recovery Expert for DB2
was restored from PAOLOR6.D9C1.D066.OFFLOD1. was restored from PAOLOR6.D9C1.D066.OFFLOD1. was restored from PAOLOR6.D9C1.D066.OFFLOD1. z/OS complete. RC=000.
4. Issues IDCAMS DELETE to delete all BSDS and active log data sets. See Example 8-4.
Example 8-4 Output from the deleting the BSDS and log data sets IDCAMS SYSTEM SERVICES
DELETE ('DB9CL.D9C1.BSDS01') IDC0550I ENTRY (D) DB9CL.D9C1.BSDS01.DATA DELETED IDC0550I ENTRY (I) DB9CL.D9C1.BSDS01.INDEX DELETED IDC0550I ENTRY (C) DB9CL.D9C1.BSDS01 DELETED IDC0001I FUNCTION COMPLETED, HIGHEST CONDITION CODE WAS 0 DELETE ('DB9CL.D9C1.BSDS02') IDC0550I ENTRY (D) DB9CL.D9C1.BSDS02.DATA DELETED IDC0550I ENTRY (I) DB9CL.D9C1.BSDS02.INDEX DELETED IDC0550I ENTRY (C) DB9CL.D9C1.BSDS02 DELETED IDC0001I FUNCTION COMPLETED, HIGHEST CONDITION CODE WAS 0 DELETE ('DB9CL.D9C1.LOGCOPY1.DS01') IDC0550I ENTRY (D) DB9CL.D9C1.LOGCOPY1.DS01.DATA DELETED IDC0550I ENTRY (C) DB9CL.D9C1.LOGCOPY1.DS01 DELETED IDC0001I FUNCTION COMPLETED, HIGHEST CONDITION CODE WAS 0 ...
5. Define the DB2 active log and BSDS data sets with the proper allocations. See Example 8-5.
Example 8-5 Output of defining the active logs and BSDS data sets IDCAMS SYSTEM SERVICES -
194
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
REUSE RECORDSIZE(4089 4089) FREESPACE(0 20) KEYS(4 0) CONTROLINTERVALSIZE(04096) STORAGECLASS(DB9CLOG1) MANAGEMENTCLASS(MCDB22) VOLUMES(SBOX5F) TRACKS(00000078,00000002) SHAREOPTIONS(2 3) ) DATA ( NAME ('DB9CL.D9C1.BSDS01.DATA') ) INDEX ( NAME ('DB9CL.D9C1.BSDS01.INDEX') ) IDC0508I DATA ALLOCATION STATUS FOR VOLUME SBOX5E IS 0 IDC0509I INDEX ALLOCATION STATUS FOR VOLUME SBOX5E IS 0 IDC0181I STORAGECLASS USED IS DB9CLOG1 IDC0181I MANAGEMENTCLASS USED IS MCDB22 IDC0001I FUNCTION COMPLETED, HIGHEST CONDITION CODE WAS 0 ...
6. Rebuilds the BSDS from the 80-byte record file, placing it back into 4,089-byte records. 7. Restores the BSDS by placing the 4,089-byte records into a VSAM file. See Example 8-6.
Example 8-6 IDCAMS REPRO output for the restore of the BSDS IDCAMS SYSTEM SERVICES
REPRO INFILE(BSDSI) OUTFILE(BSDS1) REUSE IDC0005I NUMBER OF RECORDS PROCESSED WAS 777 IDC0001I FUNCTION COMPLETED, HIGHEST CONDITION CODE WAS 0 REPRO INFILE(BSDSI) OUTFILE(BSDS2) REUSE IDC0005I NUMBER OF RECORDS PROCESSED WAS 777 IDC0001I FUNCTION COMPLETED, HIGHEST CONDITION CODE WAS 0 IDC0002I IDCAMS PROCESSING COMPLETE. MAXIMUM CONDITION CODE WAS 0
8. Creates a conditional restart. See Example 8-7. Notice that this is a different type from the image copy DR method. It is a SYSPITR (system point in time record).
Example 8-7 Conditional restart record creation output DSNJCNVB CONVERSION PROGRAM HAS RUN DDNAME=SYSUT1 DSNJCNVB CONVERSION PROGRAM HAS RUN DDNAME=SYSUT2 CRESTART CREATE,SYSPITR=C20DCC61FA97,FORWARD=YES,BACKOUT=YES DSNJ408I DSNRJFCK CHECKPOINT RBA FOUND, RBA = 0000126F8B90, TIME = 22:45:09 MAR DSNJ411I DSNRJRCR CRESTART CREATE FOR CRCRID = 0006, DDNAME = SYSUT1 DSNJ408I DSNRJFCK CHECKPOINT RBA FOUND, RBA = 0000126F8B90, TIME = 22:45:09 MAR DSNJ411I DSNRJRCR CRESTART CREATE FOR CRCRID = 0006, DDNAME = SYSUT2 DSNJ225I CRESTART OPERATION COMPLETED SUCCESSFULLY DSNJ200I DSNJU003 CHANGE LOG INVENTORY UTILITY PROCESSING COMPLETED SUCCESSFULLY
9. Prints the contents of the BSDS. 10.Uncatalogs the tape archive logs. 11.Copies the uncataloged tape archive logs to DASD and catalogs them to speed up the recovery at the DR site.
195
Start DB2
Start DB2 using the new reassembled DSNZPARMs. We recommend that DB2 be started with ACCESS(MAINT). In a data sharing member, ensure that you start all the DB2 members.
196
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
Part 4
Part
Appendixes
This part contains referenced appendixes: Appendix A, Frequently asked questions on page 199 Appendix B, Recommended maintenance on page 207 Appendix C, Storage and DB2 functions on page 209 Appendix D, Contents of schema level repository on page 247 Appendix E, Sample jobs on page 263
197
198
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
Appendix A.
199
Table A-1 contains a list of frequently asked questions that deal with recovery topics.
Table A-1 Application development frequently asked questions No. Question I could not RECOVER a table space from either ISPF or GUI using a system level backup (SLB) created by Recovery Expert. Can I perform a recovery of an object using the SLB and no log apply? Answer Make sure to set the Enable Obj Restore option to Y in the backup profile before creating the SLB. See 4.4, Profiles on page 80. No, because SLBs are fuzzy copies. In order for Recovery Expert to use the SLB, you need to specify a point that is at least RBA/LRSN+1 of the SLB. See 6.1.3, Recover object to point in time using system level backup on page 138.
1.
2.
3.
What is the purpose of the RBA capture utility? When do I need this utility?
This is used only from the ISPF interface and is useful in non-data sharing to create TIMESTAMP to RBA relationships. This utility captures/records RBA/LRSN information about user-defined time intervals. This information can be used to determine which RBA/LRSN to use to recover the SUBSYSTEM corresponding to a given time stamp (PIT). If the PIT recovery RBA/LRSN is different from that of the f system backup or image copy or quiesce point then this could be used to pick a desired point manually. See Step 21 - Configure the RBA capture utility on page 32.
4.
After adding a new subsystem to the product control file, I started the agent started task successfully, but I am still not seeing this new system from the GUI client. What is wrong? Is partition-level restore possible with the ISPF interface?
If the client was brought up before you started the agent then you must close the client window and reconnect to the appropriate server to see the new system.
5.
Yes, you can select individual partitions using the "Object Recovery Profile" option. See Add objects to object profile on page 128.
6.
Can I perform index level RESTORE using SLB via the ISPF component?
Yes, you can create an Object Recovery profile using Recovery Expert to include this index and build a recovery job. If the index is created COPY YES, the generated job will recover the index from either an SLB or an image copy if one is found. If the index is created COPY NO, the generated job will rebuild the index. No. This feature is available only through GUI. See the previous companion IBM Redbooks publication IBM DB2 Recovery Expert for z/OS User Scenarios, SG24-7226. GUI. But you may also use ISPF if the specific copy that you are interested in recovering to is the LASTCOPY or you would just have to know the RBA/LRSN of the copy that you wish to restore to and enter the RBA/LRSN of the copy + 1. See 6.1.4, Recovery object to copy (full or incremental copy or quiesce) on page 138.
7.
Is it possible to restore a prior version of DDL (pertaining to a table space and all its dependent objects) using the ISPF interface? If I want to restore a table space to a specific copy, which interface should I use?
8.
200
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
No.
Question After I have Recovery Expert installed, if I am using it for system level backups, should I no longer use DB2's BACKUP SYSTEM and RESTORE SYSTEM?
Answer Information about SLB taken via Recovery Expert is maintained in a VSAM repository and used by Recovery Expert for subsequent RESTOREs. If you run BACKUP YSTEM outside of Recovery Expert this information is not updated and Recovery Expert will not be able to execute the RESTORE, when needed. Please note: We recommend using Recovery Expert to manage your system level backups. There are many benefits such as object level recovery in DB2 versions prior to DB2 9. Backup through Recovery Expert provides validation. The ARYV210 CLIST is used by the ISPF interface. It is not used by the GUI. No.
9.
10.
Which component of DB2 Recovery Expert uses the ARYV210 CLIST? Is there any dependency between the ARYV21 CLIST and the schema level repository? Why can we not see the object profiles created through DB2 Recovery Expert (object Recovery Profile option) from the GUI, whereas we can see the object profiles created via DB2 Automation Tool? Can I perform disaster recovery from the GUI interface?
11.
12.
The object profiles created through DB2 Recovery Expert (Object Recovery Profile option) are stored on VSAM repository files, and the GUI interface is not designed to work with this VSAM repository. But, the DB2 Automation Tool profiles (even though they are created via the ISPF interface) are stored in DB2 tables (DLC), and the GUI can access these DB2 tables. No. See Chapter 8, System level backup based remote recovery on page 173.
13.
14.
If the agent started task is not running on the LPAR that I am logged on, can I still invoke Recovery Expert (ISPF interface) from that LPAR and create object recovery profiles and build recovery jobs? What recovery options are available through the ISPF interface but not available through GUI?
Yes. None of the functions available from the ISPF interface require or use the RE Agent started task, the RE Server started task, or the SLR.
15.
Configuration System backup profiles Subsystem analysis and backup of an entire system (using FlashCopy, DB2, BCVs, or Snap) Object recovery to last quiesce point for each object included in the profile Displaying of RBA capture information Disaster recovery (remote site) Dropped object recovery Log analysis Restore tables Restore objects related to DB2 plans Restore objects that are part of an object profile created via automation tool
16.
What recovery options are available through GUI but not available through ISPF?
201
No.
Question How many product control files (PCF) and agent started tasks are required if I am in a 3-way data sharing group involving three LPARs? Follow-up question: How many more agents do I need if I have two more data sharing groups in the same three LPARs?
17.
None, you just need to update the product control file with all the member subsystem information and group attach name.
18.
In a non-data sharing environment how many agent started tasks are needed for eight subsystems in three LPARs? If I have only one server started task to manage all the subsystems (and data sharing groups) in my environment, then it looks like there is no difference in the contents of the AGENT configuration file. But, since I need to have multiple agent started tasks (one per LPAR), can I have this AGENT config file stored in a shared DASD and avoid duplication of efforts? When I restore a table space using an SLB, will the indexes pertaining to that table space be restored too?
19.
20.
Yes in all versions of DB2. When using the ISPF interface, the indexes will be recovered/rebuilt depending on their definition. If they are copy, yes, they will also be restored from the SLB. If they are COPY NO, they will be rebuilt. The GUI will always rebuild the indexes. You cannot directly restore a view using Recovery Expert, but it will handle views for recreated tables. No.
21. 22.
How can I restore a view after it is dropped? We have FlashCopy V1.2. Can I use Recovery Expert to restore a table space from SLB? If I do not have FlashCopy available then can I still buy Recovery Expert for z/OS? Can I recover LOB table spaces via the ISPF interface? Do I have any control over which recovery option (like DB2 SYSTEM RESTORE, RECOVER TOLOGPOINT, RECOVER TOCOPY, or RESTORE) tool to use when I try to recover a table space?
23.
Yes. The only lost functionality is the functions that require Flash-enabled DASD. Also, if EMC DASD is installed, the Flash emulation is not required. Recovery Expert can drive the native EMC hardware functions. Yes. No, the ISPF interface will chose for you. Recovery Expert tool will find the best possible recovery/restore option. The GUI presents all plans and lets you chose. However, APAR PK59675 gives you this control. You can chose whether you want to consider SLBs, ICs, or both, as recovery methods as an option when an object profile recovery job is built.
24. 25.
202
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
No.
Answer The two products are separate and there is no interface between the two. IBM Application Recovery Tool for IMS and DB2 Databases 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 to which recovery may be done. It also establishes a quiesce point and notes where the point is located on the respective logs. During recovery, the user specifies the Virtual Image Copy, and the Application Recovery Tool applies the appropriate image copies and causes the log to be applied up to this point. Users can also use the Application Recovery Tool 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. Yes. See "How System Backup and Restore Services performs object recovery" in Chapter 13 of DB2 Recovery Expert for z/OS Users Guide Version 2 Release 1, SC19-1222. The ISPF interface generates syntax that will recover the object to the image copy by generating this syntax. It does this to generate the most efficient recovery syntax it can. If there are multiple table spaces (or indexspaces) being recovered to image copies taken at the same time, the generated syntax will support multi-tasking.
26.
27.
When I try to restore a set of table spaces pertaining to an application using SLB, am I assured business continuity of other applications running on the same DB2 subsystem? When I try to create an object level recovery using the Recovery Expert tool using the Recover to Last Copy option, the tool generates RECOVER TABLESPACE TOLOGPOINT with LRSN/RBA =, the START_RBA+1 pertaining to the LAST COPY rather than RECOVER TO LASTCOPY. Why? If we are not interested in using GUI then should I still set UPDATE IPC IPC_RBR = Y during product control file configuration in ARYSJ001? Where does Recovery Expert (ISPF component) get the DB2 subsystem information, load library, and plan information from?
28.
29.
No. See Step 8 - Configure the Recovery Expert product control file on page 24. From the product control file (which is updated during installation or anytime there is change in the system configuration) through ARYSJ001. If the information is not provided by running ARYSJ001 then you may enter the DB2 subsystem, load library, and plan information online by selecting the M option (DB2 Subsystem Analysis and Setup) and following the panels that appear. It has not been tested thoroughly, but there are no issues reported as of this writing.
30.
31.
My workstation is running Windows Vista. Can I install Recovery Expert client and expect normal behavior? Can I perform a redirected restore (similar to LUW) using Recovery Expert for z/OS system level backup to create a clone of my development subsystem on a different LPAR?
32.
No. IBM DB2 Cloning Tool for z/OS is a vendor-independent tool that provides access to data sets on replicated volumes created with point-in-time copies of Fast Data Replication tools (FlashCopy and SnapShot) or Splits of Continuous Mirrors tools (EMC TimeFinder, IBM PPRC, HDS ShadowImage, Softek TDMF, and Fujitsu Equivalent Copy). In addition, customers can easily create test and QA environments and refresh the data on a regular basis.
203
No.
Question If my restore system job abends can I restart the job automatically without any manual intervention?
Answer You can submit the job again. If the restore is from a system backup on tape and it abends, adding the "RESTART" keyword will cause the restore to pick up from where it left off. This support was added by APAR PK59675. See also 5.2, System level backup and restore using Recover Expert ISPF-based System Backup and Restore Services on page 99. Currently, there is not an easy way of doing this except by manual intervention. We are working on user-controlled mechanisms (templates, parms, and so on) to be added so that customers can control data set naming.
33.
34.
We have installed the Recovery Expert V2 Client/Server component only. The client generates recovery JCL for a given database correctly. The image copy step generates data set names that do not conform to our naming standards. Where is the template for the data set names, or how can I make the names generate according to our naming standards? Can Recovery Expert's backup profile SETUP process verify that the target DASD units of the current backup are not in use by any other backup profile created on the current LPAR but used in a different DB2 subsystem? Can I restore a dropped object via the ISPF Interface? When I try to restore a table without any unique or PRIMARY KEY are there any restrictions?
35.
Yes. But, if the target volumes are used by a different subsystem that belongs to a different LPAR (and if the DASD volumes are shared across these two LPARs), then Recovery Expert's profile SETUP process will not know that and may result in data corruption.
36. 37.
No. When you are selecting tables for recovery, remember that any recovery plan might include undo or redo SQL. You must ensure that there is a primary, or unique, key on the tables for which you are generating SQL. Without a primary key, you may not get the desired results because of the inability to uniquely identify rows that were changed by the original SQL. DB2 Recovery Expert generates and submits this batch job during recovery plan generation when you specify either a time stamp or a log RBA as the point in time for the recovery, when running against a non-data sharing subsystem. The job performs log analysis to convert from the time stamp that you specified to the corresponding log RBA, or vice versa. if you browse recovery history events or quiet times as the source for selecting the point in time, then both time stamp and log RBA information are already available (although only one or the other is displayed in the user interface). In this case, DB2 Recovery Expert automatically uses both pieces of information, and does not require the point-in-time conversion job. See "Point in time conversion job" in Chapter 7 of DB2 Recovery Expert for z/OS Users Guide Version 2 Release 1, SC19-1222.
38.
39.
I am running DB2 Version 7. Can I still use Recovery Expert to perform object level restore from SLB? What System Backup and Restore Services repository data sets are needed at the DR site?
Yes. Ensure that the prerequisites listed in this book are met.
40.
They are only needed when using the system backup method of DR, and it needs the ones that it automatically restores there.
204
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
No.
Question If I want to perform disaster recovery using System Backup and Restore Services system level backup to restore the entire subsystem in a remote location, can I do this without the offload option on my backup profiles? The DB2 V8 Utility Guide (Chapter 5. BACKUP SYSTEM) says that each DB2 subsystem can have up to two copy pools, one for databases and one for logs. BACKUP SYSTEM copies the volumes that are associated with these copy pools at the time of the copy. Can I have the RUNLIB and DSNEXIT libraries on the same copy pool as DB2 logs? Using Recovery Expert tool, can I restore the subsystem to an SLB taken in the prior version of DB2? We have an SLB taken while running Recovery Expert v1.1. Can I use it to restore the subsystem after I migrate Recovery Expert to V2.1? If my product control file is on a shared DASD (shared across all my LPARs), then can I just use one product control file for my entire environment? If I am only running one server started task, then my agent config file is going to have the same content across all the LPARs/subsystems (assuming that my product control file name is same across all the lpars/subsystems), so if I just copy the same configuration proc member (that is, the same name) to all my SYS1.PROCLIB and start the started task, will it work? Will Recover Expert choose an SLB taken using the BACKUP SYSTEM utility in V8 (rather than SLB created via Recover Expert) to arrive at an optimal system recovery solution?
Answer No. The offload is needed to get the backup to the remote site. You might be able to perform the offload to a remote distance at the DR site if your system is configured for such an operation. See 8.1, Offloading to tape at the local site on page 174.
41.
42.
We strongly recommend not having RUNLIB and DSNEXIT libraries on these copy pools, because a subsequent system restore can corrupt these libraries depending on when the backup was taken and whether there are any changes to these libraries since then.
43.
Yes.
44.
Yes, but only with the GUI. The ISPF interface does not support restoring from system backups that it did not perform.
45.
Yes, it makes sure to add control information for each and every subsystem (and the data sharing group information, if any) into this file.
46.
Yes.
47.
Yes.
205
No.
Answer No. Recovery of a partition by growth partitions is only available for all partitions at the table space level. Partitions cannot be recovered individually. See "Summary of changes" in Chapter 1 of DB2 Recovery Expert for z/OS Users Guide Version 2 Release 1, SC19-1222.
48.
49.
If I have four tables involved in an RI constraint and if I want to restore only one of those tables, are there any consequences?
If all tables involved in the RI constraints were not present in your results (that is, they were filtered out), the generated SQL might omit any such RI records, as proper execution requires all such tables. This can lead to an empty SQLOUT DD data set, which usually contains all the SQL. This happens for recovery to a prior point in time. A recovery to current will cause no errors. You have to delete the product control file and recreate it and then run ARYSJ001 without that subsystem (or data sharing group) information.
50.
How do I delete a subsystem (or a data sharing group) from being managed from an Recovery Expert Server?
206
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
Appendix B.
Recommended maintenance
In this appendix we look at recent maintenance for Recovery Expert V2.1. These APARs represents a snapshot of the current maintenance at the moment of writing. As such, the list will become incomplete or even incorrect at the time of reading. It is here to identify the level of code used during the project and provide recommendations for possible improvements. Make sure that you contact your IBM Service Representative for the most current maintenance at the time of your installation. Also check on RETAIN for the applicability of these APARs to your environment, as well as to verify prerequisites and post-requisites.
Table B-1 Recovery Expert V2.1 current APARs APAR # PK53379 PK55713 PK55821 PK57092 PK57163 PK58428 PK58430 PK58431 PK58433 PK58434 PK58928 PK58945 PK57183 PK61889 PK60078 Area Log analysis, DB2 V7 ISPF interface Multiple issues in RE V2.1 Multiple issues in RE V2.1 Text GA maintenance. GA maintenance. GA maintenance. GA maintenance. PTF and notes UK30484 UK32857 OPEN UK33508
Hang situation with z/OS 1.9. Incorrect delete objects during recover if z/OS earlier than 1.8. Corrections and documentation enhancements to various SAMPLIB members such as ARYBIND7, ARYBIND8, ARYBIND71, ARYBIND81, clist ARYV210.
207
Text GA maintenance. Recovering a dropped tablespace a S0C4 may occur when using ARYLDSN1 to invoke DSN1COPY. Message ARYX094S--An unexpected error occurred with token "0" may be incorrectly issued during recovery plan generation. This can occur when trying to generate recovery plans to a specific RBA or a hard coded timestamp for an object defined on a DB2 subsystem that is partially set up for datasharing. The DB2 subsystem does not belong to a datasharing group but has a group attach name defined in the users SYS1.PARMLIB(IEFSSNxx) member. GA maintenance.
PK59664 PK59666 PK60696 PK61814 PK62088 PK59675 PK60716 PK60786 PK60788 PK61889
UK35495
DSNU054I ssid DSNUGMAP - TABLESPACE 'SYSTOOLS.ARYROLES' NOT FOUND running SARYSAMP(ARYCPY1). Optional indexes to improve SLR update will be added to SARYSAMP lib member ARYDSCIX for customers that are having issues with SLR update performance. Optional indexes to improve SLR update will be added to SARYSAMP lib member ARYDSCIX for customers that are having issues with SLR update performance. User interface does not indicate that agent tasks/jobs are not currently connected to the server. Users may experience an empty list when trying to select a DB2 subsystem.
OPEN
PK62742
OPEN
PK62922
OPEN
PK29628
OPEN
208
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
Appendix C.
209
FlashCopy
In this section we briefly introduce the FlashCopy function provided by the family of IBM Enterprise Storage Servers (ESS). FlashCopy is an optional feature that must be enabled in the ESS. FlashCopy creates a physical point-in-time copy of the data, with minimal interruption to applications, and makes it possible to access both the source and target copies immediately. FlashCopy may also be used in conjunction with either the local or remote copies of data created by Metro and Global Mirroring, making it easy to create additional copies for rapid recovery following application errors or for other uses. This provides a more effective way of producing volume dumps. This section covers the following topics: Introducing FlashCopy How FlashCopy works How to invoke FlashCopy DFSMSdss utility Incremental FlashCopy FlashCopy consistency group For more information about the ESS Copy Services and details on the differences between FlashCopy Version 1 and Version 2, refer to IBM TotalStorage Enterprise Storage Server Implementing ESS Copy Services with IBM eServer zSeries, SG24-5680-04.
Introducing FlashCopy
FlashCopy provides a point-in-time (PIT) copy of logical volumes with almost instant availability for the application of both the source and target volumes. Only a minimal interruption is required for the FlashCopy relationship to be established, so the copy operation can be initiated. The copy is then created under the covers by IBM TotalStorage Enterprise Storage Server, with minimal impact on other ESS activities. There are currently two FlashCopy versions available: Version1 and Version 2. FlashCopy Version 2 supports all the previous FlashCopy V1 functions plus several enhancements. With FlashCopy V1: FlashCopy V1 works at volume level. The source and target volumes must be in the same ESS logical subsystem (LSS). A source and a target volume can only be involved in one FlashCopy relationship at a time. With FlashCopy V2: FlashCopy V2 can be used for data set copies, as well as volume copies. The source and target of a FlashCopy can be on different LSSs within an ESS. Multiple FlashCopy relationships are allowed. Incremental copies are possible. Inband commands can be sent over PPRC links to a remote site. FlashCopy consistency groups can be created. There has been a reduction in the FlashCopy establish times.
210
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
In our tests we used FlashCopy 2. The capabilities and requirements that are important for its use for DB2 are as follows: The source and target volumes can be within different ESS logical subsystems and different ESSs. FlashCopy consistency groups can be created across different LSSs and ESSs. For data integrity, we always recommend that BSDS01 and Active Log Copy1 reside on a different ESS from BSDS02 and Active Log Copy 2. Refer to z/OS V1R5.0 DFSMS Implementing System Managed Storage, SC26-7407-01, for addressing the issue of data set separation. The source and target volumes must have the same track format. The target volume must be at least as large as the source volume. Version 2 is about 10 times faster than Version 1. FlashCopy V2 can produce data set copies as well as volume copies. The DB2 9 for z/OS Recover utility can operate at the DB2 object level from a volume backup.
211
As outlined in Figure C-1, there are basically three phases that a FlashCopy relationship goes through: 1. Establishing the relationship 2. Copying the data 3. Terminating the relationship We now examine these phases in detail.
Time
Source
FlashCopy requested 1- FlashCopy relationship is established Both source and target volumes immediately available Write Read Write
Target
212
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
The FlashCopy relationship may be established either with or without background copy. FlashCopy will manage the copy process differently according to the option specified. FlashCopy: Background copy (default) By default, FlashCopy will do a background copy. The background copy task does a physical copy of all tracks from the source volume to the target volume. De-staging algorithms are used to efficiently manage the under-the-covers ESS copy process. The background copy task runs at a lower priority than normal I/O on the ESS, not to impact the normal application I/O processing. The ESS, using the metadata structure created during establish, keeps track of which data has been copied from the source to the target, and manages the integrity of both copies. If an application wants to read some data from the target that has not yet been copied, the data is read from the source. Otherwise, the read can be satisfied from the target volume. Before updating a not-yet-copied track on the source volume, the ESS does an on demand copy of the track to the target volume, thus preserving the original track. Subsequent reads to this track on the target volume will be satisfied from the target volume. Before updating a not-yet-copied track on the target volume, the ESS will perform an on demand copy of this track to the target volume. After some time, all tracks will have been copied to the target volume, and the FlashCopy relationship will automatically end unless the persistent FlashCopy option was specified. When the Persistent FlashCopy option is selected, the FlashCopy relationship does not automatically end when the background physical copy ends. The FlashCopy relationship persists until explicitly withdrawn. Persistent FlashCopy relationships can help protect against inadvertent updates of recently created target volumes. For example, if a source volume is regularly copied to alternating target volumes (thereby ensuring that a complete copy of the source volume is always available), the persistent relationship will identify the target volume for the most recently completed FlashCopy. FlashCopy: No background copy When selecting not to do the background copy, the relationship is established, but the background copy taskof all the source volume tracksis not initiated. Only the source tracks that receive application updates will be copied to the target. Before updating a track on the source volume, the ESS does an on demand copy of the track to the target volume, thus preserving the T0 copy. Similarly, before updating a track on the target volume, the ESS will perform an on demand copy of this track to the target volume. Some DB2 users want only to take the FlashCopied volumes off site for disaster recovery. In that case they may choose the NOCOPY option and direct the copy to tape. The advantage is that no background write to the ESS is performed.
213
Starting with LIC level 2.3.0, the ESS API is enhanced to support the ESS Copy Services configuration and use for PPRC and FlashCopy for the ESS Model 800. Methods are described in detail in the book IBM TotalStorage Enterprise Storage Server Implementing ESS Copy Services with IBM eServer zSeries, SG24-5680-04, and its bibliography.
DFSMSdss utility
In this section we discuss how to use the DFSMSdss utility to invoke FlashCopy functions. For more detailed information about DFSMSdss, refer to z/OS DFSMSdss Storage Administration Reference, SC35-0424. DFSMSdss can use FlashCopy to perform a full volume copy of the data from the source device to the target device when the following conditions are met: The requested DFSMSdss operation is COPY FULL. Both the source and target devices are in the same ESS and the ESS has the FlashCopy feature enabled. The source and target devices must have the same track format. The target must be at least as large as the source volume. The source and target volumes must be online. The designated target volume cannot also be a primary volume in an XRC or PPRC volume pair. With OA06196 and LIC 2.4.0, the FCTOPPRCPRIMARY keyword can be specified on the COPY command to allow a PPRC primary volume to become a FlashCopy target. With FlashCopy V2, any source track can have up to 12 FlashCopy targets. Whenever the conditions for using FlashCopy are met, DFSMSdss will automatically invoke FlashCopy. The copy job will complete after a minimum time when the FlashCopy relationship has been established. If another copy job is started while the source still is in a FlashCopy relationship with another volume, DFSMSdss (in this case) will start a software host copy. With V2, not all tracks on the volume are copied when DFSMSdss invokes FlashCopy for a full volume copy. DFSMSdss requests FlashCopy for allocated extents only since FlashCopy V2 can manage source-target relationship at the extent (contiguous set of allocated tracks) level. In order to balance between excluding free space and saving the number of FlashCopy relationships, up to 255 relations will be created for each full volume copy. If there are more than 255 extents on the volume, extents will be merged (to reduce the number of extents), resulting in some free space being copied. With OW57347, DFSMSdss supports data set FlashCopy on ESS LIC 2.2.0 and later releases. Therefore, DFSMSdss COPY TRACKS, COPY DATASET, and DEFRAG operations will attempt to use FlashCopy if the device supports FlashCopy V2. There are changes in the COPY FULL operation as well when the device supports FlashCopy V2. For example, the volumes no longer need to reside in the same LSS.
COPYVOLID parameter
The COPYVOLID parameter for the COPY command specifies that the volume serial number from the source volume is to be copied to the target volume. This creates an identical copy of the source volume, including the volume serial. The target volume will go offline.
214
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
Figure C-2 shows how the COPYVOLID parameter affects the output of a DFSMSdss full volume COPY operation.
Example C-1 illustrates how DFSMSdss can be used to invoke FlashCopy in batch. In this example, because the COPYVOLID keyword is specified, the volume serial (volser), the VTOC index, and VVDS of the target volume will be identical to the source volume.
Example: C-1 DFSMSdss COPY FULL with COPYVOLID //COPYFULL JOB ..... //* //CPYVOLID EXEC PGM=ADRDSSU //SYSPRINT DD SYSOUT=* //SYSIN DD * COPY FULL INDYNAM(SRCDEV) OUTDYNAM(TRGDEV) COPYVOLID /*
DUMPCONDITIONING parameter
The DUMPCONDITIONING parameter of the DFSMSdss COPY FULL command allows both the source and target volumes to remain online after a full volume copy operation, thus creating an interim copy for a subsequent dump to tape (or DASD) that can be done using the same system. Figure C-3 on page 216 illustrates in three stages how the volume serial, VTOC index, and VVDS of the copies change during a backup-restore cycle using DFSMSdss DUMPCONDITIONING option. 1. When DUMPCONDITIONING is specified, the volume serial (volser) of the target volume does not change. The VVDS and VTOC index names on the target volume will not change to match the target volume serial. Instead, they will continue to match the source volume. This volume is a conditioned volume. A conditioned volume is not usable in its current state, except for the DFSMSdss DUMP operation, because the volume serial, the VTOC index, and VVDS names are not consistent. 2. A full volume dump of the conditioned volume results in a dump data set that looks as though it had been created by dumping the source volume.
Appendix C. Storage and DB2 functions
215
3. This allows the dump data set to be restored and used without having to clip back the volser.
2 RESTORE volume COPYVOLID OR RESTORE dataset VOL001 VTOCIX.VOL001 VVDS.VOL001 3 DUMP FULL
Example C-2 illustrates a sample JCL that may be used for each of the three stages of the backup-restore cycle shown in Figure C-3.
Example: C-2 Backup-restore cycle with DUMPCONDITIONING and background copy //BACKUP JOB ..... //* //* Step 1 - COPY FULL with DUMPCONDITIONING //* //STEP1 EXEC PGM=ADRDSSU //SYSPRINT DD SYSOUT=* //INDD DD UNIT=3390,VOL=SER=RS1510,DISP=SHR //OUTDD DD UNIT=3390,VOL=SER=RS1511,DISP=SHR //SYSIN DD * COPY FULL INDDNAME(INDD) OUTDDNAME(OUTDD) DUMPCONDITIONING /* //* //* Step 2 - DUMP FULL //* //STEP2 EXEC PGM=ADRDSSU //SYSPRINT DD SYSOUT=* //INDD DD UNIT=3390,VOL=SER=RS1511,DISP=SHR //OUTDD DD DSN=BACKUP.RS1510,DISP=(,KEEP),LABEL=(1,SL), // UNIT=3490,VOL=SER=(TAPE01,TAPE02,TAPE03) //SYSIN DD * DUMP FULL INDDNAME(INDD) OUTDDNAME(OUTDD) /* //* //* Step 3 - RESTORE FULL with COPYVOLID //* //STEP3 EXEC PGM=ADRDSSU //SYSPRINT DD SYSOUT=*
216
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
//INDD DD DSN=BACKUP.RS1510,DISP=SHR,LABEL=(1,SL), // UNIT=3490,VOL=SER=(TAPE01,TAPE02,TAPE03) //OUTDD DD UNIT=3390,VOL=SER=RS1512,DISP=SHR //SYSIN DD * RESTORE INDDNAME(INDD) OUTDDNAME(OUTDD) COPYVOLID /*
Note that, as shown in Figure C-3 on page 216, the restore of the figure in the lower right side (#3) indicates that you can either restore from tape with the COPYVOLID or not. In a disaster recovery situation where you are going to restore at the recovery site, we assume that you have initialized your volumes with the same serial numbers as those at the local site for the active DB2 subsystem. Therefore, you use RESTORE volume without the COPYVOLID parameter, as the volume serial is the same on DASD as the one on your tape.
FCNOCOPY parameter
When DFSMSdss uses FlashCopy to perform a copy operation, the background copy task is started by default. FCNOCOPY specifies that if FlashCopy is used to perform the copy operation, then the ESS does not perform a physical background copy of the data. If FCNOCOPY is used, you must withdraw the FlashCopy relationship when the copy is no longer needed. This can be accomplished by performing a full volume dump of the target volume with the FCWITHDRAW keyword, or by using the TSO FCWITHDR command.
FCWITHDRAW parameter
FCWITHDRAW specifies that if the volume that is dumped is the target volume of a FlashCopy relationship, then the FlashCopy relationship is withdrawn when the dump has successfully completed.
217
//OUTDD DD UNIT=3390,VOL=SER=RS1511,DISP=SHR //SYSIN DD * COPY FULL INDDNAME(INDD) OUTDDNAME(OUTDD) DUMPCONDITIONING FCNOCOPY /* //* //* Step 2 - DUMP FULL with FCWITHDRAW //* //STEP2 EXEC PGM=ADRDSSU //SYSPRINT DD SYSOUT=* //INDD DD UNIT=3390,VOL=SER=RS1511,DISP=SHR //OUTDD DD DSN=BACKUP.RS1510,DISP=(,KEEP),LABEL=(1,SL), // UNIT=3490,VOL=SER=(TAPE01,TAPE02,TAPE03) //SYSIN DD * DUMP FULL INDDNAME(INDD) OUTDDNAME(OUTDD) FCWITHDRAW /*
Incremental FlashCopy
Incremental FlashCopy provides the capability to refresh a FlashCopy relationship. With Incremental FlashCopy, the initial relationship between a source and target is maintained. When a subsequent FlashCopy establish is initiated, the only data copied is the data required to bring the target current to the source's newly established point in time. Incremental FlashCopy helps reduce the background copy completion time when only a subset of data on either the source or the target has changed, giving you the option to perform a FlashCopy on a more frequent basis. Incremental FlashCopy must be invoked from the ESS Copy Services Web user interface panels. FlashCopy TSO commands do not offer parameters to invoke this function. In order for an incremental FlashCopy to be performed, the FlashCopy relationship must first be established with the Start Change Recording and Persistent FlashCopy options enabled: With change recording enabled, metadata structures are created to track changes to both source and target volumes from the time the relationship was established. The ESS can then identify the changed tracks that need to be copied when an incremental FlashCopy is requested. Incremental FlashCopy is only possible with a persistent relationship. With persistent relationships, the relation between source and target is maintained after background copy has completed. This allows the ESS to continue tracking updates to source and target extents. Note: Incremental FlashCopy is supported at volume level. It is not available for data set FlashCopy. Figure C-4 on page 219 illustrates how incremental FlashCopy works: 1. When the initial FlashCopy is established from volA to volB with change recording enabled, FlashCopy creates metadata structures to track any updates that may be done on those volumes. 2. As changes are made to volA, FlashCopy will keep track of the tracks that are updated. Similarly, FlashCopy will keep track of any updates that are done on volB. 3. When an incremental FlashCopy is requested from volA to volB, FlashCopy identifies the set of tracks that must be copied from volA to volB. For example, if volA had tracks 1, 3, and 5 updated, and volB had tracks 2, 7, and 9 updated, then tracks 1, 2, 3, 5, 7, and 9
218
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
would be copied from volA to volB. In other words, all tracks necessary to make volB look like volA at the time of the flash will be identified to be copied from volA to volB. 4. Finally, the metadata structures are reset to start tracking changes from this point, if requested.
Time
volA volB
FlashCopy initiated from volA to volB Change recording starts on both volumes. Once FlashCopy is established, the P-i-T copy is available, and volA and volB can start receiving updates Background copy task copies data from volA to volB.
volA
volB
volA
volB
volA
volB
A new P-i-T copy is desired: Incremental FlashCopy initiated from volA to volB. Background copy task copies only updated tracks from volA to volB. Change recording reset to track new changes (ready for the next incremental FlashCopy request).
For more detailed information, refer to the publication IBM TotalStorage Enterprise Storge Server Web Interface Users Guide, SC26-7448.
219
on srcA cannot proceed, neither will its dependent writes on the other volumes (srcB, srcC, srcD) proceed. This ensures the logical integrity of the related data spanning the entire set of volumes. Independent writes to other volumes (srcB, srcC, srcD) are not affected. 2. FlashCopy is then established from srcB to tgtB with the consistency group function enabled. Volume srcB is placed in ELB state, as srcA currently is. Thus, volumes srcA and srcB are not receiving updates. Dependent writes on srcC and srcD waiting on write completions on srcA or srcB cannot proceed. This ensures the integrity of the data over the entire set of related volumes (srcA, srcB, srcC, srcD). Independent writes to volumes srcC and srcD are not affected. 3. As FlashCopy is established from srcC to tgtC, then from srcD to tgtD, each source volume is placed in ELB state and dependent writes held. 4. When all FlashCopy pairs have been established, volumes tgtA, tgtB, tgtC, and tgtD contain a consistent copy of data (the order of dependent writes is preserved). 5. The Consistency Group Created command can be issued to remove the source volumes from ELB state so that updates can resume.
srcA
tgtA
writes cannot proceed on srcA. srcA is in the ELB window any writes occuring on srcB-srcD are not dependent writes
srcB
tgtB
writes cannot proceed on srcA or srcB. Both srcA and srcB in ELB any writes occuring on srcC-srcD are not dependent writes
srcC
tgtC
3. FlashCopy srcC to tgtC and srcD to tgtD 4. tgtA-tgtD contains a consistent copy
srcD
tgtD
5. Consistency Group Created
writes may proceed to srcA-srcD. ELB window ended
The FlashCopy Consistency Group function can only be activated through the ESS Copy Services Web user interface. For detailed information, refer to the publication IBM TotalStorage Enterprise Storge Server Web Interface Users Guide, SC26-7448.
220
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
221
LIST and QUERY commands are modified to aid monitoring of the fast replication backup versions.
222
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
Restrictions: The following restrictions apply: For FlashCopy V2: An eligible target volume must have the same track form as the source volume, be the exact size of the source volume, and reside in the same ESS as the source volume. For FlashCopy V1: The same restrictions apply as for FlashCopy V2 and the target and the source volume must reside in the same LSS. For SnapShot: An eligible target volume must have the same track form as the source volume and be the exact size of the source volume. Warning: The data within a copy pool should not be migrated. The copy pool backup storage group cannot be accessed by ACS routines, as SMS will prevent new data set allocations to this type of storage group. There must be a sufficient number of volumes in the backup target storage group to satisfy the number of backup versions specified for a source storage group. For example, if a system has 10 source volumes and the VERSIONS attribute has been specified as 2, the backup storage group must have at least 20 volumes to satisfy two backup versions of 10 volumes each. SMS provides a new storage group attribute to associate a source storage group to a backup target storage group. Notice that SMS does not verify that extend and overflow storage groups that are associated with main source pool storage groups have been included in a copy pool definition. They must be included in the storage group list for appropriate copy pools and they also must be associated to back up target storage groups. Figure C-6 illustrates the copy pool structure and the relationship between source and backup target storage groups.
Copy Pool
Name: CPName Versions: 2 Storage Group
Type: Pool Name: SrcSG1 CopyPool Backup Name: CPB1
Storage Group
Type: Pool Name: SrcSG2 CopyPool Backup Name: CPB2
Storage Group
Type: Extend Name: EX1 CopyPool Backup Name: CPB2
Storage Group
Type: CopyPool Backup Name: CPB1 CopyPool Backup Name: N/A
Storage Group
Type: CopyPool Backup Name: CPB2 CopyPool Backup Name: N/A
LSSa
LSSb
223
In Figure C-6, the copy pool contains three source storage groups, two with source data (SrcSG1 and SrcSG2), and an extend storage group (EX1). Two copy pool backup target storage groups (CPB1 and CPB2) are associated with the source storage groups.
224
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
The copy pools for a DB2 environment must follow a strict naming convention of the form DSN$locn-name$cp-type, where: DSN is the unique DB2 product identifier. $ is a required delimiter. locn-name is the DB2 location name. $ is a required delimiter. cp-type is the copy pool type; DB for database, LG for logs. For example, DB2 DB1P would have copy pools named DSN$DB1P$DB for the database copy pool and DSN$DB1P$LG for the log copy pool. Important: We recommend that you create separate ICF catalogs for each copy pool. The BACKUP SYSTEM utility requires that at least a database copy pool exists to take a data-only backup. If you plan to take full system backups (database, logs, BSDS) you must define the log copy pool as well. We recommend that you create separate ICF catalogs for each copy pool. The RESTORE SYSTEM utility uses the database copy pool only. In the BSDS, up to 50 versions are allowed.
Example C-4 shows how this looks from a DFSMShsm LIST command output.
Example: C-4 DFSMShsm LIST command output F HSM,LIST CP(DSN$DB8A$DB) TERM COPYPOOL= DSN$DB8A$DB VER=002, VALID=Y, VTOCENQ=N, MADE ON 2008/03/03 AT 17:58:01 TKN(C)=C'DB8A & U+ - ' TKN(H)=X'C4C2F8C2BA5053E44E472848000002426090' SGNAME=DB8A SOURCE=MHL125 TARGET=MHL213 SGNAME=DB8A SOURCE=MHL126 TARGET=MHL214 ARC0140I LIST COMPLETED, 6 LINE(S) OF DATA 958
225
Length 6
Value 000002426090
NOVTOCENQ keyword
NOVTOCENQ is an optional parameter that DB2 uses to request DFSMShsm to not serialize on the VTOCs of the volumes being processed. This is because DB2 has taken specific action to ensure that no data sets will be created, extended, or opened during the DFSMShsm Fast Replication.
The log-point is the RBA or LRSN (for data sharing) to which you want to recover the system. The SYSPITR option cannot be specified with any other option and is only allowed after NFM is enabled. When DB2 is started with a SYSPITR CRCR, the system starts in system recovery-pending mode and only the RESTORE SYSTEM utility can be run. Most DB2 commands will work, with the exception of START DATABASE and TERM UTIL. A DIS UTIL command will display only the status of the RESTORE SYSTEM utility. Data is unavailable until the utility completes successfully and DB2 is recycled. DB2 must be recycled after recovery is complete to reset recovery-pending status. If data sharing is active, each member that has been active after the log truncation point must have a SYSPITR CRCR created with the same log truncation point and must be started prior to recovery. The RESTORE SYSTEM utility cannot be run until all members have been started.
226
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
ORIGINAL CHECKPOINT RBA 000000000000 NEW CHECKPOINT RBA (CHKPTRBA) 00001022BE2E END CHECKPOINT RBA 00001023AF66 CRCR CREATED 23:47:18 OCTOBER 08, 2003 TIME OF CHECKPOINT 23:41:28 OCTOBER 08, 2003 RESTART PROGRESS STARTED ENDED ======= ===== CURRENT STATUS REBUILD NO NO FORWARD RECOVERY PHASE NO NO BACKOUT RECOVERY PHASE NO NO
BACKUP SYSTEM UTILITY HISTORY SUBSYSTEM ID DJ1G 23:47:49 OCTOBER 08, 2003 START STCK DATA COMPLETE DATA/LOG COMPLETE DATA LOG RBLP LTIME LOCATION NAME ---------------- ---------------- ------------------------------- ---------------BA2458B70E2AC5AE 0000000000000000 BA245635C2B2 2008/03/08
LRSN -----------BA245635C2B2
DATE
DSN1LOGP
DSN1LOGP has been enhanced to print a system event type log record, subtype=8, which is generated when a system goes into system recover-pending mode.
DSN1PRNT
DSN1PRNT has been enhanced to print the recovery base log point (RBLP) stored in the header page of DBD01.
227
Two options are available to you when running the BACKUP SYSTEM utility: FULL This indicates that you want to copy both the database copy pool and the log copy pool. This is the default. DATA ONLY This indicates that you want to copy the database copy pool only. This option will not copy the log copy pool. Database-only backups can be taken by using the DATA ONLY keywords. This tells the utility to copy only the database copy pool. Full system backups are the default and can be explicitly specified with the FULL keyword. Both types of backups can be used for point-in-time recovery with the RESTORE SYSTEM utility because it only uses the database copy pool to restore the data prior to applying logs. A full system backup can also be used to restore a system to the time the backup was taken, for disaster recovery, or for cloning purposes. In a full system backup, the database copy pool is copied first and the log copy pool is copied second so that normal DB2 restart recovery processing can be used to restore data consistency when restoring to a full backup. During backup, DB2 records a RBLP in the header page of DBD01. The RBLP is identified as the most recent system checkpoint prior to a backup log point, and the point at which DB2 starts scanning logs during a RESTORE SYSTEM recovery operation. DB2 updates its boot strap data set (BSDS) with backup version information and can keep track of up to 50 backup versions. In the case of data sharing, the submitting member records the backup version in its BSDS and also in the SCA. In general, the BACKUP SYSTEM utility performs the following steps: Takes a new exclusive lock to ensure that no other backup utility can execute. If data sharing, takes a global lock. Suspends 32 KB page writes for objects created prior to NFM. You can avoid the write suspension by REORGing these objects. If data sharing, all members are notified. Suspends data set creation (create table space, index, and so on), deletion (drop table space, index, and so on), renames (online REORG fast switch), and extensions. If data sharing, all members are notified. Suspends system checkpoints. If data sharing, all members are notified. Prevents data sets from pseudo close. If data sharing, all members are notified. Records the RBLP RBA or LRSN in the header page of DBD01 and writes the page to DASD. If data sharing, the system checkpoint prior to the lowest LRSN of all active members is used. Updates the BSDS with the system backup information. If data sharing, only the BSDS for the submitting member is updated. Invokes DFSMShsm to take a FlashCopy of the database copy pool. Invokes DFSMShsm to take a FlashCopy of the log copy pool if it is a full system backup. Resumes all suspend activities above. If data sharing, notifies all members. Releases the exclusive lock. If data sharing, notifies all members. Issues an informational message indicating that the backup is complete.
228
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
TOKEN RBA1
COPY COPY1
DFSMShsm
TOKEN RBA1
COPY LOG1
BSDS
COPY
COPY1
RBA
RBA1
LOG1
u1
u2
RBLP: RBA1
u3
u4
u5
u6
u7
u8
u9
u10
u11
DB2 DBs
ICF Catalog
Logs
ICF Catalog
'DB' copypool
DSN$DSNDB0G$DB'
'Log' copypool
DSN$DSNDB0G$LG'
One the BACKUP SYSTEM utility has been run, and a full system backup has been taken for DSNDB0G, the information is recorded in the DB2 BSDS, the header page of DBD01, and in DFSMShsm control data sets.
229
Figure C-8 shows what happens during the BACKUP SYSTEM FULL process, and also illustrates what happens as more BACKUP SYSTEM copies are taken: The BSDS is updated with COPY1 version information at RBA1. The RBLP in DBD01 is updated with the most recent system checkpoint RBA or LRSN prior to backup RBA1 at u2. DFSMShsm records COPY1 and RBA1 and keeps track of the DB and LG copy pool copies. Three BACKUP SYSTEM backups have been taken for DSNDB0Gtwo BACKUP SYSTEM FULL and one DATA ONLY. The second backup is also a full system backup and the same sequence of events occurs, but the third backup is a data-only backup. Notice that the same information is recorded in the BSDS and the header page of DBD01. DFSMShsm records the same copy version information but only takes a copy of the DB copy pool.
TOKEN
TOKEN
BSDS
COPY
COPYV1 COPYV2 COPYV3
DFSMShsm
RBA1 RBAh
RBA
RBA1 RBAh RBAn
RBLP: RBAn
sc1
sc2
sc3
sc4
sc5
sc6
sc7
sc8
sc9
sc10
sc11
ICF Catalog
DB2 DBs
Logs/ BSDS
ICF Catalog
ICF Catalog
DB2 DBs
Logs/ BSDS
ICF Catalog
ICF Catalog
DB2 DBs
Logs/ BSDS
ICF Catalog
'DB' copypool
DSN$DSNDB0G$DB'
'Log' copypool
DSN$DSNDB0G$LG'
'DB' copypool
DSN$DSNDB0G$DB'
'Log' copypool
DSN$DSNDB0G$LG'
'DB' copypool
DSN$DSNDB0G$DB'
'Log' copypool
DSN$DSNDB0G$LG'
Figure C-8 Two BACKUP SYSTEM FULL, and one DATA ONLY are taken
230
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
If you do not specify the FULL option in the Example C-6 on page 230, the FULL option is still implied, however, this is the default. In Example C-7, the DATA ONLY option has been used. This will not copy the log copy pool.
Example: C-7 Invoking DFSMShsm Fast Replication with DB2 utility (DATA ONLY option) //STEP1 EXEC DSNUPROC,SYSTEM=DB8A,UID=DIAG //* UTSTATS='' //SYSIN DD * BACKUP SYSTEM DATA ONLY
Once complete, DFSMShsm has a record of the fast replication copy invoked by DB2 and maintains this information until it expires. You can see the copy pool token information stored in DFSMShsm by using the DFSMShsm LIST command. Example C-8 shows the database output.
Example: C-8 DFSMShsm LIST command and output on DSN$DB8A$DB copy pool F HSM,LIST CP(DSN$DB8A$DB) ODS(MHLRES3.DB8A.LIST) -- DFSMShsm CONTROL DATASET --COPY POOL--LISTING --------- AT 18:36:34 ON 08/03/03 FOR SYSTEM=SC65 COPYPOOL = DSN$DB8A$DB VERSION VALID VTOCENQ DATE TIME 002 Y N 2008/03/03 17:58:01 TOKEN(C)=C'DB8A[&U+....-' TOKEN(H)=X'C4C2F8C2BA5053E44E472848000002426090' SGNAME DB8A SOURCE - TARGET MHL125 - MHL213 SOURCE - TARGET SOURCE - TARGET MHL126 - MHL214 SOURCE - TARGET
VERSION VALID VTOCENQ DATE TIME 001 Y N 2008/03/03 17:46:29 TOKEN(C)=C'DB8A[&|^....-' TOKEN(H)=X'C4C2F8C2BA50514FB03D684A000002426090' SGNAME DB8A SOURCE - TARGET MHL125 - MHL013 SOURCE - TARGET SOURCE - TARGET MHL126 - MHL014 SOURCE - TARGET
231
DB8ALOG2 MHL147 - MHL226 VERSION VALID VTOCENQ DATE TIME 001 Y N 2008/03/03 17:46:32 TOKEN(C)=C'DB8A[&|^....-' TOKEN(H)=X'C4C2F8C2BA50514FB03D684A000002426090' SGNAME SOURCE - TARGET DB8ALOG1 MHL037 - MHL025 DB8ALOG2 MHL147 - MHL026 SOURCE - TARGET SOURCE - TARGET SOURCE - TARGET
DSNU1614I
DSNUVBBD -
DSNU1600I
DSNUVBBD -
DSNU1614I
DSNUVBBD -
DSNU1602I DSNU010I
DSNUVBBD DSNUGBAC -
232
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
ARC1801I ARC1801I ARC1805I ARC1805I ARC1805I ARC1805I ARC1805I ARC1805I ARC1802I ARC1802I ARC1802I ARC1802I
(CONT.) COPY POOL DSN$DB8A$LG, AT 17:58:04 (CONT.) ON 2008/03/03 THE FOLLOWING 00002 VOLUME(S) WERE (CONT.) SUCCESSFULLY PROCESSED BY FAST (CONT.) REPLICATION BACKUP OF COPY POOL (CONT.) DSN$DB8A$LG (CONT.) MHL037 (CONT.) MHL147 FAST REPLICATION BACKUP HAS COMPLETED FOR (CONT.) COPY POOL DSN$DB8A$LG, AT 17:58:05 (CONT.) ON 2008/03/03, FUNCTION RC=0000, (CONT.) MAXIMUM VOLUME RC=0000
Example C-12 shows the output written to the DFSMShsm backup log data set from execution of the FRBACKUP command.
Example: C-12 FRBACKUP output in DFSMShsm backup log data set
ARC1801I FAST REPLICATION BACKUP IS STARTING FOR COPY POOL DSN$DB8A$DB, AT 17:58:01 ON 2008/03/03 ARC0640I ARCFRTM - PAGE 0001 5695-DF175 DFSMSDSS V1R05.0 DATA SET SERVICES 2003.316 17:58 ARC0640I ARCFRTM - ADR035I (SCH)-PRIME(06), INSTALLATION EXIT ALTERED BYPASS FAC CLASS CHK DEFAULT TO YES ARC0640I ARCFRTM - PARALLEL ARC0640I ARCFRTM - ADR101I (R/I)-RI01 (01), TASKID 001 HAS BEEN ASSIGNED TO COMMAND 'PARALLEL' ARC0640I ARCFRTM - COPY FULL IDY(MHL125) ODY(MHL213) ALLX ALLD(*) DUMPCOND FR(REQ) PUR ARC0640I ARCFRTM - ADR101I (R/I)-RI01 (01), TASKID 002 HAS BEEN ASSIGNED TO COMMAND 'COPY ' ARC0640I ARCFRTM - COPY FULL IDY(MHL126) ODY(MHL214) ALLX ALLD(*) DUMPCOND FR(REQ) PUR ARC0640I ARCFRTM - ADR101I (R/I)-RI01 (01), TASKID 003 HAS BEEN ASSIGNED TO COMMAND 'COPY ' ARC0640I ARCFRTM - ADR109I (R/I)-RI01 (01), 2003.316 17:58:03 INITIAL SCAN OF USER CONTROL STATEMENTS COMPLETED. ARC0640I ARCFRTM - ADR014I (SCH)-DSSU (02), 2003.316 17:58:03 ALL PREVIOUSLY SCHEDULED TASKS COMPLETED. PARALLEL MODE NOW IN EFFECT ARC0640I ARCFRTM - ADR050I (002)-PRIME(02), DFSMSDSS INVOKED VIA CROSS MEMORY APPLICATION INTERFACE ARC0640I ARCFRTM - ADR035I (002)-PRIME(86), INSTALLATION EXIT ALTERED DEBUG(FRMSG) OPTION TO UNSPECIFIED ARC0640I ARCFRTM - ADR016I (002)-PRIME(01), RACF LOGGING OPTION IN EFFECT FOR THIS TASK ARC0640I ARCFRTM - ADR050I (003)-PRIME(02), DFSMSDSS INVOKED VIA CROSS MEMORY APPLICATION INTERFACE ARC0640I ARCFRTM - ADR035I (003)-PRIME(86), INSTALLATION EXIT ALTERED DEBUG(FRMSG) OPTION TO UNSPECIFIED ARC0640I ARCFRTM - ADR016I (003)-PRIME(01), RACF LOGGING OPTION IN EFFECT FOR THIS TASK ARC0640I ARCFRTM - ADR006I (002)-STEND(01), 2003.316 17:58:03 EXECUTION BEGINS ARC0640I ARCFRTM - ADR241I (002)-DDTFP(01), TARGET VTOC BEGINNING AT 000003:0000 AND ENDING AT 000008:0014 IS OVERLAID ARC0640I ARCFRTM - ADR806I (002)-T0MI (02), VOLUME MHL125 WAS COPIED USING A FAST REPLICATION FUNCTION ARC0640I ARCFRTM - ADR006I (002)-STEND(02), 2003.316 17:58:03 EXECUTION ENDS ARC0640I ARCFRTM - ADR013I (002)-CLTSK(01), 2003.316 17:58:03 TASK COMPLETED WITH RETURN CODE 0000 ARC0640I ARCFRTM - ADR006I (003)-STEND(01), 2003.316 17:58:03 EXECUTION BEGINS ARC0640I ARCFRTM - ADR241I (003)-DDTFP(01), TARGET VTOC BEGINNING AT 000003:0000 AND ENDING AT 000008:0014 IS OVERLAID ARC0640I ARCFRTM - ADR806I (003)-T0MI (02), VOLUME MHL126 WAS COPIED USING A FAST REPLICATION FUNCTION ARC0640I ARCFRTM - ADR006I (003)-STEND(02), 2003.316 17:58:03 EXECUTION ENDS ARC0640I ARCFRTM - ADR013I (003)-CLTSK(01), 2003.316 17:58:03 TASK COMPLETED WITH RETURN CODE 0000 ARC0640I ARCFRTM - ADR012I (SCH)-DSSU (01), 2003.316 17:58:03 DFSMSDSS PROCESSING COMPLETE. HIGHEST RETURN CODE IS 0000 ARC1805I THE FOLLOWING 00002 VOLUME(S) WERE SUCCESSFULLY PROCESSED BY FAST REPLICATION BACKUP OF COPY POOL DSN$DB8A$DB ARC1805I (CONT.) MHL125 ARC1805I (CONT.) MHL126 ARC1802I FAST REPLICATION BACKUP HAS COMPLETED FOR COPY POOL DSN$DB8A$DB, AT 17:58:04 ON 2008/03/03, FUNCTION RC=0000, MAXIMUM VOLUME RC=0000 ARC1801I FAST REPLICATION BACKUP IS STARTING FOR COPY POOL DSN$DB8A$LG, AT 17:58:04 ON 2008/03/03 ARC0640I ARCFRTM - PAGE 0001 5695-DF175 DFSMSDSS V1R05.0 DATA SET SERVICES 2003.316 17:58 ARC0640I ARCFRTM - ADR035I (SCH)-PRIME(06), INSTALLATION EXIT ALTERED BYPASS FAC CLASS CHK DEFAULT TO YES ARC0640I ARCFRTM - PARALLEL ARC0640I ARCFRTM - ADR101I (R/I)-RI01 (01), TASKID 001 HAS BEEN ASSIGNED TO COMMAND 'PARALLEL' ARC0640I ARCFRTM - COPY FULL IDY(MHL037) ODY(MHL225) ALLX ALLD(*) DUMPCOND FR(REQ) PUR ARC0640I ARCFRTM - ADR101I (R/I)-RI01 (01), TASKID 002 HAS BEEN ASSIGNED TO COMMAND 'COPY ' ARC0640I ARCFRTM - COPY FULL IDY(MHL147) ODY(MHL226) ALLX ALLD(*) DUMPCOND FR(REQ) PUR ARC0640I ARCFRTM - ADR101I (R/I)-RI01 (01), TASKID 003 HAS BEEN ASSIGNED TO COMMAND 'COPY ' ARC0640I ARCFRTM - ADR109I (R/I)-RI01 (01), 2003.316 17:58:05 INITIAL SCAN OF USER CONTROL STATEMENTS COMPLETED. ARC0640I ARCFRTM - ADR014I (SCH)-DSSU (02), 2003.316 17:58:05 ALL PREVIOUSLY SCHEDULED TASKS COMPLETED. PARALLEL MODE NOW IN EFFECT
233
ARC0640I ARC0640I ARC0640I ARC0640I ARC0640I ARC0640I ARC0640I ARC0640I ARC0640I ARC0640I ARC0640I ARC0640I ARC0640I ARC0640I ARC0640I ARC0640I ARC0640I ARC1805I ARC1805I ARC1805I ARC1802I MAXIMUM
ARCFRTM - ADR050I (002)-PRIME(02), DFSMSDSS INVOKED VIA CROSS MEMORY APPLICATION INTERFACE ARCFRTM - ADR035I (002)-PRIME(86), INSTALLATION EXIT ALTERED DEBUG(FRMSG) OPTION TO UNSPECIFIED ARCFRTM - ADR016I (002)-PRIME(01), RACF LOGGING OPTION IN EFFECT FOR THIS TASK ARCFRTM - ADR050I (003)-PRIME(02), DFSMSDSS INVOKED VIA CROSS MEMORY APPLICATION INTERFACE ARCFRTM - ADR035I (003)-PRIME(86), INSTALLATION EXIT ALTERED DEBUG(FRMSG) OPTION TO UNSPECIFIED ARCFRTM - ADR016I (003)-PRIME(01), RACF LOGGING OPTION IN EFFECT FOR THIS TASK ARCFRTM - ADR006I (003)-STEND(01), 2003.316 17:58:05 EXECUTION BEGINS ARCFRTM - ADR241I (003)-DDTFP(01), TARGET VTOC BEGINNING AT 000001:0005 AND ENDING AT 000001:0014 IS OVERLAID ARCFRTM - ADR806I (003)-T0MI (02), VOLUME MHL147 WAS COPIED USING A FAST REPLICATION FUNCTION ARCFRTM - ADR006I (003)-STEND(02), 2003.316 17:58:05 EXECUTION ENDS ARCFRTM - ADR013I (003)-CLTSK(01), 2003.316 17:58:05 TASK COMPLETED WITH RETURN CODE 0000 ARCFRTM - ADR006I (002)-STEND(01), 2003.316 17:58:05 EXECUTION BEGINS ARCFRTM - ADR241I (002)-DDTFP(01), TARGET VTOC BEGINNING AT 000001:0005 AND ENDING AT 000001:0014 IS OVERLAID ARCFRTM - ADR806I (002)-T0MI (02), VOLUME MHL037 WAS COPIED USING A FAST REPLICATION FUNCTION ARCFRTM - ADR006I (002)-STEND(02), 2003.316 17:58:05 EXECUTION ENDS ARCFRTM - ADR013I (002)-CLTSK(01), 2003.316 17:58:05 TASK COMPLETED WITH RETURN CODE 0000 ARCFRTM - ADR012I (SCH)-DSSU (01), 2003.316 17:58:05 DFSMSDSS PROCESSING COMPLETE. HIGHEST RETURN CODE IS 0000 THE FOLLOWING 00002 VOLUME(S) WERE SUCCESSFULLY PROCESSED BY FAST REPLICATION BACKUP OF COPY POOL DSN$DB8A$LG (CONT.) MHL037 (CONT.) MHL147 FAST REPLICATION BACKUP HAS COMPLETED FOR COPY POOL DSN$DB8A$LG, AT 17:58:05 ON 2008/03/03, FUNCTION RC=0000, VOLUME RC=0000
234
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
LOGONLY option to recover a DB2 subsystem or a data sharing group to a previous point in time. When the utility is used with the LOGONLY keyword, DB2 skips the call to DFSMShsm, assumes that the data was restored by another method, and executes only the log apply phase. In general, to restore a system to a prior point in time with the RESTORE SYSTEM utility, use the following steps: 1. Stop DB2. If data sharing, stop all members. 2. Use DSNJU003 to create a SYSPITR CRCR specifying the point to which you wish to recover the system. If data sharing, create a SYSPITR CRCR for each member. 3. If data sharing, delete all coupling facility structures. 4. Start DB2. If data sharing, start all members of the data sharing group. 5. DB2 will enter into system recover-pending mode, ACCESS(MAINT), and will bypass recovery except for indoubt URs. 6. Execute the RESTORE SYSTEM utility. The utility must be completed on the original submitting member. 7. Restores the most recent database copy pool version that was taken prior to the log truncation point. 8. Performs the log apply function. 9. If a method other than the BACKUP SYSTEM utility was used to copy the system, restore the data manually and use RESTORE SYSTEM LOGONLY. This option can be used with z/OS V1R3 and later. Backs up data with another volume dump solution and uses SET LOG SUSPEND/RESUME. Performs the log apply function only. 10.Stops DB2 to reset system recovery-pending status. If data sharing, stop all members. 11.Displays and terminates any active utilities. 12.Displays restricted objects and recovers objects in RECP status and rebuilds objects in RBDP status. The SET LOG SUSPEND/RESUME commands can be used with other volume backup solutions if BACKUP SYSTEM is not available. DFSMShsm copy pools can be used to simplify the backup process if you are on z/OS V1R5. The SET LOG SUSPEND command is more disruptive than the BACKUP SYSTEM utility because it halts all update activity on a subsystem. Update activity is resumed only when the SET LOG RESUME command is issued. If data sharing is active, both commands must be entered on all active members of the data sharing group. The SET LOG SUSPEND command updates the RBLP in DBD01 so that recovery with RESTORE SYSTEM LOGOONLY is possible. Important: No other utilities can run while the RESTORE SYSTEM utility is running.
235
Figure C-9 illustrates what occurs during a system level point-in-time recovery with the RESTORE SYSTEM utility. DB2 recognizes the log truncation point in the SYSPITR CRCR, checks the BSDS to determine which backup to use, calls DFSMShsm to restore the correct database copy pool version, gets the RBLP from DBD01, then scans the logs and applies log records until reaching the log truncation point.
TOKEN
TOKEN
BSDS
COPY
COPYV1 COPYV2 COPYV3
DFSMShsm
3
RBA1 RBAh
RBA
RBA1 RBAh RBAn
SYSPITR=RBAk
RBAh is returned
4
DBD01 page set
RBL P RBA1
RBAh RBAn
RESTORE SYSTEM
DB2 DBs
5
logscan
Log Apply 6
SYSPITR=RBAk
sc1
sc2 RBA1
sc3
sc4
sc5 RBAh
sc6
sc7
sc8
sc9
sc10
sc11
RBAk RBAn
Figure C-9 Recovering to an arbitrary point in time using the RESTORE SYSTEM utility
The LOGONLY option can be used. This indicates that the database volumes have already been restored outside of DB2, so the RESTORE SYSTEM only applies the outstanding log changes to the database. Use the LOGONLY option to recover a DB2 subsystem or a data sharing group to a previous point in time. See Example C-14.
Example: C-14 Sample JCL of RESTORE SYSTEM with LOGONLY option //STEP1 EXEC DSNUPROC,SYSTEM=DB8A,UID=DIAG //* UTSTATS='' //SYSIN DD * RESTORE SYSTEM LOGONLY
236
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
You cannot specify a backup version with the RESTORE SYSTEM utility. RESTORE SYSTEM uses the latest version before the log truncation point. You can specify the log truncation point with the CRESTART SYSPITR option of the DNJU003 stand-alone utility.
DSNU1627I
237
DSNU1604I -P870 DSNUVARL - RESTORE SYSTEM PHASE LOG APPLY STARTED AT LOG POINT = X'00120CDAC090'. DSNU1628I DSNUVBRD - RESTORE SYSTEM PHASE LOG APPLY COMPLETED, ELAPSED TIME = 00:04:54. DSNU010I DSNUGBAC - UTILITY EXECUTION COMPLETE, HIGHEST RETURN CODE=0
Several sample scenarios are explained in 5.1, System level backup using DB2 and Recovery Expert GUI to perform the restore on page 84.
238
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
Object-level recovery
The backups taken by the BACKUP SYSTEM utility (referred to here as system level backups) in V8 are used for recovery of the entire DB2 system. DB2 9 for z/OS has an enhancement to allow a DB2 object to be recovered from the system level backups. Recovery is via the RECOVER utility, which is now capable of using system level backups for the restore phase in addition to image copies. In order to allow RECOVER to consider using system level backups there is a DSNZPARM option that can be set from panel DSNTIP6. This is the first option on the panel, as shown in Figure C-10 on page 240. Having enabled the use of system level backups, they will be automatically considered in object level recoveries. Note: You need to alter your indexes to the COPY YES attribute to enable RECOVER from system level backups. Unless the installation is also planning to offload the system level volume backups to tape (see Tape support for BACKUP SYSTEM on page 241), there are no syntax changes to RECOVER. The user will specify the table spaces or indexes in a list, individually, or via a LISTDEF, and the RECOVER utility will determine the most recent recovery base. In addition to the image copies recorded in the SYSCOPY (or the log for some catalog or directory spaces), the system level volume backups are also examined. If the last copy before the recovery point is a system level volume backup, then the specific data sets will be extracted and restored via DFSMShsm. Note that if RECOVER cannot successfully restore from this system level backup, then the utility will terminate, assuming that the OPTION EVENT(ITEMERROR,SKIP) was not specified. This is in contrast to RECOVER having a problem locating an image copy on tape or disk, when an alternative such as the local backup or an earlier image copy is tried. If the system level volume backup is not usable for any reason, then the user can bypass it by using the RESTOREBEFORE option on RECOVER. Restriction: If a data set has moved to a different volume or was deleted between the time of the BACKUP SYSTEM utility and the time of the RECOVER utility, then object level recovery is not possible unless an image copy is available. This restriction does not apply to system level backups created using DB2 Recovery Expert for z/OS because the tool maintains this information in one of the SBRS repository data sets for using at the time of recovery. Allowing system level volume backups to be used by RECOVER means that conventional image copies need be taken on a potentially much-reduced frequency. For example, if there is a system backup daily, then running image copies daily may not be needed, unless for special reasons like DR. Due to the restriction noted above, we do not recommend that image copies are dispensed with entirely. Image copies will still be required following LOAD REPLACE and REORG LOG NO, as enforced by DB2. Note: Running BACKUP SYSTEM will now result in Real Time Statistics columns for COPY to be updated because system level backups may now be used in object-level recovery.
239
Option 1 determines whether the system level backup and restore functions should be active.
We discuss the next three options in the next sections.
DSNTIP6 ===> INSTALL DB2 - DB2 UTILITIES PARAMETERS
Enter system-level backup options for RESTORE SYSTEM and RECOVER below: 1 SYSTEM-LEVEL BACKUPS ===> NO As a recovery base: NO or YES 2 RESTORE/RECOVER ===> NO From dump: NO or YES 3 DUMP CLASS NAME ===> For RESTORE/RECOVER from dump 4 MAXIMUM TAPE UNITS ===> NOLIMIT For RESTORE SYSTEM: NOLIMIT or 1-255 Enter other DB2 Utilities options below: 5 TEMP DS UNIT NAME ===> SYSDA Device for temporary utility data sets 6 UTILITY CACHE OPTION ===> NO 3990 storage for DB2 utility IO 7 STATISTICS HISTORY ===> NONE Default for collection of stats history 8 STATISTICS ROLLUP ===> NO Allow statistics aggregation: NO or YES 9 STATISTICS CLUSTERING===> ENHANCED For RUNSTATS (ENHANCED or STANDARD) 10 UTILITY TIMEOUT ===> 6 Utility wait time multiplier 11 UT SORT DS ALLOCATION===> NO Predictable sort disk space allocation 12 IGNORE SORTNUM STMT ===> NO Ignore SORTNUM keyword in UT stmt
PRESS:
ENTER to continue
RETURN to exit
240
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
BACKUP SYSTEM
DATA ONLY ESTABLISH FCINCREMENTAL END FCINCREMENTAL
dumpclass-spec:
DUMPCLASS
DUMP indicates that you want to create a fast replication copy of the database copy pool and the log copy pool on disk and then initiates a dump to tape of the fast replication copy. The dump to tape begins after DB2 successfully establishes relationships for the fast replication copy. DUMPONLY indicates that you want to create a dump on tape of an existing fast replication copy (that is currently residing on the disk) of the database copy pool and the log copy pool. You can also use this option to resume a dump process that has failed. The output of the DUMP or DUMPONLY is directed to what are called DFSMShsm dump classes. Each dump class specifies the unit types to which the data will be directed. This DB2 enhancement was designed to allow for the data to go to tape. However, an SMS dump class is not restricted to a tape medium. When the data class is tape, you can specify in SMS to what degree volumes will be stacked on tapes. There will be a trade-off in tape capacity usage and performance to be considered since the more volumes are stacked on a tape, the longer it will take to search. DB2 allows up to five dump classes to be specified. Each specification results in a complete copy of the copy pools being backed up being directed to each dump class. Any specification in the utility control cards of dump classes will override the dump classes defined in the COPYPOOL definitions. By having multiple dump classes, it could be possible, for example, to send one copy to remote devices for DR purposes, while keeping another copy for local operational reasons.
Appendix C. Storage and DB2 functions
241
Important: Having data on tape may be advantageous for moving the data off site for DR situations. It may also allow for longer retention of data locally. It does not, however, compare with the speed of a FlashCopy during restore. Full system restores from tape will be lengthy processes. Although the logical FlashCopy is extremely fast, the physical copying of data does take time and can lead to a significant load on the I/O subsystem. See , Incremental FlashCopy on page 243, for one way of reducing I/O load during BACKUP SYSTEM. The choice of DUMP or DUMPONLY is another way to reduce impact when offloading to tape. When the DUMP option is selected, the copying to tape is started ahead of the physical completion of the FlashCopy. This means that for a period of time there is additional load on the I/O subsystem (that is, the disk-to-disk copy associated with the FlashCopy, in addition to the disk-to-tape copy). The DUMPONLY option can instead be used to copy a previous backup to tape at a later time, thereby not causing such a big peak in I/O activity. Tip: To minimize I/O activity peaks, perform a BACKUP SYSTEM without DUMP and follow it with a BACKUP SYSTEM with DUMPONLY. Since the copying to tape is relatively slow, a new FORCE keyword has been added to BACKUP SYSTEM. This allows a new backup to be started even though a previous DUMP has not finished. FORCE should only be used if it is more important to take a new backup than to let the offloading to tape of the previous dump to tape complete. Note: The LIST COPYPOOL with DUMPVOLS option can be used to verify the status of DUMP and DUMPONLY. There is a no copy option set in SMS that allows for copies to go to a dump class, without the FlashCopy versions going to disk. COPY NO is set on the SMS COPYPOOL PANEL. It is the number of recoverable disk versions that is set to zero for COPY NO. Note that this option could never provide for quick restores, and the backup could be very lengthy as well. The RESTORE SYSTEM utility has been improved to use the system level backups that have been dumped to tape. Note that RESTORE only handles the database COPYPOOL and then applies the log records from the active logs. If you want to restore the log copy pool from your BACKUP SYSTEM FULL, you need to restore it natively. The panel in Figure C-10 on page 240 shows three parameters to control the RESTORE. All of these can be overridden by the utility control statements.
Option 2 determines whether the FlashCopy version from a dump class is to be used rather than one on disk. This parameter applies also to RECOVER. The default NO may be preferred by customers who do not want to use the potentially slower recovery method. Option 3 determines the default dump class to restore from. This also applies to RECOVER. Option 4 determines the maximum number of tape units to be used by RESTORE. The default is not to limit the number of drives, but this can be capped at anything from 1 to 255. It can be overridden by TAPEUNITS keyword in the RESTORE SYSTEM utility statement.
Note: The reason for option 2 is to allow the tape version to be specified, rather than the significantly faster disk FlashCopy version, to support disaster recovery. The tapes could be sent to the disaster recovery location and registered in HSM. 242
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
RESTORE SYSTEM
LOGONLY
TAPEUNITS (num-tape-units)
In summary, while tape backups can be useful, the time to restore from such backups should never be underestimated. It is expected that installations with high-availability requirements will restore via disk FlashCopy in all but catastrophic situations.
Incremental FlashCopy
In order to reduce I/O activity, support is being added to allow incremental FlashCopy. In addition to z/OS Version 1 Release 8 DFSMShsm, this function requires APAR OA17314 for z/OS. Note that incremental FlashCopy does not reduce the need for disk volumes, unlike an incremental image copy potentially does. In order for FlashCopy incrementals to be used, the relationship must first be established. This can be done either by HSM commands or by using the new options on the BACKUP SYSTEM utility. See Figure C-11 on page 241. ESTABLISH FCINCREMENTAL and END FCINCREMENTAL are added to specify a persistent or last incremental FlashCopy relationship is to be established. Similarly, they can be ended via an HSM command or the utility. All tracks on the source volume are considered to be changed when the relationship is established, so all tracks are copied. Subsequent incremental FlashCopies will copy only the tracks that have changed on the source volume since the last copy was taken. The previous content on the volumes will be replaced by the current contents. Do not confuse the adjective incremental as used with image copies with the one used with FlashCopy. With COPY you can merge incremental and previous copies. With FlashCopy the incremental changes are immediately applied to the previous full copy. Note: A disk volume can have only one incremental relationship. This means that if a copy pool has more than one disk generation, then the other generations will be full backups. DFSMShsm Fast Replication associates a defined number of versions to a copy pool. This specifies the maximum number of versions that can be maintained in parallel. Each invocation of the FRBACKUP command creates a new version in the copy pool (with version numbers assigned automatically in the range of 1 to 999). If more versions are created than the copy pool can support in parallel, then the oldest version will be deleted and replaced by the newest version. This is sometimes referred to as roll-off processing. Since version numbers are always increased (with the maximum being 999 and then restarting at 1), a relative addressing of the versions in the copy pool is more appropriately provided by generations. They follow the same concept as Generation Data Groups (GDGs). Generation 0 always refers to the most current version in the copy pool. The second most current version is referred to as generation 1, and so forth.
243
Figure C-13 shows the different times to take the copies. V1 is a full backup. V2 is the first incremental, and therefore all pages are copied. This takes as long as the full backup. V3 is an incremental, and this is much quicker. Similarly, V4 and V5 are incrementals with a shorter duration than a full backup. The backup that withdraws the relationship is still an incremental. T6 and T7 are full backups.
Gen 0
V1
full
V2
incr
V3
incr
V4
incr
V5
incr
V6
incr
V7
full
V8
full
t0
t1
t2
t3
t4
t5
t6
t7
Figure C-14 shows what happens when the copy pool is set up to have two versions. So for each source volume we have two sets of target volumes that we can copy to. However, we cannot be using incremental FlashCopy to both of them, as we are restricted to a single incremental relationship per volume.
Gen 0
V1
incr empty
V2
full
V3
incr
V4
full
V5
incr
V6
full
V7
full
V8
full
Gen 1
V1
incr
V2
full
V3
incr
V4
full
V5
incr
V6
full
V7
full
t0
t1
t2
t3
t4
t5
t6
t7
V1 is the backup that establishes the incremental, so it copies all the data. V2 cannot be an incremental, as it is going to the other set of volumes and is a full backup. V3 will be an incremental, and hence shows a shorter time. The next backup V4 will be a full backup. Every 244
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
other backup is a full in this setup, alternating with the incremental. So V5 will be a incremental. However, it withdraws the relationship, and all subsequent backups are full. Clearly, the incremental reduces the copy time. It also reduces the workload on the I/O subsystem. When there are multiple versions allowed for a copy pool, the benefit diminishes. If we had five volumes, then only 20% of backups could be incremental. In a two-generation example it maybe possible to take two backups a dayone in the quiet time of the day (the full) and one at a busier time of the day (incremental).
3. Leave the recovered objects in a consistent state from a transaction point of view.
245
Note: Consistency is not guaranteed when recovering to a specified image copy (TOCOPY, TOLASTCOPY, and TOLASTFULLCOPY of RECOVER options). DB2 objects can now be recovered to any previous point in time with full data integrity. In addition, these improvements allow you to avoid running the QUIESCE utility regularly, so you can reduce the disruption to DB2 users and applications. Recovery to a point in time with consistency is available only in new-function mode to avoid issues with coexistence environments. Important: You must include all associated objects in the same RECOVER utility job to ensure data consistency from the application point of view. If the object or objects are not specified in the same list, the utility sets the appropriate prohibitive pending state. For example, if the parent table space is recovered to a point in time, but its dependent table space is not recovered in the same list, the dependent table space is placed in a CHKP (check pending) state. The RECOVER utility automatically uses the fast log apply process during the LOGAPPLY phase if the fast log apply function has been enabled. After the recovery completes, all storage that is used by the fast log apply function is returned to the DBM1 address space. In addition, the option RESTOREBEFORE has been added to the RECOVER utility. This option allows you to search for an image copy, concurrent copy, or system level backup with an relative byte address (RBA) or log record sequence number (LRSN) value earlier than the specified X'byte-string' value. We recommend that you exercise the use of this feature. For example, if you know that you have a broken image copy, you can direct the RECOVER utility to a previous full or incremental copy and perform a LOGAPPLY from that point onward.
246
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
Appendix D.
247
Overview
The schema level repository is a set of (currently) 53 DB2 tables (as shown in Table D-1 on page 251) that serves as an archive to hold object definitions and alterations to object definitions. The default database name for the SLR is SYSTOOLS and the default schema name is SYSTOOLS. You can customize these defaults. You have to run the ARYDDLA, ARYDDL8, ARYDDL81, and ARYDDL82 members in the ARY.V2R1M0.SARYSAMP library to define the SLR objects in the appropriate DB2 subsystem. During the installation, the SLR is initially loaded with the current data extracted from the DB2 catalog tables by the ARYSJ002 job in the ARY.V2R1M0.SARYSAMP library. The SLR is critical to the recovery of dropped objects and point-in-time recovery of existing objects, and needs to be periodically updated with the relevant catalog information. Data Definition Language (DDL) changes over a period of time are needed when a recovery action is requested to a point in time such as the image copy that was taken for an earlier DDL version of the object. Recovery of dropped objects is not possible if the SLR does not contain the object definitions, the alterations to object definitions (including the fact that the object was dropped), and the image copy information. You need to schedule updates of the SLR to ensure proper recovery of dropped objects. Ideally, update the SLR whenever object definitions are created or changed, and when image copies and quiesce points are taken. Important: Schedule an SLR update every few hours or daily. If you perform important application object definition updates at scheduled intervals, then update the SLR immediately after the object definition updates. If the SLR does not contain object definitions, alterations to object definitions, and image copy information in it, then the recovery of the undropped object to a point in time might not synchronize the data and the DDL at the required moment in time. When you update the SLR, it creates a row in one of the SLR tables with a creation time that corresponds to the creation time of the object. This entry in the SLR has a creation time and a blank value for the end time of this object definition level. When you alter this object, such as adding a column and running the SLR update again, a new entry is created for this object in the SLR with a new creation time corresponding to when the SLR update is performed (not the exact time when the object is created) and a blank value for the end time of this object definition level. The previous entry (which now represents the earlier object definition level of this object) is now given an end time that is one microsecond less than the creation time of the new entry. Figure D-1 on page 249 shows an example of multiple object definition levels for an object as recorded in the SLR. Note: Establish each DB2 subsystem in the SLR by tailoring the ARYSJ001 for that subsystem or data sharing group and running it.
248
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
Recovery Expert provides a sample library member ARYSJ002, which contains the job control language (JCL) to update the SLR. The initial run of job ARYSJ002 might take multiple hours to copy the contents of the DB2 system catalog. Runtimes vary depending on the DB2 system catalog size. To update the schema level repository: 1. Edit the ARY.V2R1M0.SARYSAMP member ARYSJ002. 2. Add the appropriate job card to ARYSJ002. 3. Change #SARYLOAD to the appropriate IBM DB2 Recovery Expert for Z/OS product libraries. 4. Change #SDSNLOAD to the appropriate DB2 load library. 5. Change #SSID to the target DB2 subsystem ID. 6. Change the DB2PARMS data set name to the product Virtual Storage Access Method (VSAM) control data set that is created by the sample JCL provided in member ARYSJ000. 7. Modify the CAPTURE PROFILES statement as instructed in the sample member ARYSJ002. This step is dependent of whether DB2 Automation Tool is installed. 8. Run ARYSJ002. Attention: The SLR update job must end with a return code of zero. If a non-zero return code occurs, review the job output for errors. Correct the problem and resubmit the JCL.
249
The Recovery Expert GUI client options tab (Figure D-2) must identify the SLR created and updated previously, to store the quiet times.
The quiet times are then displayed in the quiet time window, as shown in Figure D-3.
SLR tables
Table D-1 on page 251 shows the list of SLR tables in the SYSTOOLS (default) database, and the corresponding DB2 catalog tables from which it populates these tables. A brief description of the SLR tables is included. The SLR tables have a number of indexes and views on them that are not shown here. The SLR tables also have additional columns as compared to their corresponding DB2 catalog tables.
250
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
Not all DB2 catalog tables have an equivalent SLR table, and not all SLR tables have an equivalent DB2 catalog table. Ten SLR tables have no equivalent DB2 catalog tables because they contain information about the execution of the Recovery Expert for z/OS environment. These tables are ARYQT, ARYQTG, ARYSPEC_DATA, ARYSPEC_DIR, ARYVIEWSR, ARYVRLOG, ARYPROFILES, ARYOBJECTS, DR_ARCHIVE_LOGS00, and DR_IMAGE_COPY_CATL.
Table D-1 SLR tables in comparison with DB2 catalog tables SLR tables (SYSTOOLS) ARYAUXRELS Corresponding DB2 tables (SYSIBM) SYSAUXRELS Description Contains one row for each auxiliary table created for a large object (LOB) column. A base table space that is partitioned must have one auxiliary table for each partition of each LOB column. Contains one row for each check constraint. Contains one row for each table check constraint for catalog tables created in or after Version 7. Check that constraints for catalog tables created before Version 7 are not included in this table. Records the UPDATE or REFERENCES privileges that are held by users on individual columns of a table or view. Contains one row for every column of each table and view. Contains information required for recovery. Contains one row for each database, except for database DSNDB01. Contains one row for each distinct type defined to the system. Records the privileges that are held by users over databases. Contains one row for each DBRM of each application plan. Contains one row for every column that has a field procedure. Contains one row for every column of every foreign key. Contains one row for every index. Contains one row for each non-partitioned secondary index (NPSI) and one row for each partition of a partitioning index or a data-partitioned secondary index (DPSI). Contains one row for each column of an index key. Is used to archive DB2 Automation Tool object profiles. Contains a row for every package. Records the privileges that are held by users over packages. Records the dependencies of packages on local tables, views, synonyms, table spaces, indexes, aliases, functions, and stored procedures. Contains one or more rows for every local application plan bound with a package list. Each row represents a unique entry in the plans package list.
ARYCHECKS ARYCHECKS2
SYSCHECKS SYSCHECKS2
ARYCOLAUTH ARYCOLUMNS ARYCOPY ARYDATABASE ARYDATATYPES ARYDBAUTH ARYDBRM ARYFIELDS ARYFOREIGNKEYS ARYINDEXES ARYINDEXPART
SYSCOLAUTH SYSCOLUMNS SYSCOPY SYSDATABASE SYSDATATYPES SYSDBAUTH SYSDBRM SYSFIELDS SYSFOREIGNKEYS SYSINDEXES SYSINDEXPART
ARYPACKLIST
SYSPACKLIST
251
Description Contains a row for each parameter of a routine or multiple rows for table parameters (one for each column of the table). Contains zero or more rows for every package. Each row for a given package represents one or more connections to an environment in which the package can be run. Contains one row for each application plan. Records the privileges that are held by users over application plans. Records the dependencies of plans on tables, views, aliases, synonyms, table spaces, indexes, functions, and stored procedures. Contains zero or more rows for every plan. Each row for a given plan represents one or more connections to an environment in which the plan can be used. Is used to archive DB2 Automation Tool object profiles. Contains the quiet times detected after running log analysis. Contains the group ID that relates multiple quiet times that are detected after running log analysis. Contains one row for every referential constraint. Records CREATE IN and PACKADM ON privileges for collections, USAGE privileges for distinct types, and USE privileges for buffer pools, storage groups, and table spaces. Records the privileges that are held by users on routines. A routine can be a user-defined function, cast function, or stored procedure. Contains a row for every routine. A routine can be a user-defined function, cast function, or stored procedure. Contains one or more rows for each user who is granted a privilege on a particular schema in the database. Records the privileges that are held by users over sequences. Contains one row for each identity column or user-defined sequence. Contains the detailed data associated with each specification. Contains one row for each saved specification. Contains one row for each storage group. Contains one row for each synonym of a table or view. Records the privileges that users hold on tables and views. Contains one row for each non-partitioned table space and one row for each partition of a partitioned table space. Contains one row for each table, view, or alias.
ARYPLSYSTEM
SYSPLSYSTEM
ARYROUTINEAUTH
SYSROUTINEAUTH
ARYROUTINES ARYSCHEMAAUTH ARYSEQUENCEAUTH ARYSEQUENCES ARYSPEC_DATA ARYSPEC_DIR ARYSTOGROUP ARYSYNONYMS ARYTABAUTH ARYTABLEPART ARYTABLES
SYSROUTINES SYSSCHEMAAUTH SYSSEQUENCEAUTH SYSSEQUENCES No equivalent No equivalent SYSSTOGROUP SYSSYNONYMS SYSTABAUTH SYSTABLEPART SYSTABLES
252
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
Description Contains one row for each table space. Contains one row for each trigger. Records the system privileges that are held by users. Records the dependencies of views on tables, functions, and other views. Contains one or more rows for each view, materialized query table, or user-defined Structured Query Language (SQL) function. Contains user-defined function (UDF) and procedure-related information. The ARYVIEWSR table is loaded by the SLR update utility (ADHSJ002) with SQL text for SQ- based routines. In the DB2 catalog, this text is stored in SYSVIEWS table. Contains one row for each volume of each storage group. Records utility execution statistics in multiple entries (one for each SLR table updated) for execution of the SLR update utility. Recovery Expert for z/OS also records some internal data in this table.
ARYVIEWSR
No equivalent
ARYVOLUMES ARYVRLOG
SYSVOLUMES No equivalent
DR_ARCHIVE_LOGS00 DR_IMAGE_COPY_CATL
No equivalent No equivalent
Recovery Expert for z/OS does not provide a graphical user interface (GUI) or batch facility to prune the contents of the SLR.
253
Entries that belong to existing objects but are no longer required, such as entries related to image copies, quiesce points, quiet times, and object definition levels Entries that seem to belong to the same object, but in fact belong to different objects that accidentally shared the same name For example, this can occur when you create a table PROD with certain columns, perform updates, take image copies, and drop it some days later. A few days later, you create another table PROD with different attributes, and perform updates, take image copies, and so on. The SLR has information about both these tables and assumes that they are different versions of the same object. This can cause unpredictable results when performing a point-in-time recovery. You must prune the entries of the first PROD table because, in practice, it does not represent an older version of the current PROD table. Note: The use of a date or time stamp is not likely to properly prune or delete data from the SLR tables. The time stamp that is entered in the tables does not span all the SLR tables and is the time stamp when the SLR update was run.
Important: Before you delete any entries in any of the SLR tables, first run a dummy delete (SELECT statement with the same predicates as the DELETE statement) to ensure that only the required rows are deleted. Example D-1 through Example D-12 on page 261 provide examples of SQL that you can run to prune the SLR tables depending on the circumstances. An advisory is provided with each sample. Note: Example D-12 on page 261 shows the deletion of entries in the ARYSPEC_DATA table. Rows also get deleted from this table when the delete function for a selected specification is started from the Recovery Expert for z/OS GUI client.
Example: D-1 When delete authority is removed for objects in DB2 for z/OS //****************************************************************************** //* TABLES: ARYDBAUTH, ARYRESAUTH, ARYSCHEMAAUTH and ARYUSERAUTH //* //* FOLLOWING SAMPLE DELETE STATEMENT SHOULD BE MODIFIED BASED //* ON YOUR SPECIFIC ENVIRONMENT AND REQUIREMENTS //* //* => CHANGE //* 'DATABASE NAME' TO THE NAME OF THE DATABASE FOR THE AUTHORITY //* 'GRANTED BY' TO THE GRANTOR OF THE AUTHORITY //* 'PERSON GRANTED AUTH' TO THE PERSON GRANTED AUTHORITY //* 'TABLESPACE NAME, BPOOL NAME, ETC' TO THE APPROPRIATE NAME //* 'NAME OF SCHEMA' TO THE NAME OF THE SCHEMA //* //****************************************************************************** DELETE FROM SYSTOOLS.ARYDBAUTH WHERE NAME = 'DATABASE NAME' AND GRANTOR = 'GRANTED BY' AND GRANTEE = 'PERSON GRANTED AUTH'; DELETE FROM SYSTOOLS.ARYRESAUTH WHERE NAME = 'TABLESPACE NAME, BPOOL NAME, ETC' AND GRANTOR = 'GRANTED BY' AND GRANTEE = 'PERSON GRANTED AUTH'
254
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
AND QUALIFIER = 'DATABASE NAME' ; DELETE FROM SYSTOOLS.ARYSCHEMAAUTH WHERE SCHEMANAME = 'NAME OF SCHEMA' AND GRANTOR = 'GRANTED BY' AND GRANTEE = 'PERSON GRANTED AUTH'; DELETE FROM SYSTOOLS.ARYUSERAUTH WHERE AND GRANTOR = 'GRANTED BY' AND GRANTEE = 'PERSON GRANTED AUTH'; Example: D-2 When image copies are deleted for objects in DB2 for z/OS //****************************************************************************** //* FOLLOWING SQL PERFORMS A DELETE FROM ARYCOPY WHICH CONTAINS SYSCOPY //* INFORMATION. //* //* YOU SHOULD UNDERSTAND AND EVALUATE CAREFULLY HOW LONG YOU WILL NEED TO KEEP //* THIS INFORMATION SINCE IT IS A KEY FACTOR IN THE ABILITY OF THE RECOVERY //* EXPERT TOOL TO RETRIEVE AND RECREATE OBJECTS (OBJECT LEVEL DEFINITION) //* //* ADDITIONAL COLUMNS SUCH AS ICTIME CAN BE USED TO FURTHER LIMIT //* YOUR DELETION BASED ON YOUR INDIVIDUAL REQUIREMENTS //****************************************************************************** //* TABLE: ARYCOPY //* //* FOLLOWING SAMPLE DELETE STATEMENT SHOULD BE MODIFIED BASED ON YOUR SPECIFIC //* REQUIREMENTS //* //* => CHANGE //* 'DATABASE NAME' TO THE DATABASE NAME //* 'TABLESPACE NAME' TO THE TABLESPACE NAME //* 'IMAGE DATE' TO THE SPECIFIC IMAGE COPY DATE //* //* YOU COULD ALSO PERFORM A RANGE OF DATES BY CHANGING THE SQL STATEMENT //* TO USE THE BETWEEN STATEMENT //****************************************************************************** DELETE FROM SYSTOOLS.ARYCOPY WHERE DBNAME = 'DATABASE NAME' AND TSNAME = 'TABLESPACE NAME' AND ICDATE = 'IMAGE DATE'; Example: D-3 When objects are dropped in DB2 for z/OS //****************************************************************************** //* WHEN A TABLE, TABLESPACE, DATABASE IS DROPPED AND //* 1. YOU NO LONGER WISH TO RECOVER / RESTORE THE OBJECT //* 2. BEFORE YOU CREATE ANOTHER OBJECT WITH THE SAME NAME //* //* YOU SHOULD UNDERSTAND AND EVALUATE CAREFULLY HOW LONG YOU WILL NEED TO //* KEEP THIS INFORMATION SINCE IT IS A KEY FACTOR IN THE ABILITY OF THE //* RECOVERY EXPERT TOOL TO RECOVER OR RECREATE OBJECTS //* //****************************************************************************** //* TABLES: ARYCOLAUTH, ARYCOLUMNS, ARYDATABASE, ARYINDEXES, ARYINDEXPART, //* ARYKEYS, ARYSYNONYMS, ARYTABAUTH, ARYTABLEPART, ARYTABLES, //* ARYTABLESPACE, ARYVIEWDEP, ARYVIEWS //* //* WE RECOMMEND THAT YOU SHOULD DELETE FROM ALL TABLES //* //* FOLLOWING SAMPLE DELETE STATEMENT SHOULD BE MODIFIED BASED ON YOUR
255
//* SPECIFIC ENVIRONMENT AND REQUIREMENTS //* //* => CHANGE //* 'TABLE NAME' TO THE TABLE OR VIEW NAME //* 'TABLE CREATOR' TO THE CREATOR OF THE TABLE OR VIEW //* 'GRANTED BY' TO THE GRANTOR OF THE COLUMN AUTHORITY //* 'PERSON GRANTED AUTH' TO THE PERSON GRANTED COLUMN AUTHORITY //* 'DATABASE NAME' TO THE DATABASE NAME //* 'DATABASE CREATOR' TO THE CREATOR OF THE DATABASE NAME //* 'INDEX NAME' TO THE NAME OF THE INDEX //* 'INDEX SPACE NAME' TO THE SPACE NAME FOR THE INDEX //* 'INDEX CREATOR' TO THE CREATOR OF THE INDEX //* 'SYNONYM NAME' TO THE NAME OF THE SYNONYM //* 'SYNONYM CREATOR' TO THE NAME OF THE CREATOR OF THE SYNONYM //* 'TABLESPACE NAME' TO THE NAME OF THE TABLESPACE //* 'TABLE(T) OR VIEW(V) NAME' TO CORRECT TYPE NAME (TYPICALLY T //* OR V, BUT CAN BE SEVERAL OTHERS SO REVIEW CAREFULLY //* 'TABLESPACE CREATOR' TO THE NAME OF THE CREATOR OF TABLESPACE //* 'VIEW NAME' TO THE NAME OF THE VIEW //* 'VIEW CREATOR' TO THE CREATOR OF THE VIEW //* //****************************************************************************** DELETE FROM SYSTOOLS.ARYCOLAUTH WHERE TNAME = 'TABLE NAME' AND CREATOR = 'TABLE CREATOR' AND GRANTOR = 'GRANTED BY' AND GRANTEE = 'PERSON GRANTED AUTH'; DELETE FROM SYSTOOLS.ARYCOLUMNS WHERE TBNAME = 'TABLE NAME' AND TBCREATOR = 'TABLE CREATOR' ; DELETE FROM SYSTOOLS.ARYDATABASE WHERE NAME = 'DATABASE NAME' AND CREATOR = 'DATABASE CREATOR'; DELETE FROM SYSTOOLS.ARYINDEXES WHERE NAME = 'INDEX NAME' AND TBCREATOR = 'TABLE CREATOR' AND TBNAME = 'TABLE NAME' AND DBNAME = 'DATABASE NAME' AND INDEXSPACE = 'INDEX SPACE NAME' ; DELETE FROM SYSTOOLS.ARYINDEXPART WHERE IXNAME = 'INDEX SPACE NAME' AND IXCREATOR = 'INDEX CREATOR'; DELETE FROM SYSTOOLS.ARYKEYS WHERE IXNAME = 'INDEX NAME' AND IXCREATOR = 'INDEX CREATOR'; DELETE FROM SYSTOOLS.ARYSYNONYMS WHERE NAME = 'SYNONYM NAME' AND CREATOR = 'SYNONYM CREATOR' AND TBNAME = 'TABLE NAME' AND TBCREATOR = 'TABLE CREATOR'; DELETE FROM SYSTOOLS.ARYTABAUTH WHERE TTNAME = 'TABLE NAME' AND TCREATOR = 'TABLE CREATOR' AND GRANTOR = 'GRANTED BY' AND GRANTEE = 'PERSON GRANTED AUTH'; -- NOTE GRANTEE CAN BE PUBLIC OR PUBLIC* AS WELL AS A SPECIFIC NAME DELETE FROM SYSTOOLS.ARYTABLEPART WHERE DBNAME = 'DATABASE NAME' AND TSNAME = 'TABLESPACE NAME' AND IXNAME = 'INDEX NAME' AND IXCREATOR = 'INDEX CREATOR' ; -- NOTE IXNAME AND IXCREATOR MAY BE NULL IF THERE IS NO PARTITIONING DELETE FROM SYSTOOLS.ARYTABLES WHERE NAME = 'TABLE NAME' AND CREATOR = 'TABLE CREATOR' AND DBNAME = 'DATABASE NAME'
256
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
AND TSNAME = 'TABLESPACE NAME' AND TYPE = 'TABLE(T) OR VIEW(V) NAME' ; DELETE FROM SYSTOOLS.ARYTABLESPACE WHERE NAME = 'TABLESPACE NAME' AND DBNAME = 'DATABASE NAME' AND CREATOR = 'TABLESPACE CREATOR' ; DELETE FROM SYSTOOLS.ARYVIEWDEP WHERE BNAME = 'TABLE NAME' AND BCREATOR = 'TABLE CREATOR' AND DNAME = 'VIEW NAME' AND DCREATOR = 'VIEW CREATOR' ; DELETE FROM SYSTOOLS.ARYVIEWS WHERE NAME = 'VIEW NAME' AND CREATOR = 'VIEW CREATOR' ; Example: D-4 When quiet time details are removed //******************************************************************************* //* TABLES: ARYQT, ARYQTG //* //* THE ARYQT AND ARYQTG TABLES ARE 'LINKED' BY GROUPID. //* YOU SHOULD THEREFORE DELETE FROM BOTH TABLES //* //* FOLLOWING SAMPLE DELETE STATEMENT SHOULD BE MODIFIED BASED ON YOUR //* SPECIFIC QUIET TIME REQUESTS WHILE USING RECOVERY EXPERT //* //* => CHANGE THE 'N' FOR GROUPID TO AN APPROPRIATE GROUPID NUMBER //* //****************************************************************************** DELETE FROM SYSTOOLS.ARYQT WHERE GROUPID = N ; DELETE FROM SYSTOOLS.ARYQTG WHERE GROUPID = N ;
Example: D-5 When stogroup or volume changes occur in DB2 for z/OS //******************************************************************************* //* TABLES: ARYSTOGROUP, ARYVOLUMES //* //* FOLLOWING SAMPLE DELETE STATEMENT SHOULD BE MODIFIED BASED ON YOUR //* SPECIFIC ENVIRONMENT AND REQUIREMENTS //* //* => CHANGE //* 'STOGROUP NAME' TO THE NAME OF THE STOGROUP //* 'CREATOR OF STOGROUP' TO THE NAME OF THE CREATOR OF STOGROUP //* 'VCAT NAME' TO THE NAME OF THE HIGH LEVEL QUALIFIER / VCAT //* 'VOLUME ID' TO THE NAME OF THE VOLUME OR * FOR SMS MANAGED //* //****************************************************************************** DELETE FROM SYSTOOLS.ARYSTOGROUP WHERE NAME = 'STOGROUP NAME' AND CREATOR = 'CREATOR OF STOGROUP' AND VCATNAME = 'VCAT NAME'; DELETE FROM SYSTOOLS.ARYVOLUMES WHERE SGNAME = 'STOGROUP NAME' AND SGCREATOR = 'CREATOR OF STOGROUP' AND VOLID = 'VOLUME ID';
257
Example: D-6 Deleting rows in SLR table SRYVRLOG //****************************************************************************** //* SYSTOOLS TABLE:ARYVRLOG //* //* //* FOLLOWING SAMPLE DELETE STATEMENT SHOULD BE MODIFIED BASED ON YOUR //* SPECIFIC ENVIRONMENT //* //* => CHANGE //* 'TIMESTAMP ASSOCIATED WITH ROW TO DELETE' TO TIMESTAMP DESIRED //* 'JOB NAME OF SLR JOB RUN' TO JOB NAME ASSOCIATED WITH TIMESTAMP //* //****************************************************************************** DELETE FROM SYSTOOLS.ARYVRLOG WHERE RUNDTS = 'TIMESTAMP ASSOCIATED WITH ROW TO DELETE' AND JOBNAME = 'JOB NAME OF SLR JOB RUN' ; //* //* //* //* DELETE FROM SYSTOOLS.ARYVRLOG WHERE RUNDTS = '2006-09-05-11.06.48.032638' AND JOBNAME = 'W8SLR2' ;
Example: D-7 Deleting rows in ARYAUXRELS SLR table //****************************************************************************** //* TABLE: ARYAUXRELS //* //* FOLLOWING SAMPLE DELETE STATEMENT SHOULD BE MODIFIED BASED ON YOUR //* SPECIFIC ENVIRONMENT //* //* => CHANGE //* 'TBOWNER' TO THE AUXILLARY TABLE OWNER NAME //* 'TABLENAME' TO THE AUXILLARY TABLE NAME //* 'DBNAME' TO THE DATABASE NAME WHICH CONTAINS THE AUX TABLE //* 'TSNAME' TO THE TABLESPACE NAME WHICH CONTAINS THE AUX TABLE //* //***************************************************************************** DELETE FROM SYSTOOLS.ARYAUXRELS WHERE AUXTBOWNER = 'TBOWNER' AND AUXTBNAME = 'TABLENAME' AND AUXDBNAME = 'DBNAME' AND AUXTSNAME = 'TSNAME' ; Example: D-8 Deleting rows in ARYDATATYPES, ARYPARMS, ARYROUTINES, ARYVIEWSR SLR tables //****************************************************************************** //* TABLES: ARYDATATYPES, ARYPARMS, ARYROUTINES, ARYVIEWSR //* //* FOLLOWING SAMPLE DELETE STATEMENT SHOULD BE MODIFIED BASED ON YOUR //* SPECIFIC ENVIRONMENT //* //* => CHANGE //* 'DATA TYPE OWNER' TO THE OWNER OF THE FUNCTION / DATA TYPE //* 'FUNCTION OR DATA TYPE NAME' TO THE NAME OF FUNCTION / DATA TYPE //* 'CREATOR OF THE FUNCTION OR DATA TYPE' TO CREATOR NAME //****************************************************************************** DELETE FROM SYSTOOLS.ARYDATATYPES WHERE OWNER = 'DATA TYPE OWNER' AND NAME = 'FUNCTION OR DATA TYPE NAME'
258
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
AND
DELETE FROM SYSTOOLS.ARYPARMS WHERE OWNER = 'DATA TYPE OWNER' AND NAME = 'FUNCTION OR DATA TYPE NAME' ; DELETE FROM SYSTOOLS.ARYROUTINES WHERE OWNER = 'DATA TYPE OWNER' AND NAME = 'FUNCTION OR DATA TYPE NAME' AND CREATEDBY = 'CREATOR OF THE FUNCTION OR DATA TYPE'; DELETE FROM SYSTOOLS.ARYVIEWSR WHERE CREATOR = 'CREATOR OF THE FUNCTION OR DATA TYPE' AND NAME = 'FUNCTION OR DATA TYPE NAME' ; Example: D-9 Deleting row in ARYFIELDS SLR table //****************************************************************************** //* TABLES: ARYFIELDS //* //* FOLLOWING SAMPLE DELETE STATEMENT SHOULD BE MODIFIED BASED ON YOUR //* SPECIFIC ENVIRONMENT //* //* => CHANGE //* 'TABLE CREATOR' TO THE NAME OF THE TABLE CREATOR //* 'TABLE NAME' TO THE NAME OF THE TABLE //* 'FIELD PROC' TO THE NAME OF THE FIELD PROC //* //***************************************************************************** DELETE FROM SYSTOOLS.ARYFIELDS WHERE TBCREATOR = 'TABLE CREATOR' AND TBNAME = 'TABLE NAME' AND FLDPROC = 'FIELD PROC' ; Example: D-10 Deleting DBRM, PLAN, and PACKAGES information in SLR tables //****************************************************************************** //* TABLES: (ALL DBRM, PLAN AND PACKAGES) //* ARYDBRM, ARYPACKAGE, ARYPACKAUTH, ARYPACKDEP, ARYPACKLIST, ARYPKSYSTEM, //* ARYPLAN, ARYPLANAUTH, ARYPLANDEP, ARYPLSYSTEM //* //* THESE TABLES CONTAIN INFORMATION ABOUT DBRM'S, PLANS AND //* PACKAGES; WHEN YOU DELETE FROM ONE OF THE TABLES IT IS //* YOU SHOULD DELETE FROM ALL THESE SYSTOOLS TABLES //* //* FOLLOWING SAMPLE DELETE STATEMENT SHOULD BE MODIFIED BASED ON YOUR //* SPECIFIC ENVIRONMENT //* //* => CHANGE //* 'DBRM NAME' TO DBRM NAME //* 'PDS WHERE DBRM RESIDES' TO NAME OF PDS WHERE DBRM RESIDES //* 'PLAN NAME' TO THE NAME OF THE PLAN //* 'PLAN CREATOR' TO THE NAME OF CREATOR OF THE PLAN //* 'PACKAGE NAME' TO THE NAME OF PACKAGE //* 'PACKAGE CREATOR' TO THE NAME OF CREATOR OF THE PACKAGE //* 'PACKAGE QUALIFIER' TO THE NAME OF THE ASSIGNED PKG QUALIFIER //* 'VERSION NAME ASSIGNED' TO THE NAME OF THE VERSION //* 'GRANTED BY' IS THE GRANTOR OF THE AUTHORITY //* 'PERSON GRANTED AUTH' TO THE PERSON GRANTED AUTHORITY
259
//* 'TABLE OR VIEW NAME' TO THE NAME OF THE TABLE OR VIEW //* 'COLLECTION NAME' TO THE NAME OF THE COLLECTION //* 'PLAN QUALIFIER' TO THE NAME OF THE ASSIGNED PLAN QUALIFIER //* //****************************************************************************** DELETE FROM SYSTOOLS.ARYDBRM WHERE NAME = 'DBRM NAME' AND PDSNAME = 'PDS WHERE DBRM RESIDES' AND PLNAME = 'PLAN NAME' AND PLCREATOR = 'PLAN CREATOR' ; DELETE FROM SYSTOOLS.ARYPACKAGE WHERE NAME = 'PACKAGE NAME' AND OWNER = 'PACKAGE CREATOR' AND QUALIFIER = 'PACKAGE QUALIFIER' AND VERSION = 'VERSION NAME ASSIGNED' AND PDSNAME = 'PDS WHERE DBRM RESIDES' ; DELETE FROM SYSTOOLS.ARYPACKAUTH WHERE NAME = 'PACKAGE NAME' AND GRANTOR = 'GRANTED BY' AND GRANTEE = 'PERSON GRANTED AUTH' AND COLLIDX = 'COLLECTION NAME'; DELETE FROM SYSTOOLS.ARYPACKDEP WHERE BNAME = 'TABLE OR VIEW NAME' AND BQUALIFIER = 'PACKAGE QUALIFIER' AND DCOLLID = 'COLLECTION NAME'; AND DOWNER = 'PACKAGE CREATOR' ; DELETE FROM SYSTOOLS.ARYPACKLIST WHERE PLANNAME = 'PLAN NAME' AND COLLIDX = 'COLLECTION NAME'; DELETE FROM SYSTOOLS.ARYPKSYSTEM WHERE NAME = 'PACKAGE NAME' AND COLLIDX = 'COLLECTION NAME'; DELETE FROM SYSTOOLS.ARYPLAN WHERE NAME = 'PLAN NAME' AND CREATOR = 'PLAN CREATOR' AND QUALIFIER = 'PLAN QUALIFIER' ; DELETE FROM SYSTOOLS.ARYPLANAUTH WHERE NAME = 'PLAN NAME' AND GRANTOR = 'GRANTED BY' AND GRANTEE = 'PERSON GRANTED AUTH'; DELETE FROM SYSTOOLS.ARYPLANDEP WHERE BNAME = 'PLAN NAME' AND BCREATOR = 'PLAN CREATOR' ; DELETE FROM SYSTOOLS.ARYPLSYSTEM WHERE NAME = 'PLAN NAME' ; Example: D-11 Deleting referential constraint information in SLR tables //****************************************************************************** //* TABLES: (CHECK CONSTRAINTS AND REFERENTIAL RELATIONSHIPS) //* ARYCHECKS, ARYCHECKS2, ARYFOREIGNKEYS, ARYRELS //* THESE TABLES CONTAIN INFORMATION ABOUT CHECK CONSTRAINTS //* AND REFERENTIAL INTEGRITY RELATIONSHIPS. //* WHEN A CONSTRAINT OR REFERENTIAL RELATIONSHIP IS REMOVED //* YOU SHOULD DELETE FROM ALL THESE SYSTOOLS TABLES //* //* FOLLOWING SAMPLE DELETE STATEMENT SHOULD BE MODIFIED BASED ON YOUR //* SPECIFIC ENVIRONMENT //* //* => CHANGE
260
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
//* 'TABLE NAME' TO TABLE NAME WITH CONSTRAINT //* 'OWNER NAME' TO TABLE OWNER NAME WITH THE CONSTRAINT //* 'CONSTRAINT NAME' TO THE NAME OF THE CONSTRAINT //* 'RI CREATOR' TO THE NAME OF THE CREATOR OF THE RI //* 'RELATIONSHIP NAME' TO NAME OF FOREIGN KEY //* //****************************************************************************** DELETE FROM SYSTOOLS.ARYCHECKS WHERE TBNAME = 'TABLE NAME' AND TBOWNER = 'OWNER NAME' AND CHECKNAME = 'CONSTRAINT NAME' ; DELETE FROM SYSTOOLS.ARYCHECKS2 WHERE TBNAME = 'TABLE NAME' AND TBOWNER = 'OWNER NAME' AND CHECKNAME = 'CONSTRAINT NAME' ; DELETE FROM SYSTOOLS.ARYFOREIGNKEYS WHERE CREATOR = 'RI CREATOR' AND TBNAME = 'TABLE NAME' AND RELNAME = 'RELATIONSHIP NAME'; DELETE FROM SYSTOOLS.ARYRELS WHERE CREATOR = 'RI CREATOR' AND TBNAME = 'TABLE NAME' AND RELNAME = 'RELATIONSHIP NAME'; Example: D-12 Deleting specifications in SLR tables //****************************************************************************** //* TABLES: ARYSPEC_DATA, ARYSPEC_DIR //* //* THE ARYSPEC_DATA AND ARYSPEC_DIR TABLES CONTAIN INFORMATION //* ABOUT SAVED SPECIFICATIONS. //* YOU SHOULD DELETE FROM BOTH TABLES //* //* FOLLOWING SAMPLE DELETE STATEMENT SHOULD BE MODIFIED BASED ON YOUR //* SPECIFIC ENVIRONMENT //* => CHANGE //* 'SPECOWNER' TO THE SPECIFICATION OWNER NAME //* 'SPECNAME' TO THE SAVED SPECIFICATION NAME //* //****************************************************************************** DELETE FROM SYSTOOLS.ARYSPEC_DATA WHERE OWNER = 'SPECOWNER' AND NAME = 'SPECNAME' ; DELETE FROM SYSTOOLS.ARYSPEC_DIR WHERE OWNER = 'SPECOWNER' AND NAME = 'SPECNAME' ;
261
262
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
Appendix E.
Sample jobs
In this appendix we list the detailed content of sample jobs used to define the configuration of our scenarios for some of the jobs in Chapter 3, Our test environment on page 39. This appendix contains the following sample environment setup jobs: Control statement listings for Recovery Expert Agents 63 and 67 Configuration files for Recovery Expert Agent 59 Control file job listing for Recovery Expert Agent 63 and 64 Sample job to create the repository VSAM data sets Sample job to create DR objects Sample CLISTs Sample PARMLIB member
263
264
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
* * * * * *
The DSN PREFIX maximum length is 17 characters. If NULL is specified then user id is used as data set prefix. Use &USERID in the prefix to insert user id. Example: TEST.&USERID will generate a data set prefix of 'TEST.MYID' where the user id is 'MYID'.
UPDATE ARY DSN PREFIX = SG7606.&USERID * *------------------------------------------------------------------* Sample statements to turn on/off recovery options *------------------------------------------------------------------* UPDATE ARY RCVR AUTHS = Y RECOVER DB2 OBJECT AUTHORIZATIONS * *------------------------------------------------------------------* Sample statements to add/update schema level repository data * capture options. *------------------------------------------------------------------* UPDATE SLR LOAD AUTHS = Y N = DB2 authorizations are * not saved in schema level * repository. * *------------------------------------------------------------------* Sample statements to add/update interproduct communication * options. *------------------------------------------------------------------* UPDATE IPC IPC_GROUPER = N Y = Enable Grouper-related * table recovery. * *------------------------------------------------------------------* Sample statements to add/update table activity quiet time * repository names. *------------------------------------------------------------------* * EACH QT OWNER/NAME IS A 45 CHAR MAXIMUM LENGTH. THESE OBJECTS WILL * BE CREATED AUTOMATICALLY WHEN THE QUIET TIME REPORT/CAPTURE JCL * IS RUN IF THEY DO NOT ALREADY EXIST. DDL TO CREATE THESE OBJECTS * IS PROVIDED IN ARYDDL7 AND ARYDDL8 SAMPLE DDL MEMBERS. * * XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX UPDATE QT GRP TBOWNER = SYSTOOLS UPDATE QT GRP TBNAME = ARYQTG UPDATE QT GRP IXOWNER = SYSTOOLS UPDATE QT GRP IXNAME = ARYQTGX UPDATE QT ENTRY OWNER = SYSTOOLS UPDATE QT ENTRY NAME = ARYQT * XXXXXXXX (MAX LENGTH FOR DB AND TS IS 8) UPDATE QT DATABASE = SYSTOOLS UPDATE QT TABLESPACE = ARYTSQT * *------------------------------------------------------------------* Sample statements to add/update log analysis services ROWDATA * VSAM data set attributes. *------------------------------------------------------------------* * The ROWDATA VSAM data set is dynamically created by the log * analysis services when creating SQL from the log. *
265
* * * * * *
The DSN PREFIX maximum length is 21 characters. The following set of product controls are required and must be properly set to ensure proper log data recoveries. The VOLSERS statement value can be set to blanks, if required. A maximum of 3 volsers can be specified. UPDATE UPDATE UPDATE UPDATE UPDATE UPDATE UPDATE UPDATE LAS LAS LAS LAS LAS LAS LAS LAS DSN PREFIX VOLSERS DATA AUNIT DATA PQTY DATA SQTY INDEX AUNIT INDEX PQTY INDEX SQTY = = = = = = = = SG7606 SBOX49,SBOX3Q,SBOX3R C 00005 00005 C 00005 00005
* *------------------------------------------------------------------* Sample statements to add/update character conversion information *------------------------------------------------------------------* * Schema Level Repository Unicode data conversion information. * These values should not be changed. The IBM DB2 Recovery Expert * z/OS components require the following CCSID conversions to be * defined on the target systems. * UPDATE CCS SLR TECHNQ = ER CHARACTER CONVERSION TECHNIQUE UPDATE CCS SLR SBCS = 00037 EBCDIC UPDATE CCS SLR DBCS = 01200 UNICODE UT-16 UPDATE CCS SLR MIXED = 01208 UNICODE UT-8 * * Product output Unicode data conversion information. * UPDATE CCS ARY TECHNQ = ER CHARACTER CONVERSION TECHNIQUE UPDATE CCS ARY SBCS = 00037 EBCDIC UPDATE CCS ARY DBCS = 01200 UNICODE UT-16 UPDATE CCS ARY MIXED = 01208 UNICODE UT-8 * *------------------------------------------------------------------* Sample statements to add/update default data set information *------------------------------------------------------------------* * File tailoring work data set allocation. * UPDATE FTW DEVICE = SYSALLDA DEVICE TYPE UPDATE FTW ALCUNIT = C C=CYLS, T=TRACKS UPDATE FTW PQTY = 00001 PRIMARY QTY UPDATE FTW SQTY = 00001 SECONDARY QTY *UPDATE FTW SMSDC = xxxxxxxx SMS DATA CLASS *UPDATE FTW SMSSC = xxxxxxxx SMS STORAGE CLASS *UPDATE FTW SMSMC = xxxxxxxx SMS MANAGEMENT CLASS * * Image copy output data set allocation defaults. * UPDATE ICF DEVICE = SYSALLDA DEVICE TYPE UPDATE ICF ALCUNIT = C C=CYLS, T=TRACKS UPDATE ICF PQTY = 00001 PRIMARY QTY UPDATE ICF SQTY = 00001 SECONDARY QTY *UPDATE ICF SMSDC = xxxxxxxx SMS DATA CLASS *UPDATE ICF SMSSC = xxxxxxxx SMS STORAGE CLASS *UPDATE ICF SMSMC = xxxxxxxx SMS MANAGEMENT CLASS *UPDATE ICF MULTIVOL = xxx
266
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
*UPDATE ICF EXPIREDT = xxxxxxx EXPIRATION DATE *UPDATE ICF RETPERIOD = xxxxxxx RETENTION PERIOD *UPDATE ICF FILENUM = xxxx LABEL FILE NUMBER * * Recovery output data set allocation defaults. * UPDATE RDA DEVICE = SYSALLDA DEVICE TYPE UPDATE RDA ALCUNIT = C C=CYLS, T=TRACKS UPDATE RDA PQTY = 00001 PRIMARY QTY UPDATE RDA SQTY = 00001 SECONDARY QTY *UPDATE RDA SMSDC = xxxxxxxx SMS DATA CLASS *UPDATE RDA SMSSC = xxxxxxxx SMS STORAGE CLASS *UPDATE RDA SMSMC = xxxxxxxx SMS MANAGEMENT CLASS *UPDATE RDA MULTIVOL = xxx *UPDATE RDA EXPIREDT = xxxxxxx EXPIRATION DATE *UPDATE RDA RETPERIOD = xxxxxxx RETENTION PERIOD *UPDATE RDA FILENUM = xxxx LABEL FILE NUMBER * * System Backup Recovery Services * * IPC_RBR = Y - Generate recovery plans from system level backups * IPC_RBR = N - No recovery plans based on system backups created * UPDATE IPC IPC_RBR = Y Y=generate system level backup * * System Backup Recovery Services Options * *UPDATE RBR DEVICE = XXXXXXXX *UPDATE RBR EMC LOAD1 = XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX *UPDATE RBR EMC LOAD2 = XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX *UPDATE RBR EMC LOAD3 = XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX *UPDATE RBR EMC LOAD4 = XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX *UPDATE RBR FDR LOAD1 = XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX *UPDATE RBR FDR LOAD2 = XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX UPDATE RBR PROF REPO = ARY.PROFILES UPDATE RBR MAPS REPO = ARY.PROFILE.MAPS UPDATE RBR CATS REPO = ARY.PROFILE.CATS UPDATE RBR SYSBK REPO = ARY.SYSBACK UPDATE RBR BKUP VOLS = ARY.SYSBACK.VOLS UPDATE RBR BKUP SSID = ARY.SYSBACK.SSIDS UPDATE RBR BKUP OBJS = ARY.SYSBACK.OBJS UPDATE RBR REPORT REPO = ARY.BREPORT UPDATE RBR OFFLD REPO = ARY.BREPORT UPDATE RBR PARMLIB = SG7606.ARY.V2R1M0.SARYSAMP UPDATE RBR PARMLIB MBR = ARY#PARM
The complete listing of control statements for DB2 subsystem member D8F2 from our PDS SG7606.ARY.V2R1M0.SARYSAMP(D8F2) is shown in Example E-2.
Example: E-2 Control statement listing for DB2 subsystem D8F2
*
*------------------------------------------------------------------* Sample statements to add/update DB2 subsystem information. * Multiple sets of following DB2 information control statements * can be created and run in a single setup run. *------------------------------------------------------------------* SET DB2 SSID = D8F2 UPDATE DB2 ZPARMS = DSNZPAF2
267
UPDATE DB2 BOOTSTRAP1 = DB8FU.D8F2.BSDS01 UPDATE DB2 BOOTSTRAP2 = DB8FU.D8F2.BSDS02 UPDATE DB2 LOADLIB1 = DB8F8.SDSNEXIT UPDATE DB2 LOADLIB2 = DB8F8.SDSNLOAD *UPDATE DB2 LOADLIB3 = *UPDATE DB2 LOADLIB4 = *UPDATE DB2 LOADLIB5 = * *------------------------------------------------------------------* Sample statements to add/update ARY product plans *------------------------------------------------------------------* SET DB2 SSID = D8F2 SET PRODUCT CFG = NULL SET PRODUCT VER = NULL * UPDATE ARY PLAN1 = ARYPLAN1 DISPLAY DATA EXTRACT UPDATE ARY PLAN2 = ARYPLAN2 SCHEMA LEVEL REPOSITORY LOAD UPDATE ARY PLAN3 = ARYPLAN3 RECOVERY PLAN GENERATION UPDATE ARY PLAN4 = ARYPLAN4 JCL GENERATION AND SQL EXEC UPDATE ARY PLAN5 = ARYPLAN5 LOG ANALYSIS SERVICES * *------------------------------------------------------------------* Sample statements to add/update product message library *------------------------------------------------------------------* UPDATE ARY MSGLIBRARY = ARY.V2R1M0.SARYMENU * *------------------------------------------------------------------* Sample statements to add/update log services options *------------------------------------------------------------------* UPDATE ARY ARCHLOG1 = Y USE ARCHIVE LOG 1 UPDATE ARY ARCHLOG2 = N USE ARCHIVE LOG 2 UPDATE ARY ACTLOGPRI = Y ACTIVE LOG PRIORITY * *------------------------------------------------------------------* Sample statements to add/update data set prefix generation *------------------------------------------------------------------* * The DSN PREFIX maximum length is 17 characters. If NULL * is specified then user id is used as data set prefix. Use &USERID * in the prefix to insert user id. Example: TEST.&USERID will * generate a data set prefix of 'TEST.MYID' where the user id is * 'MYID'. * UPDATE ARY DSN PREFIX = SG7606.&USERID * *------------------------------------------------------------------* Sample statements to turn on/off recovery options *------------------------------------------------------------------* UPDATE ARY RCVR AUTHS = Y RECOVER DB2 OBJECT AUTHORIZATIONS * *------------------------------------------------------------------* Sample statements to add/update schema level repository data * capture options. *------------------------------------------------------------------* UPDATE SLR LOAD AUTHS = Y N = DB2 authorizations are
268
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
* not saved in schema level * repository. * *------------------------------------------------------------------* Sample statements to add/update interproduct communication * options. *------------------------------------------------------------------* UPDATE IPC IPC_GROUPER = N Y = Enable Grouper-related * table recovery. * *------------------------------------------------------------------* Sample statements to add/update table activity quiet time * repository names. *------------------------------------------------------------------* * EACH QT OWNER/NAME IS A 45 CHAR MAXIMUM LENGTH. THESE OBJECTS WILL * BE CREATED AUTOMATICALLY WHEN THE QUIET TIME REPORT/CAPTURE JCL * IS RUN IF THEY DO NOT ALREADY EXIST. DDL TO CREATE THESE OBJECTS * IS PROVIDED IN ARYDDL7 AND ARYDDL8 SAMPLE DDL MEMBERS. * * XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX UPDATE QT GRP TBOWNER = SYSTOOLS UPDATE QT GRP TBNAME = ARYQTG UPDATE QT GRP IXOWNER = SYSTOOLS UPDATE QT GRP IXNAME = ARYQTGX UPDATE QT ENTRY OWNER = SYSTOOLS UPDATE QT ENTRY NAME = ARYQT * XXXXXXXX (MAX LENGTH FOR DB AND TS IS 8) UPDATE QT DATABASE = SYSTOOLS UPDATE QT TABLESPACE = ARYTSQT * *------------------------------------------------------------------* Sample statements to add/update log analysis services ROWDATA * VSAM data set attributes. *------------------------------------------------------------------* * The ROWDATA VSAM data set is dynamically created by the log * analysis services when creating SQL from the log. * * The DSN PREFIX maximum length is 21 characters. The following * set of product controls are required and must be properly set * to ensure proper log data recoveries. The VOLSERS statement * value can be set to blanks, if required. A maximum of 3 volsers * can be specified. * UPDATE LAS DSN PREFIX = SG7606 UPDATE LAS VOLSERS = SBOX49,SBOX3Q,SBOX3R UPDATE LAS DATA AUNIT = C UPDATE LAS DATA PQTY = 00005 UPDATE LAS DATA SQTY = 00005 UPDATE LAS INDEX AUNIT = C UPDATE LAS INDEX PQTY = 00005 UPDATE LAS INDEX SQTY = 00005 * *------------------------------------------------------------------* Sample statements to add/update character conversion information *------------------------------------------------------------------* * Schema Level Repository Unicode data conversion information.
269
* * * *
These values should not be changed. The IBM DB2 Recovery Expert z/OS components require the following CCSID conversions to be defined on the target systems. UPDATE UPDATE UPDATE UPDATE CCS CCS CCS CCS SLR SLR SLR SLR TECHNQ SBCS DBCS MIXED = = = = ER 00037 01200 01208 CHARACTER CONVERSION TECHNIQUE EBCDIC UNICODE UT-16 UNICODE UT-8
* * *
Product output Unicode data conversion information. UPDATE UPDATE UPDATE UPDATE CCS CCS CCS CCS ARY ARY ARY ARY TECHNQ SBCS DBCS MIXED = = = = ER 00037 01200 01208 CHARACTER CONVERSION TECHNIQUE EBCDIC UNICODE UT-16 UNICODE UT-8
* *------------------------------------------------------------------* Sample statements to add/update default data set information *------------------------------------------------------------------* * File tailoring work data set allocation. * UPDATE FTW DEVICE = SYSALLDA DEVICE TYPE UPDATE FTW ALCUNIT = C C=CYLS, T=TRACKS UPDATE FTW PQTY = 00001 PRIMARY QTY UPDATE FTW SQTY = 00001 SECONDARY QTY *UPDATE FTW SMSDC = xxxxxxxx SMS DATA CLASS *UPDATE FTW SMSSC = xxxxxxxx SMS STORAGE CLASS *UPDATE FTW SMSMC = xxxxxxxx SMS MANAGEMENT CLASS * * Image copy output data set allocation defaults. * UPDATE ICF DEVICE = SYSALLDA DEVICE TYPE UPDATE ICF ALCUNIT = C C=CYLS, T=TRACKS UPDATE ICF PQTY = 00001 PRIMARY QTY UPDATE ICF SQTY = 00001 SECONDARY QTY *UPDATE ICF SMSDC = xxxxxxxx SMS DATA CLASS *UPDATE ICF SMSSC = xxxxxxxx SMS STORAGE CLASS *UPDATE ICF SMSMC = xxxxxxxx SMS MANAGEMENT CLASS *UPDATE ICF MULTIVOL = xxx *UPDATE ICF EXPIREDT = xxxxxxx EXPIRATION DATE *UPDATE ICF RETPERIOD = xxxxxxx RETENTION PERIOD *UPDATE ICF FILENUM = xxxx LABEL FILE NUMBER * * Recovery output data set allocation defaults. * UPDATE RDA DEVICE = SYSALLDA DEVICE TYPE UPDATE RDA ALCUNIT = C C=CYLS, T=TRACKS UPDATE RDA PQTY = 00001 PRIMARY QTY UPDATE RDA SQTY = 00001 SECONDARY QTY *UPDATE RDA SMSDC = xxxxxxxx SMS DATA CLASS *UPDATE RDA SMSSC = xxxxxxxx SMS STORAGE CLASS *UPDATE RDA SMSMC = xxxxxxxx SMS MANAGEMENT CLASS *UPDATE RDA MULTIVOL = xxx *UPDATE RDA EXPIREDT = xxxxxxx EXPIRATION DATE *UPDATE RDA RETPERIOD = xxxxxxx RETENTION PERIOD *UPDATE RDA FILENUM = xxxx LABEL FILE NUMBER * * System Backup Recovery Services *
270
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
* * *
IPC_RBR = Y IPC_RBR = N
Generate recovery plans from system level backups No recovery plans based on system backups created Y Y=generate system level backup
UPDATE IPC IPC_RBR = * * System Backup Recovery * *UPDATE RBR DEVICE = *UPDATE RBR EMC LOAD1 = *UPDATE RBR EMC LOAD2 = *UPDATE RBR EMC LOAD3 = *UPDATE RBR EMC LOAD4 = *UPDATE RBR FDR LOAD1 = *UPDATE RBR FDR LOAD2 = UPDATE RBR PROF REPO = UPDATE RBR MAPS REPO = UPDATE RBR CATS REPO = UPDATE RBR SYSBK REPO = UPDATE RBR BKUP VOLS = UPDATE RBR BKUP SSID = UPDATE RBR BKUP OBJS = UPDATE RBR REPORT REPO = UPDATE RBR OFFLD REPO = UPDATE RBR PARMLIB = UPDATE RBR PARMLIB MBR =
Services Options XXXXXXXX XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX ARY.PROFILES ARY.PROFILE.MAPS ARY.PROFILE.CATS ARY.SYSBACK ARY.SYSBACK.VOLS ARY.SYSBACK.SSIDS ARY.SYSBACK.OBJS ARY.BREPORT ARY.BREPORT SG7606.ARY.V2R1M0.SARYSAMP ARY#PARM
The complete listing of control statements for DB2 subsystem member D8G1 from our PDS SG7606.ARY.V2R1M0.SARYSAMP(D8G1) is shown in Example E-3.
Example: E-3 Control statement listing for DB2 subsystem D8G1 * *------------------------------------------------------------------* Sample statements to add/update DB2 subsystem information. * Multiple sets of following DB2 information control statements * can be created and run in a single setup run. *------------------------------------------------------------------* SET DB2 SSID = D8G1 UPDATE DB2 ZPARMS = DSNZPAG1 UPDATE DB2 BOOTSTRAP1 = DB8GU.D8G1.BSDS01 UPDATE DB2 BOOTSTRAP2 = DB8GU.D8G1.BSDS02 UPDATE DB2 LOADLIB1 = DB8G8.SDSNEXIT UPDATE DB2 LOADLIB2 = DB8G8.SDSNLOAD *UPDATE DB2 LOADLIB3 = *UPDATE DB2 LOADLIB4 = *UPDATE DB2 LOADLIB5 = * *------------------------------------------------------------------* Sample statements to add/update ARY product plans *------------------------------------------------------------------* SET DB2 SSID = D8G1 SET PRODUCT CFG = NULL SET PRODUCT VER = NULL * UPDATE ARY PLAN1 = ARYPLAN1 DISPLAY DATA EXTRACT UPDATE ARY PLAN2 = ARYPLAN2 SCHEMA LEVEL REPOSITORY LOAD UPDATE ARY PLAN3 = ARYPLAN3 RECOVERY PLAN GENERATION UPDATE ARY PLAN4 = ARYPLAN4 JCL GENERATION AND SQL EXEC
271
UPDATE ARY PLAN5 = ARYPLAN5 LOG ANALYSIS SERVICES * *------------------------------------------------------------------* Sample statements to add/update product message library *------------------------------------------------------------------* UPDATE ARY MSGLIBRARY = ARY.V2R1M0.SARYMENU * *------------------------------------------------------------------* Sample statements to add/update log services options *------------------------------------------------------------------* UPDATE ARY ARCHLOG1 = Y USE ARCHIVE LOG 1 UPDATE ARY ARCHLOG2 = N USE ARCHIVE LOG 2 UPDATE ARY ACTLOGPRI = Y ACTIVE LOG PRIORITY * *------------------------------------------------------------------* Sample statements to add/update data set prefix generation *------------------------------------------------------------------* * The DSN PREFIX maximum length is 17 characters. If NULL * is specified then user id is used as data set prefix. Use &USERID * in the prefix to insert user id. Example: TEST.&USERID will * generate a data set prefix of 'TEST.MYID' where the user id is * 'MYID'. * UPDATE ARY DSN PREFIX = SG7606.&USERID * *------------------------------------------------------------------* Sample statements to turn on/off recovery options *------------------------------------------------------------------* UPDATE ARY RCVR AUTHS = Y RECOVER DB2 OBJECT AUTHORIZATIONS * *------------------------------------------------------------------* Sample statements to add/update schema level repository data * capture options. *------------------------------------------------------------------* UPDATE SLR LOAD AUTHS = Y N = DB2 authorizations are * not saved in schema level * repository. * *------------------------------------------------------------------* Sample statements to add/update interproduct communication * options. *------------------------------------------------------------------* UPDATE IPC IPC_GROUPER = N Y = Enable Grouper-related * table recovery. * *------------------------------------------------------------------* Sample statements to add/update table activity quiet time * repository names. *------------------------------------------------------------------* * EACH QT OWNER/NAME IS A 45 CHAR MAXIMUM LENGTH. THESE OBJECTS WILL * BE CREATED AUTOMATICALLY WHEN THE QUIET TIME REPORT/CAPTURE JCL * IS RUN IF THEY DO NOT ALREADY EXIST. DDL TO CREATE THESE OBJECTS * IS PROVIDED IN ARYDDL7 AND ARYDDL8 SAMPLE DDL MEMBERS.
272
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
* * UPDATE UPDATE UPDATE UPDATE UPDATE UPDATE * UPDATE QT DATABASE UPDATE QT TABLESPACE QT QT QT QT QT QT GRP TBOWNER GRP TBNAME GRP IXOWNER GRP IXNAME ENTRY OWNER ENTRY NAME
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX SYSTOOLS ARYQTG SYSTOOLS ARYQTGX SYSTOOLS ARYQT XXXXXXXX (MAX LENGTH FOR DB AND TS IS 8) = SYSTOOLS = ARYTSQT = = = = = =
* *------------------------------------------------------------------* Sample statements to add/update log analysis services ROWDATA * VSAM data set attributes. *------------------------------------------------------------------* * The ROWDATA VSAM data set is dynamically created by the log * analysis services when creating SQL from the log. * * The DSN PREFIX maximum length is 21 characters. The following * set of product controls are required and must be properly set * to ensure proper log data recoveries. The VOLSERS statement * value can be set to blanks, if required. A maximum of 3 volsers * can be specified. * UPDATE LAS DSN PREFIX = SG7606 UPDATE LAS VOLSERS = SBOX49,SBOX3Q,SBOX3R UPDATE LAS DATA AUNIT = C UPDATE LAS DATA PQTY = 00005 UPDATE LAS DATA SQTY = 00005 UPDATE LAS INDEX AUNIT = C UPDATE LAS INDEX PQTY = 00005 UPDATE LAS INDEX SQTY = 00005 * *------------------------------------------------------------------* Sample statements to add/update character conversion information *------------------------------------------------------------------* * Schema Level Repository Unicode data conversion information. * These values should not be changed. The IBM DB2 Recovery Expert * z/OS components require the following CCSID conversions to be * defined on the target systems. * UPDATE CCS SLR TECHNQ = ER CHARACTER CONVERSION TECHNIQUE UPDATE CCS SLR SBCS = 00037 EBCDIC UPDATE CCS SLR DBCS = 01200 UNICODE UT-16 UPDATE CCS SLR MIXED = 01208 UNICODE UT-8 * * Product output Unicode data conversion information. * UPDATE CCS ARY TECHNQ = ER CHARACTER CONVERSION TECHNIQUE UPDATE CCS ARY SBCS = 00037 EBCDIC UPDATE CCS ARY DBCS = 01200 UNICODE UT-16 UPDATE CCS ARY MIXED = 01208 UNICODE UT-8 * *------------------------------------------------------------------* Sample statements to add/update default data set information *------------------------------------------------------------------*
273
* *
UPDATE FTW DEVICE = SYSALLDA DEVICE TYPE UPDATE FTW ALCUNIT = C C=CYLS, T=TRACKS UPDATE FTW PQTY = 00001 PRIMARY QTY UPDATE FTW SQTY = 00001 SECONDARY QTY *UPDATE FTW SMSDC = xxxxxxxx SMS DATA CLASS *UPDATE FTW SMSSC = xxxxxxxx SMS STORAGE CLASS *UPDATE FTW SMSMC = xxxxxxxx SMS MANAGEMENT CLASS * * Image copy output data set allocation defaults. * UPDATE ICF DEVICE = SYSALLDA DEVICE TYPE UPDATE ICF ALCUNIT = C C=CYLS, T=TRACKS UPDATE ICF PQTY = 00001 PRIMARY QTY UPDATE ICF SQTY = 00001 SECONDARY QTY *UPDATE ICF SMSDC = xxxxxxxx SMS DATA CLASS *UPDATE ICF SMSSC = xxxxxxxx SMS STORAGE CLASS *UPDATE ICF SMSMC = xxxxxxxx SMS MANAGEMENT CLASS *UPDATE ICF MULTIVOL = xxx *UPDATE ICF EXPIREDT = xxxxxxx EXPIRATION DATE *UPDATE ICF RETPERIOD = xxxxxxx RETENTION PERIOD *UPDATE ICF FILENUM = xxxx LABEL FILE NUMBER * * Recovery output data set allocation defaults. * UPDATE RDA DEVICE = SYSALLDA DEVICE TYPE UPDATE RDA ALCUNIT = C C=CYLS, T=TRACKS UPDATE RDA PQTY = 00001 PRIMARY QTY UPDATE RDA SQTY = 00001 SECONDARY QTY *UPDATE RDA SMSDC = xxxxxxxx SMS DATA CLASS *UPDATE RDA SMSSC = xxxxxxxx SMS STORAGE CLASS *UPDATE RDA SMSMC = xxxxxxxx SMS MANAGEMENT CLASS *UPDATE RDA MULTIVOL = xxx *UPDATE RDA EXPIREDT = xxxxxxx EXPIRATION DATE *UPDATE RDA RETPERIOD = xxxxxxx RETENTION PERIOD *UPDATE RDA FILENUM = xxxx LABEL FILE NUMBER * * System Backup Recovery Services * * IPC_RBR = Y - Generate recovery plans from system level backups * IPC_RBR = N - No recovery plans based on system backups created * UPDATE IPC IPC_RBR = Y Y=generate system level backup * * System Backup Recovery Services Options * *UPDATE RBR DEVICE = XXXXXXXX *UPDATE RBR EMC LOAD1 = XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX *UPDATE RBR EMC LOAD2 = XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX *UPDATE RBR EMC LOAD3 = XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX *UPDATE RBR EMC LOAD4 = XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX *UPDATE RBR FDR LOAD1 = XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX *UPDATE RBR FDR LOAD2 = XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX UPDATE RBR PROF REPO = ARY.PROFILES UPDATE RBR MAPS REPO = ARY.PROFILE.MAPS UPDATE RBR CATS REPO = ARY.PROFILE.CATS UPDATE RBR SYSBK REPO = ARY.SYSBACK UPDATE RBR BKUP VOLS = ARY.SYSBACK.VOLS UPDATE RBR BKUP SSID = ARY.SYSBACK.SSIDS
274
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
= = = = =
The complete listing of control statements for DB2 subsystem member D8G2 from our PDS SG7606.ARY.V2R1M0.SARYSAMP(D8G2) is shown in Example E-4.
Example: E-4 Control statement listing for DB2 subsystem D8G2 * *------------------------------------------------------------------* Sample statements to add/update DB2 subsystem information. * Multiple sets of following DB2 information control statements * can be created and run in a single setup run. *------------------------------------------------------------------* SET DB2 SSID = D8G2 UPDATE DB2 ZPARMS = DSNZPAG2 UPDATE DB2 BOOTSTRAP1 = DB8GU.D8G2.BSDS01 UPDATE DB2 BOOTSTRAP2 = DB8GU.D8G2.BSDS02 UPDATE DB2 LOADLIB1 = DB8G8.SDSNEXIT UPDATE DB2 LOADLIB2 = DB8G8.SDSNLOAD *UPDATE DB2 LOADLIB3 = *UPDATE DB2 LOADLIB4 = *UPDATE DB2 LOADLIB5 = * *------------------------------------------------------------------* Sample statements to add/update ARY product plans *------------------------------------------------------------------* SET DB2 SSID = D8G2 SET PRODUCT CFG = NULL SET PRODUCT VER = NULL * UPDATE ARY PLAN1 = ARYPLAN1 DISPLAY DATA EXTRACT UPDATE ARY PLAN2 = ARYPLAN2 SCHEMA LEVEL REPOSITORY LOAD UPDATE ARY PLAN3 = ARYPLAN3 RECOVERY PLAN GENERATION UPDATE ARY PLAN4 = ARYPLAN4 JCL GENERATION AND SQL EXEC UPDATE ARY PLAN5 = ARYPLAN5 LOG ANALYSIS SERVICES * *------------------------------------------------------------------* Sample statements to add/update product message library *------------------------------------------------------------------* UPDATE ARY MSGLIBRARY = ARY.V2R1M0.SARYMENU * *------------------------------------------------------------------* Sample statements to add/update log services options *------------------------------------------------------------------* UPDATE ARY ARCHLOG1 = Y USE ARCHIVE LOG 1 UPDATE ARY ARCHLOG2 = N USE ARCHIVE LOG 2 UPDATE ARY ACTLOGPRI = Y ACTIVE LOG PRIORITY * *------------------------------------------------------------------* Sample statements to add/update data set prefix generation *------------------------------------------------------------------*
275
* * * * * *
The DSN PREFIX maximum length is 17 characters. If NULL is specified then user id is used as data set prefix. Use &USERID in the prefix to insert user id. Example: TEST.&USERID will generate a data set prefix of 'TEST.MYID' where the user id is 'MYID'.
UPDATE ARY DSN PREFIX = SG7606.&USERID * *------------------------------------------------------------------* Sample statements to turn on/off recovery options *------------------------------------------------------------------* UPDATE ARY RCVR AUTHS = Y RECOVER DB2 OBJECT AUTHORIZATIONS * *------------------------------------------------------------------* Sample statements to add/update schema level repository data * capture options. *------------------------------------------------------------------* UPDATE SLR LOAD AUTHS = Y N = DB2 authorizations are * not saved in schema level * repository. * *------------------------------------------------------------------* Sample statements to add/update interproduct communication * options. *------------------------------------------------------------------* UPDATE IPC IPC_GROUPER = N Y = Enable Grouper-related * table recovery. * *------------------------------------------------------------------* Sample statements to add/update table activity quiet time * repository names. *------------------------------------------------------------------* * EACH QT OWNER/NAME IS A 45 CHAR MAXIMUM LENGTH. THESE OBJECTS WILL * BE CREATED AUTOMATICALLY WHEN THE QUIET TIME REPORT/CAPTURE JCL * IS RUN IF THEY DO NOT ALREADY EXIST. DDL TO CREATE THESE OBJECTS * IS PROVIDED IN ARYDDL7 AND ARYDDL8 SAMPLE DDL MEMBERS. * * XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX UPDATE QT GRP TBOWNER = SYSTOOLS UPDATE QT GRP TBNAME = ARYQTG UPDATE QT GRP IXOWNER = SYSTOOLS UPDATE QT GRP IXNAME = ARYQTGX UPDATE QT ENTRY OWNER = SYSTOOLS UPDATE QT ENTRY NAME = ARYQT * XXXXXXXX (MAX LENGTH FOR DB AND TS IS 8) UPDATE QT DATABASE = SYSTOOLS UPDATE QT TABLESPACE = ARYTSQT * *------------------------------------------------------------------* Sample statements to add/update log analysis services ROWDATA * VSAM data set attributes. *------------------------------------------------------------------* * The ROWDATA VSAM data set is dynamically created by the log * analysis services when creating SQL from the log. *
276
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
* * * * * *
The DSN PREFIX maximum length is 21 characters. The following set of product controls are required and must be properly set to ensure proper log data recoveries. The VOLSERS statement value can be set to blanks, if required. A maximum of 3 volsers can be specified. UPDATE UPDATE UPDATE UPDATE UPDATE UPDATE UPDATE UPDATE LAS LAS LAS LAS LAS LAS LAS LAS DSN PREFIX VOLSERS DATA AUNIT DATA PQTY DATA SQTY INDEX AUNIT INDEX PQTY INDEX SQTY = = = = = = = = SG7606 SBOX49,SBOX3Q,SBOX3R C 00005 00005 C 00005 00005
* *------------------------------------------------------------------* Sample statements to add/update character conversion information *------------------------------------------------------------------* * Schema Level Repository Unicode data conversion information. * These values should not be changed. The IBM DB2 Recovery Expert * z/OS components require the following CCSID conversions to be * defined on the target systems. * UPDATE CCS SLR TECHNQ = ER CHARACTER CONVERSION TECHNIQUE UPDATE CCS SLR SBCS = 00037 EBCDIC UPDATE CCS SLR DBCS = 01200 UNICODE UT-16 UPDATE CCS SLR MIXED = 01208 UNICODE UT-8 * * Product output Unicode data conversion information. * UPDATE CCS ARY TECHNQ = ER CHARACTER CONVERSION TECHNIQUE UPDATE CCS ARY SBCS = 00037 EBCDIC UPDATE CCS ARY DBCS = 01200 UNICODE UT-16 UPDATE CCS ARY MIXED = 01208 UNICODE UT-8 * *------------------------------------------------------------------* Sample statements to add/update default data set information *------------------------------------------------------------------* * File tailoring work data set allocation. * UPDATE FTW DEVICE = SYSALLDA DEVICE TYPE UPDATE FTW ALCUNIT = C C=CYLS, T=TRACKS UPDATE FTW PQTY = 00001 PRIMARY QTY UPDATE FTW SQTY = 00001 SECONDARY QTY *UPDATE FTW SMSDC = xxxxxxxx SMS DATA CLASS *UPDATE FTW SMSSC = xxxxxxxx SMS STORAGE CLASS *UPDATE FTW SMSMC = xxxxxxxx SMS MANAGEMENT CLASS * * Image copy output data set allocation defaults. * UPDATE ICF DEVICE = SYSALLDA DEVICE TYPE UPDATE ICF ALCUNIT = C C=CYLS, T=TRACKS UPDATE ICF PQTY = 00001 PRIMARY QTY UPDATE ICF SQTY = 00001 SECONDARY QTY *UPDATE ICF SMSDC = xxxxxxxx SMS DATA CLASS *UPDATE ICF SMSSC = xxxxxxxx SMS STORAGE CLASS *UPDATE ICF SMSMC = xxxxxxxx SMS MANAGEMENT CLASS *UPDATE ICF MULTIVOL = xxx
277
*UPDATE ICF EXPIREDT = xxxxxxx EXPIRATION DATE *UPDATE ICF RETPERIOD = xxxxxxx RETENTION PERIOD *UPDATE ICF FILENUM = xxxx LABEL FILE NUMBER * * Recovery output data set allocation defaults. * UPDATE RDA DEVICE = SYSALLDA DEVICE TYPE UPDATE RDA ALCUNIT = C C=CYLS, T=TRACKS UPDATE RDA PQTY = 00001 PRIMARY QTY UPDATE RDA SQTY = 00001 SECONDARY QTY *UPDATE RDA SMSDC = xxxxxxxx SMS DATA CLASS *UPDATE RDA SMSSC = xxxxxxxx SMS STORAGE CLASS *UPDATE RDA SMSMC = xxxxxxxx SMS MANAGEMENT CLASS *UPDATE RDA MULTIVOL = xxx *UPDATE RDA EXPIREDT = xxxxxxx EXPIRATION DATE *UPDATE RDA RETPERIOD = xxxxxxx RETENTION PERIOD *UPDATE RDA FILENUM = xxxx LABEL FILE NUMBER * * System Backup Recovery Services * * IPC_RBR = Y - Generate recovery plans from system level backups * IPC_RBR = N - No recovery plans based on system backups created * UPDATE IPC IPC_RBR = Y Y=generate system level backup * * System Backup Recovery Services Options * *UPDATE RBR DEVICE = XXXXXXXX *UPDATE RBR EMC LOAD1 = XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX *UPDATE RBR EMC LOAD2 = XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX *UPDATE RBR EMC LOAD3 = XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX *UPDATE RBR EMC LOAD4 = XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX *UPDATE RBR FDR LOAD1 = XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX *UPDATE RBR FDR LOAD2 = XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX UPDATE RBR PROF REPO = ARY.PROFILES UPDATE RBR MAPS REPO = ARY.PROFILE.MAPS UPDATE RBR CATS REPO = ARY.PROFILE.CATS UPDATE RBR SYSBK REPO = ARY.SYSBACK UPDATE RBR BKUP VOLS = ARY.SYSBACK.VOLS UPDATE RBR BKUP SSID = ARY.SYSBACK.SSIDS UPDATE RBR BKUP OBJS = ARY.SYSBACK.OBJS UPDATE RBR REPORT REPO = ARY.BREPORT UPDATE RBR OFFLD REPO = ARY.BREPORT UPDATE RBR PARMLIB = SG7606.ARY.V2R1M0.SARYSAMP UPDATE RBR PARMLIB MBR = ARY#PARM
278
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
The sample control statement listing from our PDS SG7606.ARY.V2R1M0.SARYSAMP.DB8W(DB8A) to set up the product control file with DB2 subsystem DB8A information is shown in Example E-5.
Example: E-5 Control statement listing for DB2 subsystem DB8A *------------------------------------------------------------------* Sample statements to add/update DB2 subsystem information. * Multiple sets of following DB2 information control statements * can be created and run in a single setup run. *------------------------------------------------------------------* SET DB2 SSID = DB8A UPDATE DB2 ZPARMS = DSNZPARM UPDATE DB2 BOOTSTRAP1 = DB8AU.BSDS01 UPDATE DB2 BOOTSTRAP2 = DB8AU.BSDS02 UPDATE DB2 LOADLIB1 = DB8A8.SDSNEXIT UPDATE DB2 LOADLIB2 = DB8A8.SDSNLOAD *UPDATE DB2 LOADLIB3 = *UPDATE DB2 LOADLIB4 = *UPDATE DB2 LOADLIB5 = * *------------------------------------------------------------------* Sample statements to add/update ARY product plans *------------------------------------------------------------------* SET DB2 SSID = DB8A SET PRODUCT CFG = NULL SET PRODUCT VER = NULL * UPDATE ARY PLAN1 = ARYPLAN1 DISPLAY DATA EXTRACT UPDATE ARY PLAN2 = ARYPLAN2 SCHEMA LEVEL REPOSITORY LOAD UPDATE ARY PLAN3 = ARYPLAN3 RECOVERY PLAN GENERATION UPDATE ARY PLAN4 = ARYPLAN4 JCL GENERATION AND SQL EXEC UPDATE ARY PLAN5 = ARYPLAN5 LOG ANALYSIS SERVICES * *------------------------------------------------------------------* Sample statements to add/update product message library *------------------------------------------------------------------* UPDATE ARY MSGLIBRARY = ARY.V2R1M0.SARYMENU * *------------------------------------------------------------------* Sample statements to add/update log services options *------------------------------------------------------------------* UPDATE ARY ARCHLOG1 = Y USE ARCHIVE LOG 1 UPDATE ARY ARCHLOG2 = N USE ARCHIVE LOG 2 UPDATE ARY ACTLOGPRI = Y ACTIVE LOG PRIORITY * *------------------------------------------------------------------* Sample statements to add/update data set prefix generation *------------------------------------------------------------------* * The DSN PREFIX maximum length is 17 characters. If NULL * is specified then user id is used as data set prefix. Use &USERID * in the prefix to insert user id. Example: TEST.&USERID will * generate a data set prefix of 'TEST.MYID' where the user id is * 'MYID'. * UPDATE ARY DSN PREFIX = SG7606.&USERID Appendix E. Sample jobs
279
* *------------------------------------------------------------------* Sample statements to turn on/off recovery options *------------------------------------------------------------------* UPDATE ARY RCVR AUTHS = Y RECOVER DB2 OBJECT AUTHORIZATIONS * *------------------------------------------------------------------* Sample statements to add/update schema level repository data * capture options. *------------------------------------------------------------------* UPDATE SLR LOAD AUTHS = Y N = DB2 authorizations are * not saved in schema level * repository. * *------------------------------------------------------------------* Sample statements to add/update interproduct communication * options. *------------------------------------------------------------------* UPDATE IPC IPC_GROUPER = N Y = Enable Grouper-related * table recovery. * *------------------------------------------------------------------* Sample statements to add/update table activity quiet time * repository names. *------------------------------------------------------------------* * EACH QT OWNER/NAME IS A 45 CHAR MAXIMUM LENGTH. THESE OBJECTS WILL * BE CREATED AUTOMATICALLY WHEN THE QUIET TIME REPORT/CAPTURE JCL * IS RUN IF THEY DO NOT ALREADY EXIST. DDL TO CREATE THESE OBJECTS * IS PROVIDED IN ARYDDL7 AND ARYDDL8 SAMPLE DDL MEMBERS. * * XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX UPDATE QT GRP TBOWNER = SYSTOOLS UPDATE QT GRP TBNAME = ARYQTG UPDATE QT GRP IXOWNER = SYSTOOLS UPDATE QT GRP IXNAME = ARYQTGX UPDATE QT ENTRY OWNER = SYSTOOLS UPDATE QT ENTRY NAME = ARYQT * XXXXXXXX (MAX LENGTH FOR DB AND TS IS 8) UPDATE QT DATABASE = SYSTOOLS UPDATE QT TABLESPACE = ARYTSQT * *------------------------------------------------------------------* Sample statements to add/update log analysis services ROWDATA * VSAM data set attributes. *------------------------------------------------------------------* * The ROWDATA VSAM data set is dynamically created by the log * analysis services when creating SQL from the log. * * The DSN PREFIX maximum length is 21 characters. The following * set of product controls are required and must be properly set * to ensure proper log data recoveries. The VOLSERS statement * value can be set to blanks, if required. A maximum of 3 volsers * can be specified. * UPDATE LAS DSN PREFIX = SG7606
280
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
VOLSERS DATA AUNIT DATA PQTY DATA SQTY INDEX AUNIT INDEX PQTY INDEX SQTY
= = = = = = =
* *------------------------------------------------------------------* Sample statements to add/update character conversion information *------------------------------------------------------------------* * Schema Level Repository Unicode data conversion information. * These values should not be changed. The IBM DB2 Recovery Expert * z/OS components require the following CCSID conversions to be * defined on the target systems. * UPDATE CCS SLR TECHNQ = ER CHARACTER CONVERSION TECHNIQUE UPDATE CCS SLR SBCS = 00037 EBCDIC UPDATE CCS SLR DBCS = 01200 UNICODE UT-16 UPDATE CCS SLR MIXED = 01208 UNICODE UT-8 * * Product output Unicode data conversion information. * UPDATE CCS ARY TECHNQ = ER CHARACTER CONVERSION TECHNIQUE UPDATE CCS ARY SBCS = 00037 EBCDIC UPDATE CCS ARY DBCS = 01200 UNICODE UT-16 UPDATE CCS ARY MIXED = 01208 UNICODE UT-8 * *------------------------------------------------------------------* Sample statements to add/update default data set information *------------------------------------------------------------------* * File tailoring work data set allocation. * UPDATE FTW DEVICE = SYSALLDA DEVICE TYPE UPDATE FTW ALCUNIT = C C=CYLS, T=TRACKS UPDATE FTW PQTY = 00001 PRIMARY QTY UPDATE FTW SQTY = 00001 SECONDARY QTY *UPDATE FTW SMSDC = xxxxxxxx SMS DATA CLASS *UPDATE FTW SMSSC = xxxxxxxx SMS STORAGE CLASS *UPDATE FTW SMSMC = xxxxxxxx SMS MANAGEMENT CLASS * * Image copy output data set allocation defaults. * UPDATE ICF DEVICE = SYSALLDA DEVICE TYPE UPDATE ICF ALCUNIT = C C=CYLS, T=TRACKS UPDATE ICF PQTY = 00001 PRIMARY QTY UPDATE ICF SQTY = 00001 SECONDARY QTY *UPDATE ICF SMSDC = xxxxxxxx SMS DATA CLASS *UPDATE ICF SMSSC = xxxxxxxx SMS STORAGE CLASS *UPDATE ICF SMSMC = xxxxxxxx SMS MANAGEMENT CLASS *UPDATE ICF MULTIVOL = xxx *UPDATE ICF EXPIREDT = xxxxxxx EXPIRATION DATE *UPDATE ICF RETPERIOD = xxxxxxx RETENTION PERIOD *UPDATE ICF FILENUM = xxxx LABEL FILE NUMBER * * Recovery output data set allocation defaults. * UPDATE RDA DEVICE = SYSDA DEVICE TYPE
281
UPDATE RDA ALCUNIT = C C=CYLS, T=TRACKS UPDATE RDA PQTY = 00001 PRIMARY QTY UPDATE RDA SQTY = 00001 SECONDARY QTY *UPDATE RDA SMSDC = xxxxxxxx SMS DATA CLASS *UPDATE RDA SMSSC = xxxxxxxx SMS STORAGE CLASS *UPDATE RDA SMSMC = xxxxxxxx SMS MANAGEMENT CLASS *UPDATE RDA MULTIVOL = xxx *UPDATE RDA EXPIREDT = xxxxxxx EXPIRATION DATE *UPDATE RDA RETPERIOD = xxxxxxx RETENTION PERIOD *UPDATE RDA FILENUM = xxxx LABEL FILE NUMBER * * System Backup Recovery Services * * IPC_RBR = Y - Generate recovery plans from system level backups * IPC_RBR = N - No recovery plans based on system backups created * UPDATE IPC IPC_RBR = Y Y=generate system level backup * * System Backup Recovery Services Options * *UPDATE RBR DEVICE = XXXXXXXX *UPDATE RBR EMC LOAD1 = XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX *UPDATE RBR EMC LOAD2 = XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX *UPDATE RBR EMC LOAD3 = XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX *UPDATE RBR EMC LOAD4 = XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX *UPDATE RBR FDR LOAD1 = XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX *UPDATE RBR FDR LOAD2 = XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX UPDATE RBR PROF REPO = ARY.PROFILES UPDATE RBR MAPS REPO = ARY.PROFILE.MAPS UPDATE RBR CATS REPO = ARY.PROFILE.CATS UPDATE RBR SYSBK REPO = ARY.SYSBACK UPDATE RBR BKUP VOLS = ARY.SYSBACK.VOLS UPDATE RBR BKUP SSID = ARY.SYSBACK.SSIDS UPDATE RBR BKUP OBJS = ARY.SYSBACK.OBJS UPDATE RBR REPORT REPO = ARY.BREPORT UPDATE RBR OFFLD REPO = ARY.OFFOPTS UPDATE RBR PARMLIB = SG7606.ARY.V2R1M0.SARYSAMP.DB8W UPDATE RBR PARMLIB MBR = ARY#PARM
The sample control statement listing from our PDS SG7606.ARY.V2R1M0.SARYSAMP.DB8W(DB8W) to set up the product control file with DB2 subsystem DB8W information is shown in Example E-6.
Example: E-6 Control statement listing for DB2 subsystem DB8W * *------------------------------------------------------------------* Sample statements to add/update DB2 subsystem information. * Multiple sets of following DB2 information control statements * can be created and run in a single setup run. *------------------------------------------------------------------* SET DB2 SSID = DB8W UPDATE DB2 ZPARMS = DSNZPARM UPDATE DB2 BOOTSTRAP1 = DB8WU.DB2.BSDS01 UPDATE DB2 BOOTSTRAP2 = DB8WU.DB2.BSDS02 UPDATE DB2 LOADLIB1 = DB8W8.SDSNEXIT UPDATE DB2 LOADLIB2 = DB8W8.SDSNLOAD *UPDATE DB2 LOADLIB3 = *UPDATE DB2 LOADLIB4 =
282
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
*UPDATE DB2 LOADLIB5 = * *------------------------------------------------------------------* Sample statements to add/update ARY product plans *------------------------------------------------------------------* SET DB2 SSID = DB8W SET PRODUCT CFG = NULL SET PRODUCT VER = NULL * UPDATE ARY PLAN1 = ARYPLAN1 DISPLAY DATA EXTRACT UPDATE ARY PLAN2 = ARYPLAN2 SCHEMA LEVEL REPOSITORY LOAD UPDATE ARY PLAN3 = ARYPLAN3 RECOVERY PLAN GENERATION UPDATE ARY PLAN4 = ARYPLAN4 JCL GENERATION AND SQL EXEC UPDATE ARY PLAN5 = ARYPLAN5 LOG ANALYSIS SERVICES * *------------------------------------------------------------------* Sample statements to add/update product message library *------------------------------------------------------------------* UPDATE ARY MSGLIBRARY = ARY.V2R1M0.SARYMENU * *------------------------------------------------------------------* Sample statements to add/update log services options *------------------------------------------------------------------* UPDATE ARY ARCHLOG1 = Y USE ARCHIVE LOG 1 UPDATE ARY ARCHLOG2 = N USE ARCHIVE LOG 2 UPDATE ARY ACTLOGPRI = Y ACTIVE LOG PRIORITY * *------------------------------------------------------------------* Sample statements to add/update data set prefix generation *------------------------------------------------------------------* * The DSN PREFIX maximum length is 17 characters. If NULL * is specified then user id is used as data set prefix. Use &USERID * in the prefix to insert user id. Example: TEST.&USERID will * generate a data set prefix of 'TEST.MYID' where the user id is * 'MYID'. * UPDATE ARY DSN PREFIX = SG7606.&USERID * *------------------------------------------------------------------* Sample statements to turn on/off recovery options *------------------------------------------------------------------* UPDATE ARY RCVR AUTHS = Y RECOVER DB2 OBJECT AUTHORIZATIONS * *------------------------------------------------------------------* Sample statements to add/update schema level repository data * capture options. *------------------------------------------------------------------* UPDATE SLR LOAD AUTHS = Y N = DB2 authorizations are * not saved in schema level * repository. * *------------------------------------------------------------------* Sample statements to add/update interproduct communication * options.
283
*------------------------------------------------------------------* UPDATE IPC IPC_GROUPER = N Y = Enable Grouper-related * table recovery. * *------------------------------------------------------------------* Sample statements to add/update table activity quiet time * repository names. *------------------------------------------------------------------* * EACH QT OWNER/NAME IS A 45 CHAR MAXIMUM LENGTH. THESE OBJECTS WILL * BE CREATED AUTOMATICALLY WHEN THE QUIET TIME REPORT/CAPTURE JCL * IS RUN IF THEY DO NOT ALREADY EXIST. DDL TO CREATE THESE OBJECTS * IS PROVIDED IN ARYDDL7 AND ARYDDL8 SAMPLE DDL MEMBERS. * * XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX UPDATE QT GRP TBOWNER = SYSTOOLS UPDATE QT GRP TBNAME = ARYQTG UPDATE QT GRP IXOWNER = SYSTOOLS UPDATE QT GRP IXNAME = ARYQTGX UPDATE QT ENTRY OWNER = SYSTOOLS UPDATE QT ENTRY NAME = ARYQT * XXXXXXXX (MAX LENGTH FOR DB AND TS IS 8) UPDATE QT DATABASE = SYSTOOLS UPDATE QT TABLESPACE = ARYTSQT * *------------------------------------------------------------------* Sample statements to add/update log analysis services ROWDATA * VSAM data set attributes. *------------------------------------------------------------------* * The ROWDATA VSAM data set is dynamically created by the log * analysis services when creating SQL from the log. * * The DSN PREFIX maximum length is 21 characters. The following * set of product controls are required and must be properly set * to ensure proper log data recoveries. The VOLSERS statement * value can be set to blanks, if required. A maximum of 3 volsers * can be specified. * UPDATE LAS DSN PREFIX = SG7606 UPDATE LAS VOLSERS = UPDATE LAS DATA AUNIT = C UPDATE LAS DATA PQTY = 00005 UPDATE LAS DATA SQTY = 00005 UPDATE LAS INDEX AUNIT = C UPDATE LAS INDEX PQTY = 00005 UPDATE LAS INDEX SQTY = 00005 * *------------------------------------------------------------------* Sample statements to add/update character conversion information *------------------------------------------------------------------* * Schema Level Repository Unicode data conversion information. * These values should not be changed. The IBM DB2 Recovery Expert * z/OS components require the following CCSID conversions to be * defined on the target systems. * UPDATE CCS SLR TECHNQ = ER CHARACTER CONVERSION TECHNIQUE UPDATE CCS SLR SBCS = 00037 EBCDIC
284
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
= 01200 = 01208
Product output Unicode data conversion information. UPDATE UPDATE UPDATE UPDATE CCS CCS CCS CCS ARY ARY ARY ARY TECHNQ SBCS DBCS MIXED = = = = ER 00037 01200 01208 CHARACTER CONVERSION TECHNIQUE EBCDIC UNICODE UT-16 UNICODE UT-8
* *------------------------------------------------------------------* Sample statements to add/update default data set information *------------------------------------------------------------------* * File tailoring work data set allocation. * UPDATE FTW DEVICE = SYSALLDA DEVICE TYPE UPDATE FTW ALCUNIT = C C=CYLS, T=TRACKS UPDATE FTW PQTY = 00001 PRIMARY QTY UPDATE FTW SQTY = 00001 SECONDARY QTY *UPDATE FTW SMSDC = xxxxxxxx SMS DATA CLASS *UPDATE FTW SMSSC = xxxxxxxx SMS STORAGE CLASS *UPDATE FTW SMSMC = xxxxxxxx SMS MANAGEMENT CLASS * * Image copy output data set allocation defaults. * UPDATE ICF DEVICE = SYSALLDA DEVICE TYPE UPDATE ICF ALCUNIT = C C=CYLS, T=TRACKS UPDATE ICF PQTY = 00001 PRIMARY QTY UPDATE ICF SQTY = 00001 SECONDARY QTY *UPDATE ICF SMSDC = xxxxxxxx SMS DATA CLASS *UPDATE ICF SMSSC = xxxxxxxx SMS STORAGE CLASS *UPDATE ICF SMSMC = xxxxxxxx SMS MANAGEMENT CLASS *UPDATE ICF MULTIVOL = xxx *UPDATE ICF EXPIREDT = xxxxxxx EXPIRATION DATE *UPDATE ICF RETPERIOD = xxxxxxx RETENTION PERIOD *UPDATE ICF FILENUM = xxxx LABEL FILE NUMBER * * Recovery output data set allocation defaults. * UPDATE RDA DEVICE = SYSDA DEVICE TYPE UPDATE RDA ALCUNIT = C C=CYLS, T=TRACKS UPDATE RDA PQTY = 00001 PRIMARY QTY UPDATE RDA SQTY = 00001 SECONDARY QTY *UPDATE RDA SMSDC = xxxxxxxx SMS DATA CLASS *UPDATE RDA SMSSC = xxxxxxxx SMS STORAGE CLASS *UPDATE RDA SMSMC = xxxxxxxx SMS MANAGEMENT CLASS *UPDATE RDA MULTIVOL = xxx *UPDATE RDA EXPIREDT = xxxxxxx EXPIRATION DATE *UPDATE RDA RETPERIOD = xxxxxxx RETENTION PERIOD *UPDATE RDA FILENUM = xxxx LABEL FILE NUMBER * * System Backup Recovery Services * * IPC_RBR = Y - Generate recovery plans from system level backups * IPC_RBR = N - No recovery plans based on system backups created * UPDATE IPC IPC_RBR = Y Y=generate system level backup * * System Backup Recovery Services Options
285
* *UPDATE *UPDATE *UPDATE *UPDATE *UPDATE *UPDATE *UPDATE UPDATE UPDATE UPDATE UPDATE UPDATE UPDATE UPDATE UPDATE UPDATE UPDATE UPDATE * /* //
RBR RBR RBR RBR RBR RBR RBR RBR RBR RBR RBR RBR RBR RBR RBR RBR RBR RBR
DEVICE EMC LOAD1 EMC LOAD2 EMC LOAD3 EMC LOAD4 FDR LOAD1 FDR LOAD2 PROF REPO MAPS REPO CATS REPO SYSBK REPO BKUP VOLS BKUP SSID BKUP OBJS REPORT REPO OFFLD REPO PARMLIB PARMLIB MBR
= = = = = = = = = = = = = = = = = =
XXXXXXXX XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX ARY.PROFILES ARY.PROFILE.MAPS ARY.PROFILE.CATS ARY.SYSBACK ARY.SYSBACK.VOLS ARY.SYSBACK.SSIDS ARY.SYSBACK.OBJS ARY.BREPORT ARY.OFFOPTS SG7606.ARY.V2R1M0.SARYSAMP.DB8W ARY#PARM
286
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
= = = = =
DISPLAY DATA EXTRACT SCHEMA LEVEL REPOSITORY LOAD RECOVERY PLAN GENERATION JCL GENERATION AND SQL EXEC LOG ANALYSIS SERVICES
* *------------------------------------------------------------------* Sample statements to add/update product message library *------------------------------------------------------------------* UPDATE ARY MSGLIBRARY = ARY.V2R1M0.SARYMENU * *------------------------------------------------------------------* Sample statements to add/update log services options *------------------------------------------------------------------* UPDATE ARY ARCHLOG1 = Y USE ARCHIVE LOG 1 UPDATE ARY ARCHLOG2 = N USE ARCHIVE LOG 2 UPDATE ARY ACTLOGPRI = Y ACTIVE LOG PRIORITY * *------------------------------------------------------------------* Sample statements to add/update data set prefix generation *------------------------------------------------------------------* * The DSN PREFIX maximum length is 17 characters. If NULL * is specified then user id is used as data set prefix. Use &USERID * in the prefix to insert user id. Example: TEST.&USERID will * generate a data set prefix of 'TEST.MYID' where the user id is * 'MYID'. * UPDATE ARY DSN PREFIX = &USERID * *------------------------------------------------------------------* Sample statements to turn on/off recovery options *------------------------------------------------------------------* UPDATE ARY RCVR AUTHS = Y RECOVER DB2 OBJECT AUTHORIZATIONS * *------------------------------------------------------------------* Sample statements to add/update schema level repository data * capture options. *------------------------------------------------------------------* UPDATE SLR LOAD AUTHS = Y N = DB2 authorizations are * not saved in schema level * repository. * *------------------------------------------------------------------* Sample statements to add/update interproduct communication * options. *------------------------------------------------------------------* UPDATE IPC IPC_GROUPER = Y Y = Enable Grouper-related * table recovery. * *------------------------------------------------------------------* Sample statements to add/update table activity quiet time * repository names. *------------------------------------------------------------------*
287
* * * * * *
EACH QT OWNER/NAME IS A 45 CHAR MAXIMUM LENGTH. THESE OBJECTS WILL BE CREATED AUTOMATICALLY WHEN THE QUIET TIME REPORT/CAPTURE JCL IS RUN IF THEY DO NOT ALREADY EXIST. DDL TO CREATE THESE OBJECTS IS PROVIDED IN ARYDDL7 AND ARYDDL8 SAMPLE DDL MEMBERS. XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX SYSTOOLS ARYQTG SYSTOOLS ARYQTGX SYSTOOLS ARYQT XXXXXXXX (MAX LENGTH FOR DB AND TS IS 8) = SYSTOOLS = ARYTSQT = = = = = =
QT QT QT QT QT QT
GRP TBOWNER GRP TBNAME GRP IXOWNER GRP IXNAME ENTRY OWNER ENTRY NAME
* *------------------------------------------------------------------* Sample statements to add/update log analysis services ROWDATA * VSAM data set attributes. *------------------------------------------------------------------* * The ROWDATA VSAM data set is dynamically created by the log * analysis services when creating SQL from the log. * * The DSN PREFIX maximum length is 21 characters. The following * set of product controls are required and must be properly set * to ensure proper log data recoveries. The VOLSERS statement * value can be set to blanks, if required. A maximum of 3 volsers * can be specified. * UPDATE LAS DSN PREFIX = ARY UPDATE LAS VOLSERS = UPDATE LAS DATA AUNIT = C UPDATE LAS DATA PQTY = 00005 UPDATE LAS DATA SQTY = 00005 UPDATE LAS INDEX AUNIT = C UPDATE LAS INDEX PQTY = 00005 UPDATE LAS INDEX SQTY = 00005 * *------------------------------------------------------------------* Sample statements to add/update character conversion information *------------------------------------------------------------------* * Schema Level Repository Unicode data conversion information. * These values should not be changed. The IBM DB2 Recovery Expert * z/OS components require the following CCSID conversions to be * defined on the target systems. * UPDATE CCS SLR TECHNQ = ER CHARACTER CONVERSION TECHNIQUE UPDATE CCS SLR SBCS = 00037 EBCDIC UPDATE CCS SLR DBCS = 01200 UNICODE UT-16 UPDATE CCS SLR MIXED = 01208 UNICODE UT-8 * * Product output Unicode data conversion information. * UPDATE CCS ARY TECHNQ = ER CHARACTER CONVERSION TECHNIQUE UPDATE CCS ARY SBCS = 00037 EBCDIC UPDATE CCS ARY DBCS = 01200 UNICODE UT-16 UPDATE CCS ARY MIXED = 01208 UNICODE UT-8 *
288
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
*------------------------------------------------------------------* Sample statements to add/update default data set information *------------------------------------------------------------------* * File tailoring work data set allocation. * UPDATE FTW DEVICE = SYSALLDA DEVICE TYPE UPDATE FTW ALCUNIT = C C=CYLS, T=TRACKS UPDATE FTW PQTY = 00001 PRIMARY QTY UPDATE FTW SQTY = 00001 SECONDARY QTY *UPDATE FTW SMSDC = xxxxxxxx SMS DATA CLASS *UPDATE FTW SMSSC = xxxxxxxx SMS STORAGE CLASS *UPDATE FTW SMSMC = xxxxxxxx SMS MANAGEMENT CLASS * * Image copy output data set allocation defaults. * UPDATE ICF DEVICE = SYSALLDA DEVICE TYPE UPDATE ICF ALCUNIT = C C=CYLS, T=TRACKS UPDATE ICF PQTY = 00001 PRIMARY QTY UPDATE ICF SQTY = 00001 SECONDARY QTY *UPDATE ICF SMSDC = xxxxxxxx SMS DATA CLASS *UPDATE ICF SMSSC = xxxxxxxx SMS STORAGE CLASS *UPDATE ICF SMSMC = xxxxxxxx SMS MANAGEMENT CLASS *UPDATE ICF MULTIVOL = xxx *UPDATE ICF EXPIREDT = xxxxxxx EXPIRATION DATE *UPDATE ICF RETPERIOD = xxxxxxx RETENTION PERIOD *UPDATE ICF FILENUM = xxxx LABEL FILE NUMBER * * Recovery output data set allocation defaults. * UPDATE RDA DEVICE = SYSALLDA DEVICE TYPE UPDATE RDA ALCUNIT = C C=CYLS, T=TRACKS UPDATE RDA PQTY = 00001 PRIMARY QTY UPDATE RDA SQTY = 00001 SECONDARY QTY *UPDATE RDA SMSDC = xxxxxxxx SMS DATA CLASS *UPDATE RDA SMSSC = xxxxxxxx SMS STORAGE CLASS *UPDATE RDA SMSMC = xxxxxxxx SMS MANAGEMENT CLASS *UPDATE RDA MULTIVOL = xxx *UPDATE RDA EXPIREDT = xxxxxxx EXPIRATION DATE *UPDATE RDA RETPERIOD = xxxxxxx RETENTION PERIOD *UPDATE RDA FILENUM = xxxx LABEL FILE NUMBER * * System Backup Recovery Services * * IPC_RBR = Y - Generate recovery plans from system level backups * IPC_RBR = N - No recovery plans based on system backups created * UPDATE IPC IPC_RBR = Y Y=generate system level backup * * System Backup Recovery Services Options * *UPDATE RBR DEVICE = XXXXXXXX *UPDATE RBR EMC LOAD1 = XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX *UPDATE RBR EMC LOAD2 = XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX *UPDATE RBR EMC LOAD3 = XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX *UPDATE RBR EMC LOAD4 = XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX *UPDATE RBR FDR LOAD1 = XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX *UPDATE RBR FDR LOAD2 = XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX UPDATE RBR PROF REPO = ARY.PROFILES UPDATE RBR MAPS REPO = ARY.PROFILE.MAPS
289
CATS REPO SYSBK REPO BKUP VOLS BKUP SSID BKUP OBJS REPORT REPO OFFLD REPO PARMLIB PARMLIB MBR
= = = = = = = = =
A sample control statement listing from our PDS SG7606.ARY.V2R1M0.SARYSAMP.D9C1(D9C2) to set up the product control file with DB2 subsystem D9C2 information is shown in Example E-8.
Example: E-8 Control statement listing for DB2 subsystem D9C2 * *------------------------------------------------------------------* Sample statements to add/update DB2 subsystem information. * Multiple sets of following DB2 information control statements * can be created and run in a single setup run. *------------------------------------------------------------------* SET DB2 SSID = D9C2 UPDATE DB2 ZPARMS = DSNZPAC2 UPDATE DB2 BOOTSTRAP1 = DB9CL.D9C2.BSDS01 UPDATE DB2 BOOTSTRAP2 = DB9CL.D9C2.BSDS02 UPDATE DB2 LOADLIB1 = DB9C9.SDSNEXIT UPDATE DB2 LOADLIB2 = DB9C9.SDSNLOAD *UPDATE DB2 LOADLIB3 = *UPDATE DB2 LOADLIB4 = *UPDATE DB2 LOADLIB5 = * *------------------------------------------------------------------* Sample statements to add/update ARY product plans *------------------------------------------------------------------* SET DB2 SSID = D9C2 SET PRODUCT CFG = NULL SET PRODUCT VER = NULL * UPDATE ARY PLAN1 = ARYPLAN1 DISPLAY DATA EXTRACT UPDATE ARY PLAN2 = ARYPLAN2 SCHEMA LEVEL REPOSITORY LOAD UPDATE ARY PLAN3 = ARYPLAN3 RECOVERY PLAN GENERATION UPDATE ARY PLAN4 = ARYPLAN4 JCL GENERATION AND SQL EXEC UPDATE ARY PLAN5 = ARYPLAN5 LOG ANALYSIS SERVICES * *------------------------------------------------------------------* Sample statements to add/update product message library *------------------------------------------------------------------* UPDATE ARY MSGLIBRARY = ARY.V2R1M0.SARYMENU * *------------------------------------------------------------------* Sample statements to add/update log services options *------------------------------------------------------------------* UPDATE ARY ARCHLOG1 = Y USE ARCHIVE LOG 1 UPDATE ARY ARCHLOG2 = N USE ARCHIVE LOG 2 UPDATE ARY ACTLOGPRI = Y ACTIVE LOG PRIORITY
290
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
* *------------------------------------------------------------------* Sample statements to add/update data set prefix generation *------------------------------------------------------------------* * The DSN PREFIX maximum length is 17 characters. If NULL * is specified then user id is used as data set prefix. Use &USERID * in the prefix to insert user id. Example: TEST.&USERID will * generate a data set prefix of 'TEST.MYID' where the user id is * 'MYID'. * UPDATE ARY DSN PREFIX = &USERID * *------------------------------------------------------------------* Sample statements to turn on/off recovery options *------------------------------------------------------------------* UPDATE ARY RCVR AUTHS = Y RECOVER DB2 OBJECT AUTHORIZATIONS * *------------------------------------------------------------------* Sample statements to add/update schema level repository data * capture options. *------------------------------------------------------------------* UPDATE SLR LOAD AUTHS = Y N = DB2 authorizations are * not saved in schema level * repository. * *------------------------------------------------------------------* Sample statements to add/update interproduct communication * options. *------------------------------------------------------------------* UPDATE IPC IPC_GROUPER = Y Y = Enable Grouper-related * table recovery. * *------------------------------------------------------------------* Sample statements to add/update table activity quiet time * repository names. *------------------------------------------------------------------* * EACH QT OWNER/NAME IS A 45 CHAR MAXIMUM LENGTH. THESE OBJECTS WILL * BE CREATED AUTOMATICALLY WHEN THE QUIET TIME REPORT/CAPTURE JCL * IS RUN IF THEY DO NOT ALREADY EXIST. DDL TO CREATE THESE OBJECTS * IS PROVIDED IN ARYDDL7 AND ARYDDL8 SAMPLE DDL MEMBERS. * * XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX UPDATE QT GRP TBOWNER = SYSTOOLS UPDATE QT GRP TBNAME = ARYQTG UPDATE QT GRP IXOWNER = SYSTOOLS UPDATE QT GRP IXNAME = ARYQTGX UPDATE QT ENTRY OWNER = SYSTOOLS UPDATE QT ENTRY NAME = ARYQT * XXXXXXXX (MAX LENGTH FOR DB AND TS IS 8) UPDATE QT DATABASE = SYSTOOLS UPDATE QT TABLESPACE = ARYTSQT * *------------------------------------------------------------------* Sample statements to add/update log analysis services ROWDATA * VSAM data set attributes.
291
*------------------------------------------------------------------* * The ROWDATA VSAM data set is dynamically created by the log * analysis services when creating SQL from the log. * * The DSN PREFIX maximum length is 21 characters. The following * set of product controls are required and must be properly set * to ensure proper log data recoveries. The VOLSERS statement * value can be set to blanks, if required. A maximum of 3 volsers * can be specified. * UPDATE LAS DSN PREFIX = ARY UPDATE LAS VOLSERS = UPDATE LAS DATA AUNIT = C UPDATE LAS DATA PQTY = 00005 UPDATE LAS DATA SQTY = 00005 UPDATE LAS INDEX AUNIT = C UPDATE LAS INDEX PQTY = 00005 UPDATE LAS INDEX SQTY = 00005 * *------------------------------------------------------------------* Sample statements to add/update character conversion information *------------------------------------------------------------------* * Schema Level Repository Unicode data conversion information. * These values should not be changed. The IBM DB2 Recovery Expert * z/OS components require the following CCSID conversions to be * defined on the target systems. * UPDATE CCS SLR TECHNQ = ER CHARACTER CONVERSION TECHNIQUE UPDATE CCS SLR SBCS = 00037 EBCDIC UPDATE CCS SLR DBCS = 01200 UNICODE UT-16 UPDATE CCS SLR MIXED = 01208 UNICODE UT-8 * * Product output Unicode data conversion information. * UPDATE CCS ARY TECHNQ = ER CHARACTER CONVERSION TECHNIQUE UPDATE CCS ARY SBCS = 00037 EBCDIC UPDATE CCS ARY DBCS = 01200 UNICODE UT-16 UPDATE CCS ARY MIXED = 01208 UNICODE UT-8 * *------------------------------------------------------------------* Sample statements to add/update default data set information *------------------------------------------------------------------* * File tailoring work data set allocation. * UPDATE FTW DEVICE = SYSALLDA DEVICE TYPE UPDATE FTW ALCUNIT = C C=CYLS, T=TRACKS UPDATE FTW PQTY = 00001 PRIMARY QTY UPDATE FTW SQTY = 00001 SECONDARY QTY *UPDATE FTW SMSDC = xxxxxxxx SMS DATA CLASS *UPDATE FTW SMSSC = xxxxxxxx SMS STORAGE CLASS *UPDATE FTW SMSMC = xxxxxxxx SMS MANAGEMENT CLASS * * Image copy output data set allocation defaults. * UPDATE ICF DEVICE = SYSALLDA DEVICE TYPE UPDATE ICF ALCUNIT = C C=CYLS, T=TRACKS UPDATE ICF PQTY = 00001 PRIMARY QTY
292
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
UPDATE ICF SQTY = 00001 SECONDARY QTY *UPDATE ICF SMSDC = xxxxxxxx SMS DATA CLASS *UPDATE ICF SMSSC = xxxxxxxx SMS STORAGE CLASS *UPDATE ICF SMSMC = xxxxxxxx SMS MANAGEMENT CLASS *UPDATE ICF MULTIVOL = xxx *UPDATE ICF EXPIREDT = xxxxxxx EXPIRATION DATE *UPDATE ICF RETPERIOD = xxxxxxx RETENTION PERIOD *UPDATE ICF FILENUM = xxxx LABEL FILE NUMBER * * Recovery output data set allocation defaults. * UPDATE RDA DEVICE = SYSALLDA DEVICE TYPE UPDATE RDA ALCUNIT = C C=CYLS, T=TRACKS UPDATE RDA PQTY = 00001 PRIMARY QTY UPDATE RDA SQTY = 00001 SECONDARY QTY *UPDATE RDA SMSDC = xxxxxxxx SMS DATA CLASS *UPDATE RDA SMSSC = xxxxxxxx SMS STORAGE CLASS *UPDATE RDA SMSMC = xxxxxxxx SMS MANAGEMENT CLASS *UPDATE RDA MULTIVOL = xxx *UPDATE RDA EXPIREDT = xxxxxxx EXPIRATION DATE *UPDATE RDA RETPERIOD = xxxxxxx RETENTION PERIOD *UPDATE RDA FILENUM = xxxx LABEL FILE NUMBER * * System Backup Recovery Services * * IPC_RBR = Y - Generate recovery plans from system level backups * IPC_RBR = N - No recovery plans based on system backups created * UPDATE IPC IPC_RBR = Y Y=generate system level backup * * System Backup Recovery Services Options * *UPDATE RBR DEVICE = XXXXXXXX *UPDATE RBR EMC LOAD1 = XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX *UPDATE RBR EMC LOAD2 = XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX *UPDATE RBR EMC LOAD3 = XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX *UPDATE RBR EMC LOAD4 = XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX *UPDATE RBR FDR LOAD1 = XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX *UPDATE RBR FDR LOAD2 = XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX.XXXXXXXX UPDATE RBR PROF REPO = ARY.PROFILES UPDATE RBR MAPS REPO = ARY.PROFILE.MAPS UPDATE RBR CATS REPO = ARY.PROFILE.CATS UPDATE RBR SYSBK REPO = ARY.SYSBACK UPDATE RBR BKUP VOLS = ARY.SYSBACK.VOLS UPDATE RBR BKUP SSID = ARY.SYSBACK.SSIDS UPDATE RBR BKUP OBJS = ARY.SYSBACK.OBJS UPDATE RBR REPORT REPO = ARY.BREPORT UPDATE RBR OFFLD REPO = ARY.OFFOPTS UPDATE RBR PARMLIB = ARY.V2R1M0.SARYSAMP UPDATE RBR PARMLIB MBR = ARY#PARM
293
This is the sample job to create the repository VSAM data sets. This JCL is from the ARYREPO member of the SARSAMP installation library supplied as shown in Example E-9.
Example: E-9 JCL to create repository VSAM data sets //STEP1 EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SYSOUT DD SYSOUT=* //SYSUT1 DD * DUMMY RECORD /* //SYSIN DD * DELETE 'ARY.PROFILES' SET MAXCC = 0 DEFINE CLUSTER ( NAME ('ARY.PROFILES') VOLUMES (SBOX3T) CYLINDERS (5 10) SHAREOPTIONS (3 3) INDEXED RECORDSIZE (1024 1024) KEYS (40 0) REUSE ) DATA ( NAME ('ARY.PROFILES.DATA')) INDEX ( NAME ('ARY.PROFILES.INDEX')) REPRO INFILE(SYSUT1) OUTDATASET('ARY.PROFILES') REUSE -
/* //* //********************************************************************** //* INVOKE IDCAMS * //********************************************************************** //STEP2 EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SYSOUT DD SYSOUT=* //SYSUT1 DD * DUMMY RECORD /* //SYSIN DD * DELETE 'ARY.PROFILE.MAPS' SET MAXCC = 0 DEFINE CLUSTER ( NAME ('ARY.PROFILE.MAPS') VOLUMES (SBOX3T) CYLINDERS (5 15) SHAREOPTIONS (3 3) INDEXED RECORDSIZE (1024 1024) KEYS (46 0) REUSE ) DATA ( NAME ('ARY.PROFILE.MAPS.DATA')) INDEX ( NAME ('ARY.PROFILE.MAPS.INDEX')) REPRO INFILE(SYSUT1) OUTDATASET('ARY.PROFILE.MAPS') REUSE /* -
294
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
//* //********************************************************************** //* INVOKE IDCAMS * //********************************************************************** //STEP3 EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SYSOUT DD SYSOUT=* //SYSUT1 DD * DUMMY RECORD /* //SYSIN DD * DELETE 'ARY.PROFILE.CATS' SET MAXCC = 0 DEFINE CLUSTER ( NAME ('ARY.PROFILE.CATS') VOLUMES (SBOX3T) CYLINDERS (3 5) SHAREOPTIONS (3 3) INDEXED RECORDSIZE (1024 1024) KEYS (40 0) REUSE ) DATA ( NAME ('ARY.PROFILE.CATS.DATA')) INDEX ( NAME ('ARY.PROFILE.CATS.INDEX')) REPRO INFILE(SYSUT1) OUTDATASET('ARY.PROFILE.CATS') REUSE -
/* //* //********************************************************************** //* INVOKE IDCAMS * //********************************************************************** //STEP4 EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SYSOUT DD SYSOUT=* //SYSUT1 DD * DUMMY RECORD /* //SYSIN DD * DELETE 'ARY.SYSBACK' SET MAXCC = 0 DEFINE CLUSTER ( NAME ('ARY.SYSBACK') VOLUMES (SBOX3T) CYLINDERS (5 10) SHAREOPTIONS (3 3) INDEXED RECORDSIZE (1024 1024) KEYS (48 0) REUSE ) DATA ( NAME ('ARY.SYSBACK.DATA')) INDEX ( NAME ('ARY.SYSBACK.INDEX')) REPRO INFILE(SYSUT1) OUTDATASET('ARY.SYSBACK') REUSE /* -
295
//* //********************************************************************** //* INVOKE IDCAMS * //********************************************************************** //STEP5 EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SYSOUT DD SYSOUT=* //SYSUT1 DD * DUMMY RECORD /* //SYSIN DD * DELETE 'ARY.SYSBACK.VOLS' SET MAXCC = 0 DEFINE CLUSTER ( NAME ('ARY.SYSBACK.VOLS') VOLUMES (SBOX3T) CYLINDERS (10 15) SHAREOPTIONS (3 3) INDEXED RECORDSIZE (1024 1024) KEYS (52 0) REUSE ) DATA ( NAME ('ARY.SYSBACK.VOLS.DATA')) INDEX ( NAME ('ARY.SYSBACK.VOLS.INDEX')) REPRO INFILE(SYSUT1) OUTDATASET('ARY.SYSBACK.VOLS') REUSE -
/* //* //********************************************************************** //* INVOKE IDCAMS * //********************************************************************** //STEP6 EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SYSOUT DD SYSOUT=* //SYSUT1 DD * DUMMY RECORD /* //SYSIN DD * DELETE 'ARY.SYSBACK.SSIDS' SET MAXCC = 0 DEFINE CLUSTER ( NAME ('ARY.SYSBACK.SSIDS') VOLUMES (SBOX3T) CYLINDERS (3 5) SHAREOPTIONS (3 3) INDEXED RECORDSIZE (1024 1024) KEYS (52 0) REUSE ) DATA ( NAME ('ARY.SYSBACK.SSIDS.DATA')) INDEX ( NAME ('ARY.SYSBACK.SSIDS.INDEX')) REPRO INFILE(SYSUT1) OUTDATASET('ARY.SYSBACK.SSIDS') REUSE /* -
296
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
//********************************************************************** //* INVOKE IDCAMS * //********************************************************************** //STEP7 EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SYSOUT DD SYSOUT=* //SYSUT1 DD * DUMMY RECORD /* //SYSIN DD * DELETE 'ARY.SYSBACK.OBJS' SET MAXCC = 0 DEFINE CLUSTER ( NAME ('ARY.SYSBACK.OBJS') VOLUMES (SBOX3T) CYLINDERS (15 75) SHAREOPTIONS (3 3) INDEXED RECORDSIZE (2620 2620) KEYS (30 0) REUSE ) DATA ( NAME ('ARY.SYSBACK.OBJS.DATA')) INDEX ( NAME ('ARY.SYSBACK.OBJS.INDEX')) REPRO INFILE(SYSUT1) OUTDATASET('ARY.SYSBACK.OBJS') REUSE -
/* //* //********************************************************************** //* INVOKE IDCAMS * //********************************************************************** //STEP8 EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SYSOUT DD SYSOUT=* //SYSUT1 DD * DUMMY RECORD /* //SYSIN DD * DELETE 'ARY.BREPORT' SET MAXCC = 0 DEFINE CLUSTER ( NAME ('ARY.BREPORT') VOLUMES (SBOX3T) CYLINDERS (3 5) SHAREOPTIONS (3 3) INDEXED RECORDSIZE (1024 1024) KEYS (50 0) REUSE ) DATA ( NAME ('ARY.BREPORT.DATA')) INDEX ( NAME ('ARY.BREPORT.INDEX')) REPRO INFILE(SYSUT1) OUTDATASET('ARY.BREPORT') REUSE /* //* -
297
//********************************************************************** //* INVOKE IDCAMS * //********************************************************************** //STEP9 EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SYSOUT DD SYSOUT=* //SYSUT1 DD * DUMMY RECORD /* //SYSIN DD * DELETE 'ARY.OFFOPTS' SET MAXCC = 0 DEFINE CLUSTER ( NAME ('ARY.OFFOPTS') VOLUMES (SBOX3T) CYLINDERS (3 5) SHAREOPTIONS (3 3) INDEXED RECORDSIZE (1280 1280) KEYS (4 0) REUSE ) DATA ( NAME ('ARY.OFFOPTS.DATA')) INDEX ( NAME ('ARY.OFFOPTS.INDEX')) REPRO INFILE(SYSUT1) OUTDATASET('ARY.OFFOPTS') REUSE -
/* //* //********************************************************************** //* INVOKE IDCAMS * //********************************************************************** //STEP10 EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SYSOUT DD SYSOUT=* //SYSUT1 DD * DUMMY RECORD /* //SYSIN DD * DELETE 'ARY.OBJECTS' SET MAXCC = 0 DEFINE CLUSTER ( NAME ('ARY.OBJECTS') VOLUMES (SBOX3T) CYLINDERS (3 5) SHAREOPTIONS (3 3) INDEXED RECORDSIZE (1300 1300) KEYS (62 0) REUSE ) DATA ( NAME ('ARY.OBJECTS.DATA')) INDEX ( NAME ('ARY.OBJECTS.INDEX')) -
298
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
This sample JCL is referred to in Sample JCL from ARYMOVER member to create mover repository on page 47. A sample JCL to create the mover repository is shown in Example E-10.
Example: E-10 JCL to create mover repository //STEP1 EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SYSOUT DD SYSOUT=* //SYSUT1 DD * DUMMY RECORD /* //SYSIN DD * DELETE 'ARY.SG7606.MOVDATA' SET MAXCC = 0 DEFINE CLUSTER ( NAME ('ARY.SG7606.MOVDATA') VOLUMES (SBOX3T) CYLINDERS (5 10) SHAREOPTIONS (3 3) INDEXED RECORDSIZE (1024 1024) KEYS (6 0) REUSE ) DATA ( NAME ('ARY.SG7606.MOVDATA.DATA')) INDEX ( NAME ('ARY.SG7606.MOVDATA.INDEX')) REPRO INFILE(SYSUT1) OUTDATASET('ARY.SG7606.MOVDATA') REUSE /* -
This sample JCL is referred to in Sample JCLs from ARY#RBAR and ARY#RBA to create RBA capture repository on page 47. A sample JCL to create the VSAM data set to capture RBA information when the RBA capture utility is run is shown in Example E-11.
Example: E-11 JCL to create VSAM data set to capture RBA information //STEP1 EXEC PGM=IDCAMS //SYSPRINT DD SYSOUT=* //SYSOUT DD SYSOUT=* //SYSUT1 DD * DUMMY RECORD /* //SYSIN DD * DELETE 'SG7606.SC53.ALLSSIDS.RBA' SET MAXCC = 0 DEFINE CLUSTER ( NAME ('SG7606.SC53.ALLSSIDS.RBA') Appendix E. Sample jobs
299
VOLUMES (SBOX3S) CYLINDERS (50 50) SHAREOPTIONS (3 3) INDEXED RECORDSIZE (80 80) KEYS (21 0) REUSE ) DATA ( NAME ('SG7606.SC53.ALLSSIDS.RBA.DATA')) INDEX ( NAME ('SG7606.SC53.ALLSSIDS.RBA.INDEX')) REPRO INFILE(SYSUT1) OUTDATASET('SG7606.SC53.ALLSSIDS.RBA') REUSE /* -
This sample job is referred to in Sample JCLs from ARY#RBAR and ARY#RBA to create RBA capture repository on page 47. A sample job for the RBA capture utility started task is shown in Example E-12. The PDS member SG7606.ARY.V2R1M0.SARYSAMP.D8FG(RBRSSID) shown in Example E-12. contains: D8F1 D8F2 D8G1 D8G2
Example: E-12 Sample proc for the RBA capture utility started task //ARY#RBA EXEC PGM=ARY#RBA,REGION=8M,PARM='1' //* //STEPLIB DD DISP=SHR,DSN=ARY.V2R1M0.SARYLOAD //ARY#RBA DD DISP=SHR,DSN=ARY.BKRES53.SSID.RBA //SYSIN DD DISP=SHR,DSN=SG7606.ARY.V2R1M0.SARYSAMP.D8FG(RBRSSID) //SYSPRINT DD SYSOUT=*
This sample job is referred to in Sample JCL from ARYGDG on page 47. Example E-13 is the sample job to create GDG bases to back up the VSAM repository data sets.
Example: E-13 Sample job to create GDG bases //DEFGDG EXEC PGM=IDCAMS,REGION=4M //SYSPRINT DD SYSOUT=* //SYSOUT DD SYSOUT=* //SYSIN DD * DEFINE GDG (NAME('ARY.SG7606.PROFILE.ARYGDGSF') DEFINE GDG (NAME('ARY.SG7606.PROFMAP.ARYGDGSF') DEFINE GDG (NAME('ARY.SG7606.PROFCAT.ARYGDGSF') DEFINE GDG (NAME('ARY.SG7606.SYSBACK.ARYGDGSF') DEFINE GDG (NAME('ARY.SG7606.SYSBVOL.ARYGDGSF') DEFINE GDG (NAME('ARY.SG7606.SYSSSID.ARYGDGSF') DEFINE GDG (NAME('ARY.SG7606.BREPORT.ARYGDGSF') DEFINE GDG (NAME('ARY.SG7606.OFFOPTS.ARYGDGSF') DEFINE GDG (NAME('ARY.SG7606.SYSBOBJ.ARYGDGSF') DEFINE GDG (NAME('ARY.SG7606.OBJECTS.ARYGDGSF') //*
SCRATCH SCRATCH SCRATCH SCRATCH SCRATCH SCRATCH SCRATCH SCRATCH SCRATCH SCRATCH
LIMIT(10)) LIMIT(10)) LIMIT(10)) LIMIT(10)) LIMIT(10)) LIMIT(10)) LIMIT(10)) LIMIT(10)) LIMIT(10)) LIMIT(10))
300
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
301
CREATE TYPE 2 INDEX SYSTOOLS.DR_ICOPY_CATL_IX ON SYSTOOLS.DR_IMAGE_COPY_CATL (DBNAME ASC ,TSNAME ASC ,START_RBA ASC ,TIMESTAMP ASC) USING STOGROUP STGX PRIQTY 200 SECQTY 100 ERASE NO CLUSTER BUFFERPOOL BP0 CLOSE NO; COMMIT; CREATE TABLESPACE ARYDRARC IN SYSTOOLS USING STOGROUP STGX PRIQTY 100 SECQTY 100 ERASE NO LOCKSIZE PAGE BUFFERPOOL BP0 SEGSIZE 4 CLOSE NO CCSID EBCDIC;
COMMIT; CREATE TABLE SYSTOOLS.DR_ARCHIVE_LOGS00 (DB2_SSID CHAR(04) NOT NULL ,PRODUCT_FMID CHAR(03) NOT NULL ,ARCHLOG_NAME CHAR(44) NOT NULL ,DR_ARCHLOG_NAME CHAR(44) NOT NULL ,VOLUME_SEQ_NO SMALLINT NOT NULL WITH ,COPY_IND CHAR(01) NOT NULL ,START_TIME CHAR(08) NOT NULL ,END_TIME CHAR(08) NOT NULL ,START_RBA CHAR(06) NOT NULL FOR ,END_RBA CHAR(06) NOT NULL FOR ,START_LRSN CHAR(06) NOT NULL FOR ,END_LRSN CHAR(06) NOT NULL FOR ,OLD_CATALOGED CHAR(01) NOT NULL ,NEW_CATALOGED CHAR(01) NOT NULL ,OLD_UNIT CHAR(08) NOT NULL ,NEW_UNIT CHAR(08) NOT NULL ,OLD_VOLUME CHAR(06) NOT NULL ,NEW_VOLUME CHAR(06) NOT NULL ,PRIMARY_SPACE INTEGER NOT NULL ,SECONDARY_SPACE INTEGER NOT NULL ,BLOCK_SIZE SMALLINT NOT NULL ,FILE_SEQ_NO CHAR(03) NOT NULL) IN SYSTOOLS.ARYDRARC; COMMIT;
DEFAULT 1
CREATE TYPE 2 UNIQUE INDEX SYSTOOLS.DR_ARCHIVE_LOG_IX ON SYSTOOLS.DR_ARCHIVE_LOGS00 (DB2_SSID ASC ,ARCHLOG_NAME ASC ,START_TIME DESC) USING STOGROUP STGX
302
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
PRIQTY 50 SECQTY 50 ERASE NO CLUSTER BUFFERPOOL BP0 CLOSE NO; COMMIT; CREATE VIEW SYSTOOLS.DR_ICOPY_CATLV AS SELECT * FROM SYSTOOLS.DR_IMAGE_COPY_CATL; COMMIT; CREATE VIEW SYSTOOLS.DR_ARCHIVE_LOGSV AS SELECT * FROM SYSTOOLS.DR_ARCHIVE_LOGS00; COMMIT; CREATE ALIAS SYSTOOLS.DR_ICOPY_CATL FOR SYSTOOLS.DR_ICOPY_CATLV; COMMIT; CREATE ALIAS SYSTOOLS.DR_ARCHIVE_LOGS FOR SYSTOOLS.DR_ARCHIVE_LOGSV; COMMIT; /* //*
Sample CLISTs
The sample CLISTs are referred to in CLIST members on page 48. The sample ARYV21 CLIST is shown in Example E-15.
Example: E-15 ARYV21 CLIST /* PROC 0 CLISTLIB(ARY.V2R1M0.SARYSAMP) */ PROC 0 CLISTLI1(SYS1.OS390.CLIST) IF &SYSISPF = ACTIVE THEN + DO WRITE ARYV21 CLIST ERROR: ISPF NOT ACTIVE. EXIT CODE(20) END CONTROL NOMSG FREE FILE(ARYV21) CONTROL MSG ALLOC FILE(ARYV21) DA('&CLISTLI1') SHR REUSE
ALTLIB ACTIVATE APPLICATION(CLIST) FILE(ARYV21) ISPEXEC SELECT CMD(ARYV210) + NEWAPPL(ARY) PASSLIB CONTROL NOMSG ALTLIB DEACTIVATE APPLICATION(CLIST) Appendix E. Sample jobs
303
304
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
(ISPTLIB1 ISPTLIB2 ISPTLIB3) ASIS (ISPLLIB1 ISPLLIB2 ISPLLIB3) ASIS (SCFDD) ASIS (RBRVER USERIND) ASIS
/*CONTROL LIST SYMLIST CONLIST MSG */ CONTROL NOMSG FREE FILE(DB2PARMS) FREE FILE(SYSIN) FREE FILE(SYSOUT) IF &SCFDD GT &Z THEN + FREE FILE(&SCFDD) CONTROL MSG IF &EMCLOAD3 GT &Z && &EMCLOAD2 GT &Z && &EMCLOAD1 GT &Z THEN + ISPEXEC LIBDEF ISPLLIB DATASET ID('&RBRLVL..&LLIB' + '&EMCLOAD1' + '&EMCLOAD2' + '&EMCLOAD3') UNCOND ELSE + IF &EMCLOAD2 GT &Z && &EMCLOAD1 GT &Z THEN + ISPEXEC LIBDEF ISPLLIB DATASET ID('&RBRLVL..&LLIB' + '&EMCLOAD1' + '&EMCLOAD2') UNCOND ELSE + IF &EMCLOAD1 GT &Z THEN + ISPEXEC LIBDEF ISPLLIB DATASET ID('&RBRLVL..&LLIB' + '&EMCLOAD1') UNCOND ELSE + ISPEXEC LIBDEF ISPLLIB DATASET ID('&RBRLVL..&LLIB') UNCOND ISPEXEC LIBDEF ISPMLIB DATASET ID('&RBRLVL..&MLIB') UNCOND ISPEXEC LIBDEF ISPPLIB DATASET ID('&RBRLVL..&PLIB') UNCOND ISPEXEC LIBDEF ISPSLIB DATASET ID('&RBRLVL..&SLIB') UNCOND IF &SCFDD GT &Z THEN + ALLOC FILE(&SCFDD) DUMMY REUSE ISPEXEC VGET (ZUSER ZPREFIX) ASIS IF &ZPREFIX = &Z THEN + SET &TL = &ZUSER ELSE + IF &ZPREFIX ^= &ZUSER THEN + SET &TL = &STR(&ZPREFIX..&ZUSER) ELSE + SET &TL = &ZUSER CONTROL NOMSG NOFLUSH ALLOC F(XX) DA('&TL..RBR0210.ISPTLIB') SHR IF &LASTCC NE 0 THEN DO ALLOC F(XX) DA('&TL..RBR0210.ISPTLIB') SPACE(1 1) DIR(30) + CYLINDERS LRECL(80) BLKSIZE(800) DSORG(PO) RECFM(F B) NEW END FREE F(XX) CONTROL MSG ISPEXEC LIBDEF ISPTLIB DATASET ID('&TL..RBR0210.ISPTLIB') UNCOND ISPEXEC LIBDEF ISPTABL DATASET ID('&TL..RBR0210.ISPTLIB') UNCOND
305
ARY$MAIN ISPEXEC ISPEXEC ISPEXEC ISPEXEC ISPEXEC ISPEXEC LIBDEF LIBDEF LIBDEF LIBDEF LIBDEF LIBDEF ISPLLIB ISPMLIB ISPPLIB ISPSLIB ISPTLIB ISPTABL
306
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
SETUP_UTILITY ( ABEND_ON_ERRORS
Y -\* -\* -\* USER_ABEND_RETURN_CODE 08 -\* -\* -\* -\* RELEASE_HELD_VOLUMES Y -\* -\* -\* -\* PLACE_BKUP_VOLS_ON_HOLD Y -\* -\* -\* -\* CLEAN_OLD_CONSIST_WINDOWS Y -\* -\* -\* -\* -\* CLEAN_OLD_SNAP_SESSIONS N -\* -\* -\* -\* -\* -\* SYNC_ALL_BCV_GENERATIONS N -\* -\* -\* -\* -\* -\* -\* VALIDATE_DB2_VOLUME_SUBTASKS 8 -\* -\* -\* VALIDATE_DB2_VOLUMES A -\* -\* -\* -\* -\* MAKE_READY_NOTREADY_DEVICES Y -\* -\* -\* -\* -\* MAKE_BKUP_VOLS_NOTREADY Y -\* -\* -\* -\* -\* ) Y -\* -\* -\* 08 -\* -\*
(Y)es/(N)o - Utility will *\ abend if any errors are *\ encountered. *\ 01-99 - Error return code *\ if abend on errors is N or*\ user abend code if abend *\ on errors is Y. *\ (Y)es/(N)o - Yes will *\ release held volumes. No *\ will produce an error and *\ end the setup. *\ (Y)es/(N)o - Yes will *\ cause the setup utility to*\ place all future target *\ volumes on hold. *\ (Y)es/(N)o - Yes will *\ clear any non-active *\ consistency windows. *\ No will produce an error *\ and end the setup. *\ (Y)es/(N)o - Yes will *\ clean any non-active snap *\ sessions from the volume. *\ No will cause the setup *\ utility to fail if there *\ are old snap sessions. *\ (Y)es/(N)o - Yes will *\ cause the setup to *\ establish all generations *\ of target BCVs to their *\ source volumes on the very*\ first setup run of a *\ profile. *\ The number of subtasks *\ used to get the volumes in*\ use by DB2. *\ (A)lways/(F)irst *\ Validate DB2 source *\ source volumes on every *\ "SETUP" run or only the *\ first. *\ (Y)es/(N)o - Yes will make*\ not-ready devices ready. *\ No will cause the utility *\ to produce an error if *\ held devices are found. *\ (Y)es/(N)o - Yes will *\ cause setup to place *\ future generations of *\ target volumes in *\ not-ready state. *\
BACKUP_UTILITY ( ABEND_ON_ERRORS
USER_ABEND_RETURN_CODE
(Y)es/(N)o - Utility will *\ abend if any errors are *\ encountered. *\ 01-99 - Error return code *\ if abend on errors is N or*\
307
WAIT_FOR_VOLUME_SYNC
PLACE_BKUP_VOLS_ON_HOLD
RELEASE_HELD_VOLUMES
CLEAN_OLD_CONSIST_WINDOWS
CLEAN_OLD_SNAP_SESSIONS
CONSIST_TIME_OUT_SECONDS
256
BKUP_VALID_ON_CONSIST_FAIL
VALIDATE_DB2_VOLUMES
VALIDATE_DB2_VOLUMES_TIME
VALIDATE_DB2_VOLUME_SUBTASKS
-\* -\* -\* -\* -\* -\* -\* -\* -\* -\* -\* -\* -\* -\* -\* -\* -\* -\* -\* -\* -\* -\* -\* -\* -\* -\* -\* -\* -\* -\* -\* -\* -\* -\* -\* -\* -\* -\* -\* -\* -\* -\* -\* -\* -\* -\* -\* -\* -\* -\* -\* -\* -\* -\* -\* -\* -\* -\* -\* -\*
user abend code if abend *\ on errors is Y. *\ (P)rompt/(Y)es/(N)o *\ Controls what the utility *\ will do if any target BCVs*\ have not synchronized to *\ their source volumes at *\ the time of backup. *\ Prompt will issue a WTOR, *\ Yes will automatically *\ wait for sync. No will *\ cause utility to stop an *\ error return code. *\ (Y)es/(N)o - Yes will *\ cause the backup utility *\ to place backup volumes *\ on hold. *\ (Y)es/(N)o - Yes will *\ release the next *\ generation of target vols.*\ N will produce an error *\ if the next generation of *\ target volumes is held. *\ (Y)es/(N)o - Yes will *\ clear any non-active *\ consistency windows. *\ No will produce an error *\ and end the backup. *\ (Y)es/(N)o - Yes will *\ clean any non-active snap *\ sessions from the volume. *\ No will cause the backup *\ utility to fail if there *\ are old snap sessions. *\ 01-256 - Max number of *\ seconds to suspend I/O on *\ Standard volumes durning *\ backup. *\ (Y)es/(N)o - If Yes, *\ backup will still be *\ registered if consistent *\ window can not be obtained*\ or window is closed before*\ split/snap completed. *\ Prof/Always/Daily/Weekly *\ Controls when the utility *\ will determine the list *\ of volumes in use by DB2. *\ (P) will honor the profile*\ setting. (A) for always. *\ (D) for Daily. (W) for *\ weekly. *\ Only P currently supported*\ (B)efore/(A)fter - DB2 *\ volume validation can be *\ before or after the backup*\ is taken. *\ Only B currently supported*\ The number of subtasks *\ used to get the volumes in*\
308
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
-\* WAIT_FOR_VOL_OFFLINE_SECONDS 05 -\* -\* WAIT_FOR_VOL_OFFLINE_RETRIES 99 -\* -\* -\* MAKE_READY_NOTREADY_DEVICES Y -\* -\* -\* -\* -\* MAKE_BKUP_VOLS_NOTREADY Y -\* -\* -\* RESET_COPY_PENDING_TS N -\* -\* -\* -\* -\* -\* RESET_COPY_PENDING_IX N -\* -\* -\* -\* -\* -\* ALLOW_SHARED_TARGET_VOLUMES N -\* -\* -\* -\* ) SNAP_GLOBAL_PARAMETERS ( MAX_RETURN_CODE SNAP_WAIT SNAP_WAIT_HOURS SNAP_WAIT_MINUTES SNAP_WAIT_SECONDS MAX_ADRDSSU MAX_TASKS1 MAX_TASKS2 DEBUG_MODE DEBUG_EXTENTS TOLERATE_ENQ_FAILURES COPY_VOLUME_ID PHASED_SNAP
use by DB2. *\ The nbr of seconds to wait*\ for a volume to go offline*\ The nbr of retries while *\ waiting for a volume to go*\ offline. *\ (Y)es/(N)o - Yes will make*\ not-ready devices ready. *\ No will cause the utility *\ to produce an error if *\ held devices are found. *\ (Y)es/(N)o - Yes will *\ cause backup volumes to be*\ made not-ready. *\ (Y)es/(N)o - Yes will *\ cause all tablespaces *\ to be reset so they are *\ no longer in copy pending *\ status after a system *\ backup. *\ (Y)es/(N)o - Yes will *\ cause all indexspaces *\ to be reset so they are *\ no longer in copy pending *\ status after a system *\ backup. *\ (Y)es/(N)o - Yes will *\ allow Snap or Flash target*\ volumes to be shared among*\ different backup profiles.*\
SNAP_GROUP_PDS WAIT_FOR_BACKGROUND_COPY
) BCV_SPLIT_PARAMETERS ( BCV_WAIT_SECONDS
-\* Only for Snap Backups *\ -\* "/" Indicates EMC Default *\ / -\* 4/8/12/# *\ Y -\* (Y)es/(N)o *\ 00 -\* Hours on Wait Yes *\ 02 -\* Minutes on Wait Yes *\ 30 -\* Seconds on Wait Yes *\ / -\* Maximum SNAP address space*\ / -\* Maximum SNAP tasks *\ / -\* Maximum SNAP activities *\ / -\* All/Trace/Dump/Error/Xtra *\ / -\* Yes/No *\ / -\* Yes/No *\ Y -\* Yes/No *\ N -\* Use phased Snap *\ -\* Yes will cause each snap *\ -\* profile created to use *\ -\* the "phased snap" method. *\ dataset.name.of.pds N -\* Wait for the background *\ -\* snaps to complete before *\ -\* letting the job complete *\ -\* 06 -\* -\* -\* Only for BCV type Backups *\ 01-99 - The nbr of seconds*\ to wait between each check*\ for BCV split completion *\
309
99 -\* 01-99 The Nbr of times to *\ -\* check for split completion*\ -
N -\* -\* -\* USER_ABEND_RETURN_CODE 08 -\* -\* -\* -\* WAIT_FOR_VOL_OFFLINE_SECONDS 06 -\* -\* WAIT_FOR_VOL_OFFLINE_RETRIES 99 -\* -\* -\* WAIT_FOR_VOL_ONLINE_SECONDS 06 -\* -\* WAIT_FOR_VOL_ONLINE_RETRIES 99 -\* -\* -\* CLEAN_OLD_SNAP_SESSIONS Y -\* -\* -\* -\* -\* -\* FORCE_SPLIT N -\* -\* -\* -\* -\* -\* PERFORM_CHECKSUM N -\* -\* -\* -\* -\* DB2_UTILITY_SUITE_INSTALLED Y -\* -\* -\* -\* -\* -\* ) N -\* -\* -\* 08 -\* -\* -\* -\* ZZ -\* -\* -\*
(Y)es/(N)o - Utility will *\ abend if any errors are *\ encountered. *\ 01-99 - Error return code *\ if abend on errors is N or*\ user abend code if abend *\ on errors is Y. *\ The nbr of seconds to wait*\ for a volume to go offline*\ The nbr of retries while *\ waiting for a volume to go*\ offline. *\ The nbr of seconds to wait*\ for a volume to go online *\ The nbr of retries while *\ waiting for a volume to go*\ online. *\ (Y)es/(N)o - Yes will *\ clean any non-active snap *\ sessions from the volume. *\ No will cause the restore *\ utility to fail if there *\ are old snap sessions. *\ (Y)es/(N)o - For BCV type *\ profiles, the current BCV *\ generation will be split *\ before the restore. Yes *\ will add the force parm *\ to the split call. *\ (Y)es/(N)o - Perform check*\ sum operation on restored *\ volume to ensure it has *\ not been altered since *\ backup. *\ (Y)es/(N)o - Yes means *\ that the DB2 V8 System *\ Restore Utility is *\ available for recovery. *\ No means that Recover *\ Utility will be invoked. *\
OFFLOAD_UTILITY ( ABEND_ON_ERRORS
USER_ABEND_RETURN_CODE
CLIP_PREFIX
(Y)es/(N)o - Utility will *\ abend if any errors are *\ encountered. *\ 01-99 - Error return code *\ if abend on errors is N or*\ user abend code if abend *\ on errors is Y. *\ The prefix to use when *\ clipping volsers during *\ offload processing. *\
310
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
Related publications
The publications listed in this section are considered particularly suitable for a more detailed discussion of the topics covered in this book.
IBM Redbooks
For information about ordering these publications, see How to get Redbooks on page 312. Note that some of the documents referenced here may be available in softcopy only. IBM DB2 Recovery Expert for z/OS User Scenarios, SG24-7226 Disaster Recovery with DB2 UDB for z/OS, SG24-6370 DB2 9 for z/OS Technical Overview, SG24-7330 DB2 UDB for z/OS Version 8: Everything You Ever Wanted to Know... and More, SG24-6079 DFSMShsm Fast Replication Technical Guide, SG24-7069 DB2 UDB for z/OS V8: Through the Looking Glass and What SAP Found There, SG24-7088
Other publications
These publications are also relevant as further information sources: DB2 Recovery Expert for z/OS Users Guide Version 2 Release 1, SC19-1222-00 DB2 Version 9.1 for z/OS Administration Guide, SC18-9840-02 DB2 Version 9.1 for z/OS Utility Guide and Reference, SC18-9855-02 z/OS V1R9.0 DFSMSdfp Storage Administration Reference, SC26-7402-08 z/OS V1R9.0 MVS System Commands, SA22-7627-16 Program Directory for IBM DB2 Recovery Expert for z/OS V2.1, GI10-8764-00
Online resources
These Web sites are also relevant as further information sources: Recovery Expert Web site http://www.ibm.com/software/data/db2imstools/db2tools/db2re-zos/
311
312
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
Index
A
abend 307 active log 7, 55, 152, 154, 186, 227 data 56, 66, 154 data set 60 information 88 log records 242 agent 8, 19, 27, 41, 86 instance 8, 41 agent configuration file 41, 4344 agent-listener-port 28 Alias, D-Dataset (A-ADD) 57, 104 allocation default 266 ALLX ALLD 233 ANTRQST macro 213 ARC0640I ARCFRTM 85, 233 Architecture 10 architecture 3, 7, 911 archive log 55, 153, 185186 copy 1 156 copy 2 156 fully qualified name 155 newly created copies 159 ARY product 264 ARY#DATA DD 160, 188 ARY.BREP ORT 25, 47, 111, 160, 179, 267 ARY.DB2PARMS.CONT ROL 30, 42, 77, 102, 160, 179 ARY.OBJE CTS 29, 47, 298 ARY.OFFO PTS 25, 47, 111, 160, 179, 282 ARY.PROF ILES 25, 46, 111, 160, 179, 267 ARY.SG7606.MOVD ATA 30, 47, 299 ARY.SYSB ACK 25, 46, 111, 160, 179, 267 ARY.SYSBACK.SSID S 25, 47, 111, 160, 179, 267 ARY.V2R1 M0 25, 264 ARY.V2R1M0.SARY Load 30, 42, 77, 111, 160, 179, 300 ARY.V2R1M0.SARY Menu 25, 264 ARY.V2R1M0.SARY SAMP 25, 111, 179, 267 library 248 member ARYSJ002 249 ARYEMAC1 CLIST 22 ARYMOVER member 47 sample JCL 47 ARYREPO member 47, 294 sample JCL 47 ARYV210 CLIST 25, 47, 201 ARYV210 CLISTs DD name 25 automated recovery 4 Automation Tool 45, 12, 14, 1920, 23, 34, 40, 126, 158, 201, 249 238239, 241 backup xvii, 4, 11, 18, 39, 44, 51, 5354, 84, 125126, 153155, 173174, 209, 211, 215217, 221224, 226, 232233, 235, 237 backup and recovery xvii, 83, 104, 153, 221, 224 backup control data set 222, 225 backup profile 6, 30, 80, 100, 134, 148, 174, 200, 309 default value 32 validated information 111 Backup Summary Report 112, 182 BACKUP SYSTEM 57, 1415, 53, 56, 84, 139, 173174, 201, 224225, 227230, 232, 234235, 239, 241 DATA ONLY 230231 FULL 225, 230, 232 BACKUP System 84, 205, 224 backup resources 113 I/O load 242 job output 85 backup version 84, 221 batch job 65, 154, 179, 204 control cars 69 second step 189 BCDS 222, 225 BLKSIZE 160, 188 boot strap data set 7, 55, 85, 159, 189, 228 boot strap data set (BSDS) 85 BOTH 84, 210, 212215, 218, 228, 234235, 257, 261 BSDS 7, 42, 5456, 85, 152156, 189, 222, 224225, 227229, 236 list 62, 80, 90, 154, 161 BSDS information 103, 169 BUFFERPOOL BP0 302
C
CACHE 240 CAPTURE PROFILES 249 catalog 45, 78, 23, 27, 35, 54, 57, 97, 106, 152153, 186, 224, 227, 239, 248 and directory 7, 61, 164, 171, 192, 224 CF 95, 120 Change Log Inventory 226, 237 CHARACTER CONVERSION Technique 26, 266 check pending 246 CHKP 246 CICS 152, 154, 172 client-listener-port 28, 41 CLIST member 31, 48 CLUSTER 69, 72, 166, 194 Cmd line Type D 131 Type R 131 Type V 131
B
background copy 212213, 216218 BACKUP 67, 15, 51, 5355, 174, 216218, 224, Copyright IBM Corp. 2008. All rights reserved.
313
conditional restart 94, 96, 98, 168, 170, 195 conditional restart control record 84, 94, 226, 234 conditional restart control record (CRCR) 226 configuration file 2728, 41, 202 Consistency Group 219220 control card 72, 111, 161, 184 control data set 222, 225, 249 control record (CRCR) 84, 163, 196, 226 control statement 24, 42, 137, 230, 264 complete listing 267 detailed listing 43 COPY 85, 153155, 210, 212214, 216224, 228, 230235, 238239, 242, 255 copy 78, 12, 14, 22, 24, 29, 56, 84, 125, 151, 154, 176177, 200, 210212, 248, 266 pools 56, 84, 205, 221222 COPY FULL INDDNAME 216 INDYNAM 215 operation 214 copy pool current version 243 FAST REPLICATION BACKUP 234 FAST REPLICATION RECOVERY 99 new version 243 REPLICATION BACKUP 232 REPLICATION RECOVERY 238 RUNLIB and DSNEXIT libraries 205 separate ICF catalogs 225 copy pool (CP) 56, 84, 97, 205, 221 copy pools 56, 59 COPYP 31, 100 COPYPOOL 8486, 225, 231232, 234, 237, 241242 copypool 238, 243245 COPYTOCOPY 153, 155 COPYVOLID parameter 214, 217 COUNT 97, 226 Coupling Facility 235 CRCR 9394, 163, 191, 226 CRCR record 114, 168 creation time 248 CYCLE 215, 217
D
DASD 53 data consistency 154, 228, 245246 data set 22, 5354, 84, 93, 126, 134, 173174, 203, 221 names 177 data set creation 228 data sharing xvii, 56, 24, 3940, 51, 5455, 57, 84, 87, 93, 156, 185, 202, 224, 226228, 234236 environment xvii, 5, 3940, 44, 75, 84, 93, 190, 196, 202 group 8, 4042, 45, 51, 5557, 94, 99, 117, 156, 185, 205, 224, 227, 235 subsystem xvii, 42, 51, 55, 57, 59, 84, 99, 165, 204, 224, 227, 235 database xvii, 4, 8, 23, 34, 66, 8485, 98, 126, 128129, 204, 224225, 248 database copy pool 8485, 94, 98, 224225, 228,
234236 DATABASE Name 254 data-partitioned secondary index (DPSI) 251 dataset name 24, 110 alias 306 specification 178 DATE 90, 116, 137, 152154, 183, 227, 231232, 255 DB2 9 6, 21, 39, 51, 84, 129, 201, 209 buffer default 245 DB2 authorization 25, 265 DB2 BACKUP 57, 83, 232 System 57, 100 DB2 Catalogue VSAM clusters 192 DB2 catalogue 54, 154, 191 Image copies 154 VSAM clusters 164 DB2 data 4, 54, 84, 151 catalogue 66 ICF catalogs 98 new ICF user catalogs 62 non-DB2 data 100 set 54, 163 DB2 data sharing 5657 DB2 environment 45, 51, 152, 221, 253 copy pools 225 DB2 log data 58 DB2 member 94, 163, 191 DB2 object data set 56, 196 datasets 30 level 211 type 48 DB2 Recovery Expert 34, 17, 54, 139, 151, 200, 239 agent 29 client component 27 configuration information 24 end user 20 GUI component 19 image copies 34 ISPF interface 32 load library 19 object 34 package 20 plan 34 privilege 34 server 19, 27 Services component 4 successful migration 32 System Backup 29 user ID authority 20 V1.1 11, 32 V2.1 1, 4 DB2 space 163, 191 DB2 SSID 25, 264 DB2 Subsystem DSNZPARM member 135 DB2 subsystem 7, 15, 22, 40, 51, 54, 81, 84, 88, 127, 149, 151, 175, 203, 208209, 248
314
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
application table spaces 164 displays information 7 RBA information 37 Sample SYSIN card 35 SYSPITR CRCR 120 DB2 System 106, 139, 151, 202, 224 DB2 system level backup 102, 109, 126 DB2 table space 57 DB2 utility DSNJU003 118 DB2 V8 5, 39, 57, 84, 126, 209 Recovery Expert 126 DB2 Version 7 5, 18, 204 8 18 9 5 9 product support information 18 9.1 18, 139, 149, 151 DB2 version 99, 193, 201 DB2 z/OS 111, 182183 Backup Summary Report Utility 84 Backup Volume Detail Report 112 Recovery Expert 112 Volume Offload Detail Report 184 DB2PARMS DD DISP 77, 111, 160, 179 DB9C9.SDSN Exit 85, 168, 183, 286 DB9C9.SDSN Load 85, 160, 179, 286 DB9CL.D9C1.BSDS 01 165, 194 DBACRVW 20 DBD01 85, 163, 227230, 234235 DBM1 245246 DBRM 162, 251, 259 DBRM Name 259 DD DISP 85, 160, 179 DD SYSOUT 94, 160, 179, 300 D-Dataset Display 57, 104 DDL 12, 2223, 48, 248 DDL member 34 dependent object 5 dependent writes 219220 DFSMS 66, 211, 221222 DFSMSdss 66, 153, 182, 184, 213214 COPYVOLID 215 FCNOCOPY 217 FCWITHDRAW 217 DFSMShsm 66, 84, 173174, 221222, 224225, 227231, 233235, 238, 243 DFSMShsm Fast Replication associate 243 backup 227 function 221 Technical Guide 221 DGSF 300 directory 7, 54, 56, 61, 152153, 192, 224, 227, 239 disaster 81, 149, 151154, 185, 242 disaster recovery xvii, 7, 10, 12, 48, 51, 8182, 149, 151153, 155, 185, 193, 213, 217, 228, 242 proper settings 170
Disaster Recovery (DR) 20, 44, 48, 81, 149, 155, 180, 201, 209 Disaster Recovery Profile Disaster Recovery Method 185 Disaster recovery profile 101, 158, 180, 185 disaster recovery solution 149 disk space (DS) 240 dropped object 4, 204, 248, 253 DSN strict naming convention 225 DSN PREFIX maximum length 265 DSN1COPY 13 DSN1LOGP 227 DSN1PRNT 227 DSNJ139I 154155 DSNJCNVB 195 DSNJU003 84, 94, 155, 163, 168, 191, 226, 234235, 237 DSNJU004 85, 90, 154155, 163, 169, 191, 226 DSNTIP6 239240 DSNU1602I 232 DSNUTILB 98, 120, 163, 191 DSNUVBBD - BACKUP (DB) 85, 225 DSNZPARM 20, 25, 103, 196, 239 DUMMY Record 294 DUMP 215, 241 dump classes 241 DUMP FULL 216, 218 DUMPCOND FR 85, 233 DUMPCONDITIONING 215217 DUMPCONDITIONING parameter 215 DUMPONLY 241
E
ELB 219 EMCLOAD1 GT 305 end command 64, 101, 135, 157, 176 ENDING AT 86, 233234 ENDLRSN 168, 226 ENDRBA 226 Enterprise Storage Server 84, 209 environment 207 data sharing 5, 3940, 85, 196, 202 non-data sharing 5, 3940, 45 environment configuration 40 ESS Copy Service 210 Services Web user interface 211 ESS FlashCopy 221 EXISTS 211, 217, 225 EXPIRATION Date 177, 267 Extended Long Busy 219 extended long busy (ELB) 220
F
FACILITY class 19 Fast Log Apply 94, 234 fast log apply function 245
Index
315
fast replication 7, 24, 84, 98, 221222, 224, 227, 230233, 238 fast replication services 227 FCNOCOPY parameter 217 FCWITHDRAW parameter 217 File tailoring work (FTW) 266 FLA 234 FlashCopy 6, 18, 51, 126, 210, 212215, 217221, 223, 228, 238, 242 background copy 211212 DFSMSdss 211, 215 persistent relationship 213, 218 FlashCopy relationship 210 source volume 212 FlashCopy target 214 FlashCopy V1 18, 210 FlashCopy V2 210 FlashCopy Version 2 242 FRBACKUP 221, 224, 232233, 243 FRDELETE 221 freeze FlashCopy consistency group 219 FRRECOV 84, 221, 234 full image copy 139 full system backup 18, 228230, 234 FUNCTION RC 85, 232
G
GDG base 31, 47, 300 GDG dataset 30 generated recovery plan Relative cost evaluation 20 generated SQL 206 generations 243 geographically distributed 9 grants 23 granularity 4 graphical user interface (GUI) 1, 4, 18, 85, 253 Grouper 23, 25, 34, 265 GUI (graphical user interface) 4 GUI client 8, 27, 200
IDCAMS 24, 65, 163, 191 IDCAMS input 65 IDCAMS step 163, 191 Image copy 34, 81, 134, 151, 157, 185186, 203, 239 Option 157, 186 output data 270 image copy 239, 246 catalog entries 186 Catalog x days 157 DB2 objects 171 imagecopy 138 IMS xvii, 152, 154, 172 incommit 154 Incremental FlashCopy 218 incremental FlashCopy 218, 238, 243244 incremental image copy 243 indoubt URs 235 in-flight 96, 245 inflight 84, 154, 234 insert 163, 191 INSTALLATION Exit 85, 233 installed SBRS product control file 48 integrated catalog facility (ICF) 153 Interactive Storage Management Facility 224 Interactive System Management Facility (ISMF) 222 Internal Resource Lock Manager (IRLM) 4 interproduct communication 265 IRLM (Internal Resource Lock Manager) 4 is defined (ID) 19, 127 ISMF 222, 224 ISP 216 ISPEXEC LIBDEF 305 ISPTABL 305 ISPF component 20, 39, 45, 200 ISPF interface 1, 6, 11, 30, 81, 100, 125, 147, 189, 200, 207 DB2 Recovery Expert 32 LOB table spaces 202 new features 32 object level recovery 147 ISPLLIB (ID) 265
H
header page 85, 227 high-level qualifier 19, 54, 68 host name 41, 4344
J
JCL (job control language) 4 job ARYSJ001 32, 42 Job Control Language (JCL) 21, 47, 57, 85, 133, 158, 183, 203, 249 job control language (JCL) 4 job D9C1 164, 192 JOBPARM SYSAFF 77, 110, 160, 183
I
I/O activity 219 IBM DB2 Recovery Expert 3, 18, 40, 80, 99, 266 Expert server 49 ICF catalog 97, 154, 162 ICF Catalogs Volume 97 ICF user catalogue 7, 5354, 100 IDC0001I Function 194 IDC0550I Entry 194
L
LABEL FILE Number 267 last analysis 57, 104 launchpad 87 LIMIT BACKOUT 149 Line Cmds 57, 104 line command 57, 130
316
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
list 223, 239 LISTDEF 239 LOAD 22, 25, 239, 264 LOB 251 local site 135, 149, 153, 155, 174, 217 DR DSNZPARMS member 170 location name 66, 225, 227 log analysis 4, 13, 15, 204, 252, 265 log data sets 7, 54, 58, 60, 154, 194 LOG NO events 94, 234 log RBA 204 log record sequence number (LRSN) 98, 135, 246 Log truncation point 84, 226, 234237 log truncation point 94, 226 LOGAPPLY 245246 logical partition (LPAR) 8 LOGONLY option 191, 236 logs 7, 5355, 8485, 147, 151, 185, 205, 221, 224 LPAR 8, 10, 2223, 4041, 45, 77, 157, 201 LPAR (logical partition) 8 LPAR SC59 43 Recovery Expert Agent 59 43 single non-data sharing environment 46 LPARs multiple subsystems 27 LPARs SC53 41 DB2 subsystems 41 Recovery Expert Agent 59 49 sysplex environment 46 LRSN 6, 12, 90, 96, 125, 135, 225228, 230 LRSN (log record sequence number) 246
Object 5, 13, 18, 20, 75, 81, 101, 112, 126, 180, 238239 object definition 8, 248 object definition level 248, 254 object dependencies 4 Object Profile 14, 20, 30, 81, 126, 201 object profiles 4, 12, 14, 19, 40, 81, 251 Object Recovery 6, 12, 126, 200 Object-level recovery 29, 239 object-level recovery recovery base 29 offload option 108, 174, 205 Offload process 184 OMVS segment 19 Online REORG 228 options 46, 8, 1314, 30, 65, 69, 72, 83, 85, 125, 130131, 153, 158, 173, 201, 218, 228, 237, 240, 250, 264 ORDER 153154, 211, 214, 218, 220, 224 OW57347 214
P
package 251 parmlib member 49 PARTITION 9596 partition by growth (PBG) 206 partitioning index 251 PDS 23, 93, 134, 158, 189, 264 PDS member 42, 300 performance xvii, 23, 207, 224, 241 fast log apply function 245 PERMIT 19 persistent FlashCopy relationship 211, 213 PIT (point-in-time) 4 PITR 227 PK23288 147, 208 PK29628 208 PK49366 208 PK51979 84, 98, 208, 234 PK53379 207 PK55713 207208 PK55821 207 PK57092 207 PK57163 207 PK57183 207 PK58428 207 PK58430 207 PK58431 207 PK58433 207 PK58434 207 PK58928 207 PK58945 207 PK59664 208 PK59666 208 PK59675 120, 196, 208 PK60078 207 PK60696 208 PK60716 208 PK60786 208 PK60788 208 Index
M
main features 1, 35 maintenance 207 master 65 member ARY 31 members D9C1 41 messages 99, 170, 232, 237238 metadata structure 212 M-Move BSDS 59, 105 MODIFY 97 MVS user catalogue 54, 57, 104
N
nbr 181, 309 next substeps 167 NFM 5, 226, 228 non-data sharing environment 5, 39, 4546 subsystem 43 non-DB2 data 58, 100, 104 non-partitioned secondary index (NPSI) 251 NOVTOCENQ 226
O
OA06196 214 OA17314 243
317
PK61814 208 PK61889 207208 PK62088 208 PK62568 208 PK62742 208 PK62922 208 PK62974 208 PK63692 208 plans 13, 20, 2324, 40, 92, 252, 264 Point-In-Time 51, 210, 218219, 224 point-in-time recovery 221, 245 point-in-time (PIT) 4, 210, 248 point-in-time recovery 226, 254 point 245 port number 41, 4344 PPRC 210, 214 prefix generation 264 Press PF3 128 PRIMARY QTY 26, 266 Print Log Map 226 Print Log Map utility 153 prior point in time 227, 235 privileges 20, 23, 251 PROC 0 CLISTLI1 303 RBRLVL 304 PRODUCT CFG 25, 264 product control file 24, 4142, 44, 200, 202, 279 product libraries 249 PRODUCT VER 25, 264 Profile Name D9C1 107 field 131 pruning SLR 253
Q
QT OWNER/NAME 265 QUALIFIER 255, 257 QUIESCE 154, 227, 245246 quiesce point 81, 139, 147148, 154, 253254 QUIET TIME REPORT/CAPTURE JCL 269 quiet time 45, 204, 245, 250, 254, 257, 265
R
RACF 19, 233234 RACF profile 19 RALTER Program 19 RBA 6, 12, 88, 91, 125, 135, 155, 181, 222, 225226, 228, 230, 246 RBA capture utility 32, 47, 200, 299 Sample job 300 RBA information 32, 47, 204, 299 RBA/LRSN 6, 44, 98, 112, 114, 135, 137138, 181, 200 RBDP 94, 234235 RBLP 85, 227228, 230, 234235 RBR Device 267 read-write (RW) 163, 191
Real 239 REBUILD 136, 171, 227, 237 INDEX 136, 237 pending 237 REBUILD INDEX 136, 237 RECOVER 13, 25, 29, 51, 96, 136, 139, 151, 153, 162163, 171, 200, 221222, 224, 226227, 234, 236237, 239, 242, 245246, 255, 265 recovery xvii, 4, 12, 18, 20, 3940, 44, 81, 8384, 125, 149, 151, 200, 210, 217, 248 function 4, 8, 224, 245 history events 204 method 4, 81, 109, 154, 242 object xvii, 4, 12, 20, 125126, 158, 170, 201, 239 objects to current 81 plan 13, 153, 204 plan generation 204 point 4, 47, 81, 85, 139, 154, 181, 200, 221, 248 process 138139, 158, 185, 224, 235 scenario 126, 148, 153 type 13, 136, 221 recovery action 248 recovery base log point 227 recovery base log point (RBLP) 85 Recovery Expert 34, 17, 39, 51, 54, 125, 149, 173, 199, 247 agent 41 Agent 63 configuration file 43 Agent 63 reference 43 Agent 64 configuration file 44 Agent 64 reference 44 backup 99 BACKUP SYSTEM 112 client 203 component 56 configuration 40 control 24 control file 35 DB2 object 23 GUI 122 GUI client 40 GUI portion 99 ISPF components 48 job 120 JOB1 94 object 23 Object recovery 12 offload 24 perspective 58 privilege 34 product 85 product control 24 product control file 43, 46 program 163, 191 program ARy 191 server 7, 41, 44, 206 SLBRS Repository 116 store 80, 104 system backup 12 System Level 94, 121
318
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
System Level Backup 100 tool 44, 255 v1.1 32, 205 V2 Client/Server component 204 V2.1 4, 20, 126, 207 verifie 148 VSAM file 191 Recovery Expert for z/OS agent 8, 27 environment configuration 40 GUI client 14, 27, 254 main features 4 Recovery Expert Server 7, 41 recovery option 13, 126, 201 Recovery plan 13, 267 recovery point 15, 113, 135, 181, 224 last copy 239 recovery site 135, 151, 176 archive logs 154 DB2 spaces 164 image copies 164 necessary settings 170 RECP 94, 234235 Redbooks Web site 312 Contact us xix redo SQL 13, 204 REGION 4243, 7677, 111, 118, 133, 160, 179 relative byte address (RBA) 91, 137 remote copy 149 remote recovery 173 Remote site 4, 7, 81, 152, 158, 173, 201, 210 remote site archive logs 162 DB2 knowledge 152 DB2 subsystem 159 DSNZPARMs setting 196 recovery 5, 149, 155 recovery service 7 rename 56, 59, 131 REORG 228, 239, 253 REPLY Y 96, 191 REPORT 2526, 42, 191, 265 report 30, 103, 113, 154155, 183 repository name 265 REPRO 69, 72, 163, 191 requirements 211, 243 RESET 219, 226, 235, 237 RESET_COPY_PENDING_IX 100, 309 RESET_COPY_PENDING_TS 100, 309 RESTART 96, 169, 191, 227 restart 84, 88, 94, 154, 164, 168, 226, 228, 234, 237 RESTORE 67, 29, 51, 5354, 152153, 155, 163, 181, 215217, 227, 237238, 240, 242, 255 RESTORE SYSTEM 46, 14, 5354, 8485, 173, 191, 196, 201, 208, 224226, 228, 234238, 240 Example 237 Execution 237 LOGONLY 120, 234236 Operation 228
RESTOREBEFORE 239, 246 RETENTION Period 177, 267 RETURN Code 85, 160, 232, 249 Row 1 57, 104, 127, 175 RUNSTATS 240, 253 RW mode 170, 196
S
SAMP 42, 267 Sample JCL 47, 249, 299 Sample job 263 Sample statement 264 saved specification 252 SBOX7I D807 112, 182 SBOX7J D907 112, 182 SBRS 10, 80 SBRS CLIST 36 SBRS repository 10, 46, 113 SCA 85, 95, 228 scenarios xvii, 4, 40, 46, 125126, 234, 238, 263 SCFDD GT 305 SCHEMA 25, 254 schema 8, 15, 27, 3435, 51, 247, 265 name 248 Schema Level Repository 27, 43, 201, 248 schema level 264 repository data 272 schema level repository data 268 Schema Level Repository (SLR) 43 schema level repository (SLR) 5, 8, 247249 database 253 maintenance 253 objects 248 tables 248, 250, 254 update 248249, 254 SCRATCH Limit 300 SDSNEXIT 19, 160, 179 SECONDARY QTY 26, 266 server-address 27, 35, 41, 43 server-address space 37 Services CLIST 48 Services subsystem (SS) 32 SET 25, 65, 8586, 154, 156, 165, 186, 210, 214215, 218, 220223, 225, 227228, 233 SET LOG RESUME 227, 235 SET LOG SUSPEND 227, 235 SEVERAL OTHERS (SO) 254 Share Option 108, 130, 157, 175 Shared Communications Area (SCA) 95 shared DASD product control file 48 SHR,LABEL (SL) 216 Single LPAR 10, 26 single LPAR managing multiple DB2 subsystems 26 site failures 4 SLR 5, 8 SLR (schema level repository) 8 Index
319
SLR table 27, 250 PACKAGES information 259 referential constraint information 260 SLR update performance 208 utility 253 SMS DATA Class 266 SMS MANAGEMENT Class 266 SMS STORAGE Class 55, 68, 266 SORTDEVT 171 source volume 6, 80, 112, 182, 211, 307 exact size 223 identical copy 214 large number 219 volume serial number 214 specifications 80, 157, 176, 261 SSID 22, 25, 42, 57, 59, 103104, 127, 156, 175, 225, 249 START DATABASE 226 START DB2 84, 196 STARTRBA 226 STOGROUP Name 257 STOGROUP STGX 302 Stop DB2 235 storage group 40, 56, 221222, 252, 301 new type 222 Storage Management Subsystem (SMS) 84 Structured Query Language (SQL) 253 structures 95, 196, 218219, 235 subsystem xvii, 46, 12, 14, 1819, 4143, 51, 53, 84, 87, 126, 151, 173174, 210, 217, 224, 248, 264 data sharing 42, 55, 60, 94, 113, 205 recovery 44, 51, 81, 113, 126, 135, 151, 159, 181, 217, 224, 234, 245 suspend 227228, 235 synchronizing data and DDL 253 synonyms 251 SYSADM 20, 98, 196 SYSCOPY 136, 163, 239, 251, 255 SYSIN 24, 42, 77, 165, 215218, 230, 232, 236237 SYSIN card 24 SYSPITR 9394, 195, 225226, 237 SYSPITR CRCR 84, 94, 98, 226, 234236 SYSPITR LRSN 118 sysplex 9, 41 SYSPRINT 4243, 77, 94, 98, 165, 215218 SYSPRINT DD SYSOUT 78, 118, 166, 300 SYSPROC library 22 System Backup local site 163 system backup 5, 21, 24, 46, 56, 80, 100, 133, 156, 173, 200, 228, 267 System Backup and Restore Services 53, 80, 99100 system backup and restore services 8 system catalog 45, 8, 23, 35, 75, 171, 249 System checkpoints 228 SYSTEM JCL 85 SYSTEM job 86, 230 system level point in time recovery 226, 236 RESTORE SYSTEM 236
system services 8 SYSTEM Utility 4, 53, 84, 173, 208, 224 system-level backup 29, 81, 139, 239
T
table creation 228 TABLE Creator 256 TABLE Name 256 table space 57, 140, 170, 196, 202 TABLESPACE Name 254 tablespaces 128 target volume 7, 80, 175, 204, 210, 307 not-yet-copied track 213 VTOC index names 215 TASKID 001 85, 233 TASKID 002 85, 233 TCP/IP 8 TEXT 207208 TIME 84, 95, 137, 152155, 183, 210, 212214, 218219, 222, 224225, 227, 230231, 234237, 257 Time of Day (TOD) 225 TIMESTAMP 96, 258 timestamp 6, 90, 200, 254 TOKEN 8586, 224225, 231, 237 tracker site 149
U
UCAT.DB8G Data 63 UCAT.DB8G Log 55 UCAT.DB9C Data 97 UCAT.TOTD DL 57 UDF (user-defined function) 253 UK30484 207 UK31997 98, 208 UK32857 207208 UK33508 207 UK33601 207 UK34785 208 UK35022 208 UK35487 208 UK35488 208 UK35495 208 undo 204 UNICODE UT-16 26, 266 UNIQUE 222, 225 units of recovery (UR) 245 UNIX System Services 19 UPDATE IPC IPC_RBR 12, 24, 203, 267 UPDATE LAS DATA AUNIT 26, 266 UPDATE LAS DATA PQTY 26, 266 UPDATE LAS DATA SQTY 26, 266 UPDATE LAS INDEX AUNIT 26, 266 UPDATE LAS INDEX PQTY 26, 266 UPDATE LAS INDEX SQTY 26, 266 UPDATE LAS VOLSERS 26, 266 UPDATE RBR BKUP OBJS 25, 267 BKUP SSID 26, 267
320
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
BKUP VOLS 25, 267 CATS REPO 25, 267 Device 24 EMC LOAD1 24, 267 EMC LOAD2 24, 267 EMC LOAD3 24, 267 EMC LOAD4 24, 267 FDR LOAD1 24, 267 FDR LOAD2 24, 267 MAPS REPO 25, 267 OFFLD REPO 25, 267 PARMLIB MBR 25, 267 PROF REPO 25, 267 REPORT REPO 267 SYSBK REPO 25, 267 uppercase 28 USAGE 252 User ID 20, 178 user id 19, 131, 170, 196, 265 user-defined function (UDF) 252253 Utility RESTART 226
file 186, 201 V-View Alias 57, 104 V-Volume List 59, 105
X
XRC 214
Z
z/OS xvii, 3, 17, 54, 62, 65, 84, 151, 182, 209, 211, 221, 224, 227, 235, 237238, 243 z/OS component 266 z/OS User 5, 18, 81, 200 DB2 Recovery Expert 203 IBM DB2 Recovery Expert 81 manual DB2 Recovery Expert 18 z/OS V1R3 235 zSeries 210, 214, 221
V
Valid Primary Cmds 57, 104 validate 103, 109, 111, 224 option 109 Version 45, 18, 4041, 45, 84, 111, 151, 182, 210211, 221, 231, 235237, 243 version 5, 12, 19, 23, 39, 85, 98, 200, 222, 228, 236237, 248, 254 Version 02.01.013 112, 184 17 17 42 ARYS162I 184 ARYS162I 111 Version 1.1 32 version information 228, 230 versioning 4 versions 210, 242243 view 91, 103, 113, 127, 130131, 202, 245246, 251 Virtual Storage Access Method (VSAM) 164, 249 Volser Ucb 112, 182 volsers 266 VOLSERS statement 269 volume DB8GL1 55 volume dump 153, 215, 217, 235 volume level backups 51, 224 VOLUME SBOX5E IDC0508I DATA ALLOCATION STATUS 195 IDC0509I INDEX ALLOCATION STATUS 195 Volume SBOX5E 195 Volume TOTDDL 75 VSAM data 24, 265 set 32 VSAM data set 32 VSAM file 24, 104, 168, 191 4089-byte records 168 VSAM repository datasets 300 Index
321
322
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
Back cover
Optimizing Restore and Recovery Solutions with DB2 Recovery Expert for z/OS V2.1
Manage and validate backup and restore system Optimize system and object level restore from volume copies Ensure business continuity with cost-effective recovery
IBM DB2 Recovery Expert manages the recovery of DB2 for z/OS V8 and V9 objects in a data sharing and non-data sharing environment. The major focus of IBM DB2 Recovery Expert V2.1 for z/OS (5697-N92) is on DB2 system level backup and restore. The tool provides the ability to create a consistent full system backup with no impact on DB2 availability, comprehensive backup and recovery reporting capabilities, and robust database and storage validity checking to ensure successful creation and usage of database system backups. By integrating with disk storage functions, it supports DB2 subsystem recovery from system backup, DB2 subsystem disaster recovery, and DB2 object data recovery from system backups. It also helps in selecting the most convenient recovery solution and in managing backups. This IBM Redbooks publication documents how to use Recovery Expert V2.1 for all restore and recovery functions related to system level backup. For scenarios of using Recovery Expert functions when recovering DB2 objects from traditional image copies, see the previous companion IBM Redbooks publication IBM DB2 Recovery Expert for z/OS User Scenarios, SG24-7226.