Coordinated IMS and DB2 Recovery - IMS RUG March 2013 Columbus

404 views

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
404
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
16
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Coordinated IMS and DB2 Recovery - IMS RUG March 2013 Columbus

  1. 1. IBM SoftwareIBM IMS and DB2 Backup and Recovery Workshop© 2013 IBM CorporationGlenn Gallergallerg@us.ibm.comIBM Advanced Technical Skills (ATS)Coordinated IMS and DB2 Recovery
  2. 2. IBM Software2IBM Disaster Recovery Solutions IBM Recovery Solutions► Databases are recovered using image copies and/or logs IBM Restart Solutions► All production data is mirrored to remote site● IMS and DB2 Recovery Expert products: System Level Backup● GDPS and Storage Mirroring IBM Restart & Recovery Solution► All production data is mirrored to remote site► Additional transmitted data allows for forward recovery Coordinated IMS and DB2 Restart & Recovery Solution► Approach 1: SLB contains both IMS and DB2 volumes► Approach 2: Separate SLBs for IMS and DB2 and PITR log recovery
  3. 3. IBM Software3IBM Local Application Recovery Solutions IMS Recovery Solutions► Databases are recovered using SLB, image copies and/or logs► Indexes can be rebuilt with index rebuild utility DB2 Recovery Solutions► Tablespaces are recovered using SLB, image copies and/or logs► Indexes can be rebuilt with index rebuild utility► Undo/Redo SQL► Dropped object recovery Coordinated IMS and DB2 Recovery Solutions► IMS Recovery Expert, IMS Recovery Solution Pack, DB2 RecoveryExpert● IMS and DB2 databases are recovered using SLB, image copies and logs● Recovery to a consistent timestamp between IMS and DB2● Application profiles for IMS and DB2 determine recovery relationships
  4. 4. IBM Software4RTO vs. RPO Recovery Time Objective (RTO)► Time allowed to recover an application► Critical operations are up and running again► Considerations include:● For DR, recovery of databases and network Recovery Point Objective (RPO)► Amount of data lost for an application or in a disaster► Last point-in-time when all data was consistent► Considerations include:● Frequency of creating recovery points● Frequency of transfer of data to remote site for DR
  5. 5. IBM SoftwareFlashCopy Overview IBM and Vendor Options Establish/Thaw vs. Background Copy FlashCopy for a Consistency Group5
  6. 6. IBM SoftwareFlashCopy Overview FlashCopy (FC)► Optional licensed feature of IBM Enterprise storage subsystems► Creates instant copy of a volume or dataset at specific point-in-time► Often referred to as:● Point-in-Time copy, instantaneous copy or time zero (t0) copy Advantages► Can copy huge volumes of data very quickly (seconds to a few minutes)► Minimal disruption for the running applications► Copy process is offloaded to the storage subsystem● Leads to lower host CPU and I/O costs Usage Examples► Create a System Level Backup (SLB) of IMS and DB2 production volumes● Replaces creation of 1000’s of image copy data sets► Create a single image copy6
  7. 7. IBM SoftwareIBM and Vendor Options7Provider Method ConsistencyIBM FlashCopy FlashCopy Consistency GroupsIBM Space Efficient FlashCopy FlashCopy Consistency GroupsEMC TimeFinder Full Volume Clone Enginuity Consistency Assist (ECA)EMC Timefinder/Snap Virtual Devices Enginuity Consistency Assist (ECA)EMC TimeFinder Compatible Flash(With EMC FlashCopy Emulation License)FlashCopy Consistency GroupsHitachi Shadow Image DB2 Recovery Expert Log Suspendor DB2 Log SuspendIMS Recovery Expert Log SuspendHitachi FlashCopy(With HDS FlashCopy Emulation License)FlashCopy Consistency GroupsVolume Level Fast Replication
  8. 8. IBM SoftwareTraditional Copy vs. FlashCopy Traditional Copy (DB2 Share Level Reference, IMS Clean)1) Source dataset (DB2 and IMS) is unavailable for update during copy FlashCopy is a Two-Phase Backup1) Establish/Thaw: Creates source->target relationship2) Background Copy: Tracks are physically copied in the background8Source ProcessingTarget ProcessingSource ProcessingTraditional CopyApplication Update OutageSource ProcessingTarget ProcessingSource ProcessingEstablish/Thaw FCAppl DelayBackground Copy
  9. 9. IBM SoftwareSource and Target Volumes FlashCopy command issued1) Source and Target volume relationship established2) Track bit map created3) Source volumes available immediately for updates4) In background copy, tracks are copied from Source to Target5) Track bit map is updated9SourceEstablish/Thaw FCTargetTrack Bit MapSourceBackground CopyTargetTrack Bit Map
  10. 10. IBM SoftwareSource I/O’s during Background Copy Reads1) “Read from Source” comes directly from Source Writes1) “Write to Source” writes directly to Source (if already copied)a. If not already copied, force copy to Target, then write to Source10Source TargetBackground CopyTrack Bit MapRead I/OSource TargetBackground CopyTrack Bit MapWrite I/O
  11. 11. IBM SoftwareFlashCopy for a Consistency Group DBMS Consistency through Dependent Writes►Update and Commit log records are consistently ordered in logs Storage Processors►Ensures consistency across a set of volumes FlashCopy for a Consistency Group►DBMS and Storage Processors working together►Key to storage-based fast replication software solutions11
  12. 12. IBM SoftwareFlashCopy for Consistency GroupBackup Elapsed Time (Worst Case) = I/O Resume – I/O SuspendBackupTimeI/OResumeTimeSourceTargetT1(Loadlibs)SourceTargetT2(DB2 Log)SourceTargetT3(DB2 DB)SourceTargetT4(IMS Log)SourceTargetT5(IMS DB)I/OSuspendTimeS1(Loadlibs)S2(DB2 Log)S3(DB2 DB)S4(IMS Log)S5(IMS DB)12
  13. 13. IBM SoftwareEstablish/Thaw BenchmarkSourceEstablish/Thaw FCTargetTrack Bit MapSpecifications1) 13 TB of data2) 461 volumes3) DS83004) 2817-M80 z1965) 4,075.28 trans/second6) Backup Elapsed = 0.37 secsIMS Recovery Expert for z/OSBackup Summary ReportUtility Executed:......... BackupProfile Name:............. ROCKET1.BKUP1IMS Subsystem:............ IMSPIMS Version:.............. 12.1Backup Type:.............. Flash CopyBackup Contains:.......... Database, Log Data (Mixed)Partial Backup:........... NoNbr of Volumes:........... 0461Backup Date:.............. 02/01/2012Backup Time:.............. 2012-02-01-17.03.20.671934Consistency Method:....... Flash Consistency GroupSupports Database Restore: NoI/O Suspend Time:......... 2012-02-01-17.03.20.671932I/O Resume Time:.......... 2012-02-01-17.03.21.042397Backup Elapsed:........... 00.37 Seconds13
  14. 14. IBM Software14IMS and DB2 Recovery Expert: SLB Environment discovery and configuration management► IMS System Level Backup includes:● Active and archive logs● RECONs● All IMS database data sets● IMS system data sets (ex. ACBLIBs, DBDLIBs, PGMLIBs, etc.)● All associated ICF User catalogs► DB2 System Level Backup includes:● Active and archive logs● Bootstrap Data Set● All DB2 database data sets● DB2 system data sets (ex. Loadlib)● All associated ICF User catalogs
  15. 15. IBM Software15SLB vs. Image Copy: What are the Advantages?SLBs + Reorg Image Copies• One Backup job vs. 10K image copy jobs• Less Host CPU on job allocations• FlashCopy offloads work to storage processor• Pre-built recovery jobs• Verification of recovery resources when system is healthyStorage ProcessorImage Copies OnlyDB2 SLBIMS SLBFlashCopy SLBs Reorg Image Copies Weekly Image Copies
  16. 16. IBM Software16SLB Image Copies are Registered to DBRC NOTIFY.IC is done when SLB is created► Image Copy GENMAX► PRILOG compression/deletion► Reset Change Accumulation starting point “Pseudo” data set name used for IC DSN► Additional disk space not used for IC data set► Data set allocation at SLB time● Determines Concurrent IC vs. Batch IC► User can configure either IC or UIC “Real” image copy can be created from SLB► Replaces “Pseudo” image copy in DBRC
  17. 17. IBM Software17Coordinated IMS and DB2: Approach 1 Coordinated IMS and DB2 Restart Solution► Combined SLB created from IMS and DB2 volumes● Separate analysis is performed on IMS and DB2– Volumes combined under one Recovery Expert product● At Primary site– One SLB is created– One Flashcopy for all volumes (IMS & DB2)● At Remote site– SLB is restored– IMS and DB2 are restarted individually– Restart with Dynamic Backout and Undo/Redo processing occur
  18. 18. IBM Software18Approach 1: IMS Recovery ExpertProduction SiteRECONWADSOLDSIMS DatabasesRDSLoggerIMS ControlRegionDBRCDLI/SASImage CopyRLDSSLDSChange AccumIMS Volume 1IMS System AnalysisIMS RERepositoryIMS Volume 2IMS Volume 3IMS Volume nn
  19. 19. IBM Software19DB2 TablespacesApproach 1: DB2 Recovery ExpertProduction SiteLogsLoggerDB2 MasterDDFImage CopyLogsDB2 RERepositoryDB2 System AnalysisDB2 Volume 1DB2 Volume 2DB2 Volume nn
  20. 20. IBM Software20Approach 1: Coordinated DR - DB2 RE or IMS RECreate IMS and DB2 SLBLoggerDB2 MasterDDFIMS Volume 1IMS Volume 2IMS Volume 3IMS Volume nnDB2 Volume 1DB2 Volume 2DB2 Volume nnIMS and DB2Combined SLB
  21. 21. IBM Software21Approach 1: IMS and DB2 RestartRemote SiteTransmittedIMS and DB2Combined SLBRestore SLB for IMS/DB2RDSRECONImage CopyRLDSChange AccumIMS DatabasesIMS RE RepositoryWADSOLDSSLDSImage CopyLogsDB2 RERepositoryLogsTABLESPACESLoggerIMS Control RegionDBRCDLI/SASRestart IMS/DB2LoggerDB2 MasterDDF
  22. 22. IBM Software22Coordinated IMS and DB2 Restart Restore the System Level Backup (SLB)► Dynamically backout IMS and DB2 uncommitted updates► RPO = Changes past the last Combined SLBSLBLost IMS/DB2 DataIMS LOG 1UPD UPD CMT UPD UPD UPD UPDIMS Tran 1UPD UPD UPD UPD UPD UPDIMS Tran 2CMTIMS LOG 2UPD UPDIMS Tran 1UPD UPD UPDIMS Tran 2CMTCMT UPD UPD UPDUPD UPD CMTCMTIMS and DB2 SLBDB2 LOG 1UPD UPD CMT UPD UPD UPD UPDDB2 Tran 1UPD UPD UPD UPD UPD UPDDB2 Tran 2CMTDB2 LOG 2UPD UPDDB2 Tran 1UPD UPD UPDDB2 Tran 2CMTCMT UPD UPD UPDUPD UPD CMTCMT
  23. 23. IBM Software23Defining RPO (SLBs Created Once/Day)SLB CreationSend OffsiteOther BackupsMidnight Noon2 Hrs2 Hrs1 HrSLB Day 1 SLB Day 2DR Event12 16 18 22 12 16 18 220 1 32 0 1 32Worst CaseBest CaseDR Event RPO Best Case RPO Worst CaseDR Event SLB Day 1 = SLB + 3 Hrs SLB Day 2 = SLB + 27 Hrs
  24. 24. IBM Software24Defining RPO (SLBs Created Twice/Day)Midnight NoonSLB CreationSend OffsiteOther Backups2 Hrs2 Hrs1 HrDR Event RPO Best Case RPO Worst CaseDR Event SLB 1a = SLB + 3 Hrs SLB 1b = SLB + 15 HrsSLB Day 1a SLB Day 2aDR EventWorst CaseBest CaseSLB Day 1b SLB Day 2bSLB CreationSend OffsiteOther Backups2 Hrs2 Hrs1 Hr12 13 140 1 32 0 1 32 12 13 151415
  25. 25. IBM Software25Defining RTORecovery at Remote Site RTO TimeDR Event 6 HoursRestore z/OS EnvironmentRestart IMS and DB2Restore SLB3 Hrs2 Hrs1 Hr0 3 5 6
  26. 26. IBM Software26Coordinated IMS and DB2: Approach 2 Coordinated IMS and DB2 Recovery & Restart Solution► Separate SLBs created for IMS and DB2 volumes● Separate analysis is performed on IMS and DB2● At Primary site:– Separate SLB is created for IMS and for DB2♦ One FlashCopy for each set of volumes (IMS & DB2)– Archived logs are transmitted to remote site♦ Log Timestamps are recorded in DR PDS● At Remote site:– IMS and DB2 SLBs are restored– Point In Time Recovery using timestamp in IMS and DB2 DR PDS♦ Earlier of two timestamps in IMS and DB2 DR PDS– Start IMS and DB2 (No Backouts/Undos needed during restart)
  27. 27. IBM Software27Approach 2: IMS Recovery ExpertRemote SiteProduction SiteWADSOLDSIMS DatabasesRDSLoggerIMS ControlRegionDBRCDLI/SASTransmittedImage CopyRECONChang AccumSLDS/RLDSIMS RERepositorySystem Level Backup
  28. 28. IBM Software28Approach 2: DB2 Recovery ExpertProduction SiteTransmittedLoggerDB2 MasterDDFDB2 TablespacesBSDSImage CopyLOGSDB2 RERepositorySystem Level BackupRemote Site
  29. 29. IBM Software29Approach 2: IMS Recovery ExpertRemote SiteTransmittedLoggerIMS Control RegionDBRCDLI/SASStart IMSSystem Level BackupRecover DBIMS DatabasesSLDSImage CopyRLDSConditioned ReconChang AccumSLDS/RLDSImage CopyRECONChang AccumIMS RE RepositoryImage CopyChang AccumRestore SLBRDSWADSOLDSRECONSLDS/RLDSIMS DatabasesIMS RERepositoryFind Coord RPIMS RERepository
  30. 30. IBM Software30Approach 2: DB2 Recovery ExpertRemote SiteTransmittedStart DB2LoggerDB2 MasterDDFSystem Level BackupImage CopyLOGSDB2 RERepositoryRestore SLBBSDSImage CopyLOGSDB2 RERepositoryDB2 TablespacesBSDSRecover DBImage CopyLOGSDB2 RERepositoryBSDSFind Coord RPDB2 RERepository
  31. 31. IBM Software31Coordinated IMS and DB2 Recovery & Restart Restore the System Level Backup (SLB)► Point-In-Time-Recovery for IMS and DB2► RPO = Changes past the coordinated timestampSLB + LogsLost DB2 DataIMS LOG 1UPD UPD CMT UPD UPD UPD UPDIMS Tran 1UPD UPD UPD UPD UPD UPDIMS Tran 2CMTIMS LOG 2UPD UPDIMS Tran 1UPD UPD UPDIMS Tran 2CMTCMT UPD UPD UPDUPD UPD CMTCMTDB2 SLBDB2 LOG 1UPD UPD CMT UPD UPD UPD UPDDB2 Tran 1UPD UPD UPD UPD UPD UPDDB2 Tran 2CMTDB2 LOG 2UPD UPDDB2 Tran 1UPD UPD UPDDB2 Tran 2CMTCMT UPDUPD UPDIMS SLBLost IMS Data
  32. 32. IBM Software32Coordinated Local Application ProfileLocal Application Profile Local Application ProfileLocal and Coordinated Application ProfilesIMS DatabasesIMS DatabasesDB2 TablespacesDB2 TablespacesIMS ApplicationDB2 ApplicationIMS and DB2 Application Coordinated Local Application Recovery Profiles► Combination of one or more IMS and DB2 profiles● Each profile can be in only one Coordinated Profile► Allows IMS and DB2 applications to be recovered to a consistent pointSingle IMS UORSingle DB2 UORSingle IMS and DB2 UOR
  33. 33. IBM Software33Recovery Points Recovery Points (RPs) used with Timestamp Recoveries► Traditional RPs are discovered in the RECON (IMS), SYSCOPY(DB2)● IMS - DEALLOC shows when database is not allocated for update● UPDATE DB STOP(ACCESS) or /DBR DB● UPDATE DB STOP(UPDATES) or /DBD DB● UPDATE DB START(QUIESCE)● DB2 – QUIESCE TABLESPACE dbname.tsname Point-In-Time Recovery (PITR) to any timestamp► IMS - Requires IMS Recovery Solution Pack► DB2 - Requires DB2 Utility Suite► Traditional RPs are not needed● Uncommitted updates are not applied
  34. 34. IBM Software34Coordinated IMS & DB2 Local Application Recovery Recovery Expert “Quiet Time Log Analysis”► Finds Recovery Points in the Log records● Analyzes actual transaction Unit of Recovery (UOR) activity– Discovers commit points for IMS and DB2 databases/objects► Coordinated Quiet Times saved in RepositoryCoordinated Quiet TimeIMS UOR1 IMS UOR1 IMS UOR 1 IMS UOR1DB2 UOR 1 DB2 UOR 1 DB2 UOR 1 DB2 UOR 1DB2 UOR 3 DB2 UOR 3DB2 UOR 2 DB2 UOR 2IMS UOR 3IMS UOR 3IMS Quiet TimeDB2 Quiet TimeIMS UOR 2
  35. 35. IBM Software35Coordinated IMS & DB2 Local Application Recovery• Selecting the Consistent Timestamp for recovery1) Select the “Current Timestamp” (Okay)● All DBs/objects in Coordinated Profile are stopped for IMS and DB2● IMS and DB2 logs are switched and archived● Recovery is to the end of the current set of IMS and DB2 logs● DBs/objects are restarted2) Select any “User Timestamp” (Better)● IMS Recovery Solution Pack (IMS DRF) and DB2 Recovery Utility– Point In Time Recovery (PITR) applies only the committed updates3) Select a “Quiet Time Recovery Point Timestamp” (Best)● IMS and DB2 Recovery Expert identifies RPs from the logs● IMS Recovery Solution Pack (IMS DRF) and DB2 Recovery Utility– Point In Time Recovery (PITR) applies only the committed updates● May provide better linkage to Business Cycle
  36. 36. IBM Software36Recovering a Coordinated ApplicationSelect Coordinated Application ProfileSelect or Specify Recover to TimestampAnalysis Performed by Recovery Expert toDetermine the Recovery StepsSubmit the JCLRecover IMS Databases Restore from SLB Restore Image Copies Apply Logs► To specified timestamp Rebuild IndexesStart IMS DatabasesStop IMS DatabasesRecover DB2 Tablespaces Restore from SLB Restore Image Copies Apply Logs► To specified timestamp Rebuild IndexesStart DB2 TablespacesStop DB2 Tablespaces
  37. 37. IBM Software37Summary of Coordinated IMS and DB2 Recovery Coordinated IMS and DB2 Disaster Recovery► Coordinated IMS and DB2 Restart & Recovery Solution● Approach 1: SLB contains both IMS and DB2 volumes● Approach 2: Separate SLBs for IMS and DB2 volumes Coordinated IMS and DB2 Local Application Recovery► Coordinated IMS and DB2 Recovery Solutions● IMS Recovery Expert, DB2 Recovery Expert, IMS Recovery Solution Pack– IMS and DB2 databases are recovered using SLB, image copies and logs– Recovery to a consistent timestamp between IMS and DB2– Coordinated application profiles connect IMS and DB2
  38. 38. IBM Software38IMS and DB2 Disaster Recovery Tutorials► IBM developerWorks● www.ibm.com/developerworks– External IBM website with articles, tutorials and demonstrations► IMS Disaster Recovery Tutorials● Four parts:– Part 1: Overview of all solutions– Part 2: IMS Base and IMS Tool solutions– Part 3: IMS Recovery Expert Disaster and Local Recovery– Part 4: Coordinated IMS and DB2 Disaster Recovery● Downloadable demonstration file– Demos are installed on hard disk– Viewed with internet browser
  39. 39. IBM Software39IMS and DB2 Disaster Recovery Tutorials►developerWorks URL for Tutorials● Search on “Exploring IMS Disaster Recovery”
  40. 40. IBM Software40recoveryFlashCopyrpo and rtotimestampsconsistency

×