DB2 Storage

DB2 and HSM

This page discusses how DB2 works with z/OS mainframe archiving products like DFHSM and FDRABR. These products are designed to manage your disk space efficiently by moving data sets that have not been used recently to less-expensive storage. They can also be used for disk level backup and recovery and can delete data sets automatically based on retention settings. An HSM tool can save you money by migrating unused data off to tape, but with databases, it is essential that you do not compromise performance to save a bit of money. DB2 data can be carved up as follows.

For DB2 to recognise archived files, you need to set RECALL=Y in the DSNZPARM parameter. DB2 can recall user page sets that have been migrated. Whether DFHSM recall occurs automatically is determined by the values of the RECALL DATABASE and RECALL DELAY fields of installation panel DSNTIPO. If the value of the RECALL DATABASE field is NO, automatic recall is not performed and the page set is considered an unavailable resource. It must be recalled explicitly before it can be used by DB2. If the value of the RECALL DATABASE field is YES, DFSMShsm is invoked to recall the page sets automatically. The program waits for the recall for the amount of time that is specified by the RECALL DELAY parameter. If the recall is not completed within that time, the program receives an error message indicating that the page set is unavailable but that recall was initiated. Whether DFSMShsm recall occurs automatically is determined by the values of the RECALL DATABASE and RECALL DELAY fields of installation panel DSNTIPO. If the value of the RECALL DATABASE field is NO, automatic recall is not performed and the page set is considered an unavailable resource. It must be recalled explicitly before it can be used by DB2. If the value of the RECALL DATABASE field is YES, DFSMShsm is invoked to recall the page sets automatically. The program waits for the recall for the amount of time that is specified by the RECALL DELAY parameter. If the recall is not completed within that time, the program receives an error message indicating that the page set is unavailable but that recall was initiated.

DFHSM has a free space release facility, but it will not work on DB2 databases. FDRCPK can do this, and I've found this very useful when a development DB2 pool is running out of space. If the database is open, FDRCPK will not touch it, but as most development databases are stopped, FDRCPK will free up a lot of space.

You can use DB2 BACKUP SYSTEM and RESTORE SYSTEM utilities, which backup DB2 databases at volume level, and uses DFSMShsm for the back up and restore functions. However this relies on all the DB2 data sets existing on SMS managed volumes. IBM warns that if you use the BACKUP SYSTEM utility to create system-level backups, then you must not use DFHSM to migrate DB2 table spaces and indexes. You can combine DFHSM with Flash Copy to take very fast backups.
With DB2 V9 there was a caveat for doing this, you could not use a DB2 utility to recover, reorg or rebuild an index as this would invalidate the backup. Since DFSMShsm V1R11 and DB2 v10, you can configure the SMS copypool to use the CAPTURE CATALOG option, which means that DFSMShsm collects the nformation during FlashCopy volume backup that enables the FRRECOVER process to restore a data set on its original source volume, even in situations in which the data set to restore was deleted or moved to a different volume. This will work even if multiple REORG utilities have been executed since the SLB was created.

Finally, DFHSM can be used to assist with image copies. see the DB2 Image Copy section for details

DB2 Storage

Lascon latest major updates

Welcome to Lascon Storage. This site provides hints and tips on how to manage your data, strategic advice and news items.