40
IBM Software IBM IMS and DB2 Backup and Recovery Workshop © 2013 IBM Corporation Glenn Galler [email protected] IBM Advanced Technical Skills (ATS) Coordinated IMS and DB2 Recovery

Coordinated IMS and DB2 Recovery - IMS RUG March 2013 Columbus

  • Upload
    ibm-ims

  • View
    456

  • Download
    3

Embed Size (px)

Citation preview

Page 1: Coordinated IMS and DB2 Recovery - IMS RUG March 2013 Columbus

IBM Software

IBM IMS and DB2 Backup and Recovery Workshop

© 2013 IBM Corporation

Glenn Galler

[email protected]

IBM Advanced Technical Skills (ATS)

Coordinated IMS and DB2 Recovery

Page 2: Coordinated IMS and DB2 Recovery - IMS RUG March 2013 Columbus

IBM Software2

IBM 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

Page 3: Coordinated IMS and DB2 Recovery - IMS RUG March 2013 Columbus

IBM Software3

IBM 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 Recovery

Expert

● 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

Page 4: Coordinated IMS and DB2 Recovery - IMS RUG March 2013 Columbus

IBM Software4

RTO 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

Page 5: Coordinated IMS and DB2 Recovery - IMS RUG March 2013 Columbus

IBM Software

FlashCopy Overview

IBM and Vendor Options

Establish/Thaw vs. Background Copy

FlashCopy for a Consistency Group

5

Page 6: Coordinated IMS and DB2 Recovery - IMS RUG March 2013 Columbus

IBM Software

FlashCopy 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 copy

6

Page 7: Coordinated IMS and DB2 Recovery - IMS RUG March 2013 Columbus

IBM Software

IBM and Vendor Options

7

Provider Method Consistency

IBM FlashCopy FlashCopy Consistency Groups

IBM Space Efficient FlashCopy FlashCopy Consistency Groups

EMC 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 Groups

Hitachi Shadow Image DB2 Recovery Expert Log Suspend

or DB2 Log Suspend

IMS Recovery Expert Log Suspend

Hitachi FlashCopy

(With HDS FlashCopy Emulation License)

FlashCopy Consistency Groups

Volume Level Fast Replication

Page 8: Coordinated IMS and DB2 Recovery - IMS RUG March 2013 Columbus

IBM Software

Traditional 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 Backup

1) Establish/Thaw: Creates source->target relationship

2) Background Copy: Tracks are physically copied in the background

8

Source Processing

Target Processing

Source Processing

Traditional Copy

Application Update Outage

Source Processing

Target Processing

Source Processing

Establish/Thaw FC

Appl Delay

Background Copy

Page 9: Coordinated IMS and DB2 Recovery - IMS RUG March 2013 Columbus

IBM Software

Source and Target Volumes

FlashCopy command issued

1) Source and Target volume relationship established

2) Track bit map created

3) Source volumes available immediately for updates

4) In background copy, tracks are copied from Source to Target

5) Track bit map is updated

9

Source

Establish/Thaw FC

TargetTrack Bit Map

Source

Background Copy

TargetTrack Bit Map

Page 10: Coordinated IMS and DB2 Recovery - IMS RUG March 2013 Columbus

IBM Software

Source I/O’s during Background Copy

Reads

1) “Read from Source” comes directly from Source

Writes

1) “Write to Source” writes directly to Source (if already copied)

a. If not already copied, force copy to Target, then write to Source

10

Source Target

Background Copy

Track Bit Map

Read I/O

Source Target

Background Copy

Track Bit Map

Write I/O

Page 11: Coordinated IMS and DB2 Recovery - IMS RUG March 2013 Columbus

IBM Software

FlashCopy 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 solutions

11

Page 12: Coordinated IMS and DB2 Recovery - IMS RUG March 2013 Columbus

IBM Software

FlashCopy for Consistency Group

Backup Elapsed Time (Worst Case) = I/O Resume – I/O SuspendB

ackup T

ime

I/O R

esum

e T

ime

Source

Target

T1

(Loadlibs)

Source

Target

T2

(DB2 Log)

Source

Target

T3

(DB2 DB)

Source

Target

T4

(IMS Log)

Source

Target

T5

(IMS DB)

I/O

Suspend T

ime

S1

(Loadlibs)S2

(DB2 Log)

S3

(DB2 DB)

S4

(IMS Log)

S5

(IMS DB)

12

Page 13: Coordinated IMS and DB2 Recovery - IMS RUG March 2013 Columbus

IBM Software

Establish/Thaw Benchmark

Source

Establish/Thaw FC

TargetTrack Bit Map

Specifications1) 13 TB of data

2) 461 volumes

3) DS8300

4) 2817-M80 z196

5) 4,075.28 trans/second

6) Backup Elapsed = 0.37 secs

IMS Recovery Expert for z/OSBackup Summary Report

Utility 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 Seconds

13

Page 14: Coordinated IMS and DB2 Recovery - IMS RUG March 2013 Columbus

IBM Software14

IMS 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

Page 15: Coordinated IMS and DB2 Recovery - IMS RUG March 2013 Columbus

IBM Software15

SLB 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 healthy

Storage Processor

Image Copies Only

DB2 SLBIMS SLB

FlashCopy SLBs Reorg Image Copies Weekly Image Copies

Page 16: Coordinated IMS and DB2 Recovery - IMS RUG March 2013 Columbus

IBM Software16

SLB 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

Page 17: Coordinated IMS and DB2 Recovery - IMS RUG March 2013 Columbus

IBM Software17

Coordinated 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

Page 18: Coordinated IMS and DB2 Recovery - IMS RUG March 2013 Columbus

IBM Software18

Approach 1: IMS Recovery Expert

Production Site

RECON

WADS

OLDS

IMS Databases

RDS

Logger

IMS ControlRegion

DBRC

DLI/SAS

Image Copy

RLDS

SLDS

Change AccumIMS Volume 1

IMS System Analysis

IMS RE

Repository

IMS Volume 2IMS Volume 3

IMS Volume nn

Page 19: Coordinated IMS and DB2 Recovery - IMS RUG March 2013 Columbus

IBM Software19

DB2 Tablespaces

Approach 1: DB2 Recovery Expert

Production Site

LogsLogger

DB2 Master

DDF

Image Copy

Logs

DB2 RE

Repository

DB2 System Analysis

DB2 Volume 1DB2 Volume 2

DB2 Volume nn

Page 20: Coordinated IMS and DB2 Recovery - IMS RUG March 2013 Columbus

IBM Software20

Approach 1: Coordinated DR - DB2 RE or IMS RE

Create IMS and DB2 SLB

Logger

DB2 Master

DDF

IMS Volume 1IMS Volume 2

IMS Volume 3IMS Volume nn

DB2 Volume 1DB2 Volume 2

DB2 Volume nn

IMS and DB2

Combined SLB

Page 21: Coordinated IMS and DB2 Recovery - IMS RUG March 2013 Columbus

IBM Software21

Approach 1: IMS and DB2 RestartRemote Site

Transmitted

IMS and DB2

Combined SLB

Restore SLB for IMS/DB2

RDS

RECONImage Copy

RLDS

Change Accum

IMS Databases

IMS RE Repository

WADS

OLDS

SLDS

Image Copy

Logs

DB2 RE

Repository

Logs

TABLESPACES

Logger

IMS Control Region

DBRC

DLI/SAS

Restart IMS/DB2

Logger

DB2 Master

DDF

Page 22: Coordinated IMS and DB2 Recovery - IMS RUG March 2013 Columbus

IBM Software22

Coordinated IMS and DB2 Restart

Restore the System Level Backup (SLB)

► Dynamically backout IMS and DB2 uncommitted updates

► RPO = Changes past the last Combined SLB

SLB

Lost IMS/DB2 Data

IMS LOG 1

UPD UPD CMT UPD UPD UPD UPD

IMS Tran 1

UPD UPD UPD UPD UPD UPD

IMS Tran 2

CMT

IMS LOG 2

UPD UPD

IMS Tran 1

UPD UPD UPD

IMS Tran 2

CMT

CMT UPD UPD UPD

UPD UPD CMT

CMT

IMS and DB2 SLB

DB2 LOG 1

UPD UPD CMT UPD UPD UPD UPD

DB2 Tran 1

UPD UPD UPD UPD UPD UPD

DB2 Tran 2

CMT

DB2 LOG 2

UPD UPD

DB2 Tran 1

UPD UPD UPD

DB2 Tran 2

CMT

CMT UPD UPD UPD

UPD UPD CMT

CMT

Page 23: Coordinated IMS and DB2 Recovery - IMS RUG March 2013 Columbus

IBM Software23

Defining RPO (SLBs Created Once/Day)

SLB Creation

Send Offsite

Other Backups

Midnight Noon

2 Hrs

2 Hrs

1 Hr

SLB Day 1 SLB Day 2

DR Event

12 16 18 22 12 16 18 220 1 32 0 1 32

Worst CaseBest Case

DR Event RPO Best Case RPO Worst Case

DR Event SLB Day 1 = SLB + 3 Hrs SLB Day 2 = SLB + 27 Hrs

Page 24: Coordinated IMS and DB2 Recovery - IMS RUG March 2013 Columbus

IBM Software24

Defining RPO (SLBs Created Twice/Day)

Midnight Noon

SLB Creation

Send Offsite

Other Backups

2 Hrs

2 Hrs

1 Hr

DR Event RPO Best Case RPO Worst Case

DR Event SLB 1a = SLB + 3 Hrs SLB 1b = SLB + 15 Hrs

SLB Day 1a SLB Day 2a

DR Event

Worst CaseBest Case

SLB Day 1b SLB Day 2b

SLB Creation

Send Offsite

Other Backups

2 Hrs

2 Hrs

1 Hr

12 13 140 1 32 0 1 32 12 13 151415

Page 25: Coordinated IMS and DB2 Recovery - IMS RUG March 2013 Columbus

IBM Software25

Defining RTO

Recovery at Remote Site RTO Time

DR Event 6 Hours

Restore z/OS Environment

Restart IMS and DB2

Restore SLB

3 Hrs

2 Hrs

1 Hr

0 3 5 6

Page 26: Coordinated IMS and DB2 Recovery - IMS RUG March 2013 Columbus

IBM Software26

Coordinated 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)

Page 27: Coordinated IMS and DB2 Recovery - IMS RUG March 2013 Columbus

IBM Software27

Approach 2: IMS Recovery ExpertRemote SiteProduction Site

WADS

OLDS

IMS Databases

RDS

Logger

IMS ControlRegion

DBRC

DLI/SAS

Transmitted

Image Copy

RECON

Chang Accum

SLDS/RLDS

IMS RE

Repository

System Level Backup

Page 28: Coordinated IMS and DB2 Recovery - IMS RUG March 2013 Columbus

IBM Software28

Approach 2: DB2 Recovery ExpertProduction Site

Transmitted

Logger

DB2 Master

DDF

DB2 Tablespaces

BSDS

Image Copy

LOGS

DB2 RE

Repository

System Level Backup

Remote Site

Page 29: Coordinated IMS and DB2 Recovery - IMS RUG March 2013 Columbus

IBM Software29

Approach 2: IMS Recovery ExpertRemote Site

Transmitted

Logger

IMS Control Region

DBRC

DLI/SAS

Start IMS

System Level Backup

Recover DB

IMS Databases

SLDS

Image Copy

RLDS

Conditioned Recon

Chang Accum

SLDS/RLDS

Image Copy

RECON

Chang Accum

IMS RE Repository

Image Copy

Chang Accum

Restore SLB

RDS

WADS

OLDSRECON

SLDS/RLDS

IMS DatabasesIMS RE

Repository

Find Coord RP

IMS RE

Repository

Page 30: Coordinated IMS and DB2 Recovery - IMS RUG March 2013 Columbus

IBM Software30

Approach 2: DB2 Recovery ExpertRemote Site

TransmittedStart DB2

Logger

DB2 Master

DDF

System Level Backup

Image Copy

LOGS

DB2 RE

Repository

Restore SLB

BSDS

Image Copy

LOGS

DB2 RE

Repository

DB2 Tablespaces

BSDS

Recover DB

Image Copy

LOGS

DB2 RE

Repository

BSDS

Find Coord RP

DB2 RE

Repository

Page 31: Coordinated IMS and DB2 Recovery - IMS RUG March 2013 Columbus

IBM Software31

Coordinated IMS and DB2 Recovery & Restart Restore the System Level Backup (SLB)

► Point-In-Time-Recovery for IMS and DB2

► RPO = Changes past the coordinated timestamp

SLB + LogsLost DB2 Data

IMS LOG 1

UPD UPD CMT UPD UPD UPD UPD

IMS Tran 1

UPD UPD UPD UPD UPD UPD

IMS Tran 2

CMT

IMS LOG 2

UPD UPD

IMS Tran 1

UPD UPD UPD

IMS Tran 2

CMT

CMT UPD UPD UPD

UPD UPD CMT

CMT

DB2 SLB

DB2 LOG 1

UPD UPD CMT UPD UPD UPD UPD

DB2 Tran 1

UPD UPD UPD UPD UPD UPD

DB2 Tran 2

CMT

DB2 LOG 2

UPD UPD

DB2 Tran 1

UPD UPD UPD

DB2 Tran 2

CMT

CMT UPD

UPD UPD

IMS SLB

Lost IMS Data

Page 32: Coordinated IMS and DB2 Recovery - IMS RUG March 2013 Columbus

IBM Software32

Coordinated Local Application ProfileLocal Application Profile Local Application Profile

Local and Coordinated Application Profiles

IMS Databases

IMS Databases

DB2 Tablespaces

DB2 Tablespaces

IMS Application

DB2 Application

IMS 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 point

Single IMS UOR

Single DB2 UOR

Single IMS and DB2 UOR

Page 33: Coordinated IMS and DB2 Recovery - IMS RUG March 2013 Columbus

IBM Software33

Recovery 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

Page 34: Coordinated IMS and DB2 Recovery - IMS RUG March 2013 Columbus

IBM Software34

Coordinated 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 Repository

Coordinated Quiet Time

IMS UOR1 IMS UOR1 IMS UOR 1 IMS UOR1

DB2 UOR 1 DB2 UOR 1 DB2 UOR 1 DB2 UOR 1

DB2 UOR 3 DB2 UOR 3

DB2 UOR 2 DB2 UOR 2

IMS UOR 3IMS UOR 3

IMS Quiet TimeDB2 Quiet Time

IMS UOR 2

Page 35: Coordinated IMS and DB2 Recovery - IMS RUG March 2013 Columbus

IBM Software35

Coordinated IMS & DB2 Local Application Recovery

• Selecting the Consistent Timestamp for recovery

1) 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 restarted

2) Select any “User Timestamp” (Better)

● IMS Recovery Solution Pack (IMS DRF) and DB2 Recovery Utility

– Point In Time Recovery (PITR) applies only the committed updates

3) 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

Page 36: Coordinated IMS and DB2 Recovery - IMS RUG March 2013 Columbus

IBM Software36

Recovering a Coordinated Application

Select Coordinated Application Profile

Select or Specify Recover to Timestamp

Analysis Performed by Recovery Expert to

Determine the Recovery Steps

Submit the JCL

Recover IMS Databases Restore from SLB

Restore Image Copies

Apply Logs

► To specified timestamp

Rebuild Indexes

Start IMS Databases

Stop IMS Databases

Recover DB2 Tablespaces Restore from SLB

Restore Image Copies

Apply Logs

► To specified timestamp

Rebuild Indexes

Start DB2 Tablespaces

Stop DB2 Tablespaces

Page 37: Coordinated IMS and DB2 Recovery - IMS RUG March 2013 Columbus

IBM Software37

Summary 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

Page 38: Coordinated IMS and DB2 Recovery - IMS RUG March 2013 Columbus

IBM Software38

IMS 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

Page 39: Coordinated IMS and DB2 Recovery - IMS RUG March 2013 Columbus

IBM Software39

IMS and DB2 Disaster Recovery Tutorials

►developerWorks URL for Tutorials

● Search on “Exploring IMS Disaster Recovery”

Page 40: Coordinated IMS and DB2 Recovery - IMS RUG March 2013 Columbus

IBM Software40

recovery

FlashCopy

rpo and rto

timestamps

consistency