IMS
High Availability Large Database
           (HALDB)
         (subset of course CMW46)




             The world depen...
Topics

  Overview
  Database Structures
  Definition
  Partition Selection
  DBRC Support
  Database Commands
  Utilities...
HALDB Overview
HALDB (High Availability Large Database)
   Large Database


    Databases are partitioned
      Up to 1001 partitions per...
HALDB (High Availability Large Database)
   Benefits


    Greater database capacity
     Without application changes

   ...
Highlights

   Hierarchic structure is maintained
    A database record resides in one partition

   Minimal (or no) appli...
Highlights

   OSAM and VSAM (ESDS and KSDS) are supported
   Partition selection is done by key range or user exit
   rou...
Definition Process

   DBDGEN
    Used to define database
     Hierarchic structure, data set group boundaries, pointer
  ...
Indirect Pointers

   HALDB uses both direct and indirect pointers for
   logical relationships and secondary indexes


  ...
Extended Pointer Set

   Extended Pointer Set (EPS) is used for logical
   relationships and secondary indexes
     EPS is...
HALDB Database Structure

  Each partition in a database has a unique partition ID
  (PID)


  A reorganization number is ...
Self-Healing Pointers
Using an Extended Pointer Set (EPS)
 Since reorg # in EPS matches reorg #        ILDS
 in Partition ...
Self-Healing Pointers
After reorganization of Partition
Reorg moves segment B, updates reorg # in
ILE and Partition DBDS, ...
Self-Healing Pointers
Using the EPS after the reorganization
Since reorg # in EPS does not match reorg
# in Partition DBDS...
Self-Healing Pointers
"Healing" the EPS

When we use the ILE, we update the                   ILDS
reorg # and RBA pointer...
HALDB Database Data Sets

  Each HALDB database has up to 1001 partitions
  PHIDAM has index, ILDS, and up to 10 data set
...
HALDB Database Data Sets

            PHIDAM                PHDAM                   PSINDEX


  Index           ...       ...
Partition Independence

   Commands
    Allowed on both databases and partitions

   Availability
    Partitions are alloc...
HALDB Overview

  Database candidates for HALDB
   Very large databases
    Approaching 4GB limitation
    Theoretical lim...
HALDB Database Structures
Database Structures

   Logical relationships
    Virtual pairing is not allowed
     Limited to unidirectional or physica...
Database Structures

   PHIDAM primary indexes are not separately defined


    Defined as part of the PHIDAM database

  ...
Database Data Sets
                   PHIDAM                       PHDAM                        PSINDEX

                 ...
Database Data Sets

   DDNAMEs
    Partition name is basis for DDNAME
     Up to 7 characters
     Assigned in HALDB Parti...
Database Data Sets

   Data set names
    Begin with data set name prefix for the partition
     Up to 37 characters
     ...
Database Data Sets

   Data set size limitations


    Maximum data set size is 4GB
     Applies to OSAM and VSAM

   OSAM...
Partition DDNAMEs and Data Set Names

  Partition_name assigned by user in HALDB Partition Definition Utility or DBRC comm...
Partition DDNAMEs and Data Set Names

 Example: PHIDAM with 10 data set groups, FRANCE partition
         Partition_name o...
Partition DDNAMEs and Data Set Names
 Example: PHIDAM with 10 data set groups, CANADA partition
         Partition_name of...
Extended Pointer Set

   Extended pointer set (EPS)
    Used for logical relationships and secondary indexes

    Data:

 ...
ILDS Data Sets

   Indirect List Entries (ILEs)


    Created or updated by reorg reload

      Reorgs do not update point...
ILDS Data Sets

   ILE keys (9 bytes)


    ILK (8 bytes)

     RBA of segment at its creation time (4 bytes)

     Partit...
ILDS Data Sets

   ILE data (50 bytes)


    Key (ILK and segment code)

    Flags

    Old and new copies of:
     Partit...
HALDB Segment Format
    EPS in logical child segments and secondary indexes
    ILK in all PHDAM and PHIDAM segments
    ...
DFSVSMxx and DFSVSAMP
         and
   Dynamic Allocation
DFSVSMxx Member or DFSVSAMP DD

  Data sets assigned to subpool with alphabetic
  characters
   Replaces data set numbers
...
DFSVSMxx member or DFSVSAMP DD
  PHDAM example
                  PART1        PART2          PART3


ILDS    Subpool      ...
Dynamic Allocation

   Dynamic allocation uses DBRC information
    HALDB Partition Definition utility or DBRC commands
  ...
HALDB Partition Selection
Order of Segments in a PHDAM Database
PHDAM with key range partitioning
 Keys are sequential between partitions, random wi...
Order of Segments in a PHIDAM Database
   PHIDAM with key range partitioning
   Keys are sequential between partitions, se...
Order of Segments in a PSINDEX Database
   PSINDEX with key range partitioning
   Keys are sequential between partitions, ...
Changing HALDB Databases
Database Changes

   Changes affecting all partitions of the database


    DBD changes

    Partition selection exit

   ...
Partition Changes

   Changes affecting only one partition
     DSN prefix
     Randomizing module name
     Number of roo...
Database Changes

   Changing high keys of partitions


    Changes not allowed if affected partitions are authorized

   ...
Example 1: Splitting a Partition

 If partition PB with high key 4000000 needs to be split
 –Unload partition PB
    HD Un...
Example 2: Modifying Partition Boundaries
If records need to be moved from partition PB to PC

 –Unload partitions PB and ...
Example 3: Combining Partitions

If partitions PB and PC with high keys 4000000 and
6000000 need to be combined
 –Unload p...
Databases with Dates for Keys
  Some databases have dates as the high-order part of the
  key
                            ...
Partition Selection Exit Routine Changes

   Changing Partition Selection Exit routine


    Change not allowed if affecte...
Partition Selection Exit Changes

   Partition Selection Exit


    Adding an exit routine

     Preserves high keys in de...
Master Database Changes

  Changing Partition Selection Exit


   Adding a new partition

    Partition must be initialize...
Partition Changes

   Partition Data DBDS Changes


     GENMAX
     RECOVPD
     DEFLTJCL
     ICJCL
     OICJCL
     REC...
Partition Changes

   Partition ID numbers are never reused
     Deletion and recreation of same partition name results
  ...
Partition Changes

  Disabling and enabling partitions was introduced by
  APAR PQ73858 for IMS V8
   Included in IMS V9
 ...
Partition Changes
  Use of disabling and enabling partitions
   Disabling is normally done prior to deleting a partition
 ...
Partition Changes

   ILDS or PHIDAM Prime Index DBDSs


   Changes cannot be made by HALDB Partition Definition
   Utilit...
Secondary Indexes with HALDB
Secondary Indexes

  Partition selection exit may be able to partition a
  secondary index like its target database

     ...
Secondary Indexes

  Shared indexes are not supported


  Must have unique keys
   /SX and /CK may be used

  Symbolic poi...
Secondary Indexes
  Migration of secondary index


   Must be migrated with target database

   Migration uses HD Unload a...
Secondary Indexes

  Addition of secondary index
   Cannot use standard IMS utilities to add an index
   IBM IMS Index Bui...
Secondary Indexes

  Reorganization of target database does not affect
  secondary index


  Secondary index does not have...
HALDB
Miscellaneous Considerations
Extended Pointer Set (EPS) Adjustments

   When out of date pointer is found it is corrected on
   DASD if:
    Access int...
Logging

  No logging of "after images" for PHIDAM indexes
   Rebuilt with DFSPREC0 utility
   "Before images" are not arc...
OSAM Sequential Buffering

   HALDB supports OSAM Sequential Buffering (SB)
    Same support as for non-HALDB databases

 ...
Data Set Groups

   HALDB supports data set groups (DSGs)


   DSGs are not needed to address database size
   limitations...
Database Exit Routines

   Database Exit Routines


    Routines:
     Segment Edit/Compression Exit Routines
     Data Ca...
Data Set Allocation

   Dynamic allocation uses DBRC information


    DFSMDA is not used

    Users cannot override data ...
Data Sharing

   Data sharing is supported


    SHARELVL specified on master database level

     Authorization is by par...
HALDB Summary
HALDB Database Candidates

  Very large databases
   Approaching 4GB (VSAM) or 8GB (OSAM) limitations

    To allow for gr...
HALDB Database Candidates

  Medium and large databases


   Parallel processing to meet time deadlines

    Application p...
HALDB Database Candidates

  Any size database
   Faster reorganizations
    May be done more frequently
   Partition inde...
Some Things to Remember

   Plan migrations of large databases to HALDB
    Logical relationships may add significant time...
Some Things to Remember

   Secondary index cannot be rebuilt from database
   with IMS utilities
    Don't make them non-...
HALDB Summary

  Benefits
   Greater database capacity
    Without application changes
   Increased database availability
...
More Information on HALDB

  WWW.IBM.COM/IMS (The IMS webpage!)
  WWW.IBM.COM/SUPPORT/TECHDOCS
   Search on "HALDB"


   R...
Upcoming SlideShare
Loading in …5
×

Minn ims haldb-2009_

704 views

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

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

No notes for slide

Minn ims haldb-2009_

  1. 1. IMS High Availability Large Database (HALDB) (subset of course CMW46) The world depends on it John Harper - IBM IMS Development jwharp@us.ibm.com
  2. 2. Topics Overview Database Structures Definition Partition Selection DBRC Support Database Commands Utilities Database Creation and Migration Changing Databases Secondary Indexes Application Considerations Misc. Considerations HALDB Online Reorganization Summary
  3. 3. HALDB Overview
  4. 4. HALDB (High Availability Large Database) Large Database Databases are partitioned Up to 1001 partitions per database Partitions have up to 10 data set groups High Availability Database Partition independence Allocation, authorization, reorganization, and recovery are by partition Self healing pointers Reorganization of partition does not require changes to secondary indexes or logically related databases
  5. 5. HALDB (High Availability Large Database) Benefits Greater database capacity Without application changes Increased database availability Partitions, not databases, are removed from system Shortened reorganization process Batch window is shortened with concurrent processing Improved manageability Data sets may be smaller
  6. 6. Highlights Hierarchic structure is maintained A database record resides in one partition Minimal (or no) application changes required Cannot initially load logical child segments New status code for load programs Some secondary index segment formats change May require I/O area changes when secondary index is processed as a database New database types PHDAM - partitioned HDAM PHIDAM - partitioned HIDAM Index is partitioned PSINDEX - partitioned secondary index
  7. 7. Highlights OSAM and VSAM (ESDS and KSDS) are supported Partition selection is done by key range or user exit routine Logical relationships and secondary indexes are supported Secondary indexes may be partitioned DBRC is required Databases must be registered Dynamic allocation uses DBRC information DFSMDA is not used
  8. 8. Definition Process DBDGEN Used to define database Hierarchic structure, data set group boundaries, pointer options, logical relationships, secondary indexes,... HALDB Partition Definition Utility ISPF based Used to define partitions in database Partition selection, space characteristics, randomizers,... Or DBRC Commands
  9. 9. Indirect Pointers HALDB uses both direct and indirect pointers for logical relationships and secondary indexes Direct pointers point to segments Indirect pointers "point" to Indirect List Entries (ILEs) in Indirect List Data Set (ILDS) ILEs have token for key ILEs contain direct pointer to segment ILDS is KSDS associated with a Partition
  10. 10. Extended Pointer Set Extended Pointer Set (EPS) is used for logical relationships and secondary indexes EPS is not updated by reorganizations! EPS contains direct pointer, reorganization number, and ILK If reorg number is current, direct pointer is used If reorg number is not current, ILK is use to find ILE in ILDS ILE contains pointer to segment Direct pointer and reorg number is EPS are updated when ILE is used Self healing pointers!
  11. 11. HALDB Database Structure Each partition in a database has a unique partition ID (PID) A reorganization number is maintained in each partition Incremented by each reorganization reload Each segment in PHDAM or PHIDAM database is assigned a unique token when created Indirect List Entry Key (ILK) 8 bytes stored in segment prefix
  12. 12. Self-Healing Pointers Using an Extended Pointer Set (EPS) Since reorg # in EPS matches reorg # ILDS in Partition DBDS, we use EPS RBA ILE pointer ILK ILE Segment Code Partition ID Current reorg # : 1 Segment A KSDS Current RBA EPS KEY ... Partition DBDS EPS Current reorg # :1 Partition ID Reorg # : 1 Indirect List Key (ILK) is stored in RBA Segment B segment prefix. ILK ILK ...
  13. 13. Self-Healing Pointers After reorganization of Partition Reorg moves segment B, updates reorg # in ILE and Partition DBDS, and changes ILDS ILE Current RBA in ILE ILK ILE Segment Code Partition ID Current reorg # : 2 Segment A KSDS Current RBA EPS KEY ... Partition DBDS EPS Current reorg # :2 Partition ID Reorg # : 1 Segment B Indirect List Key ILK (ILK) is stored in RBA segment prefix. ILK "broken" pointer ...
  14. 14. Self-Healing Pointers Using the EPS after the reorganization Since reorg # in EPS does not match reorg # in Partition DBDS, we use the ILE RBA ILDS ILE pointer ILK ILE Segment Code Partition ID Current reorg # : 2 Segment A KSDS Current RBA EPS KEY ... Partition DBDS EPS Current reorg # :2 Partition ID Reorg # : 1 Segment B Indirect List Key ILK (ILK) is stored in RBA segment prefix. ILK "broken" pointer ...
  15. 15. Self-Healing Pointers "Healing" the EPS When we use the ILE, we update the ILDS reorg # and RBA pointer in the EPS ILE ILK ILE Segment Code Partition ID Current reorg # : 2 Segment A KSDS Current RBA EPS KEY ... Partition DBDS EPS Current reorg # :2 Partition ID Reorg # : 2 Segment B Indirect List Key ILK (ILK) is stored in RBA segment prefix. "healed" pointer ILK ...
  16. 16. HALDB Database Data Sets Each HALDB database has up to 1001 partitions PHIDAM has index, ILDS, and up to 10 data set groups per partition 3 to 12 data sets per partition 3 to 12,012 data sets per database PHDAM has ILDS and up to 10 data set groups per partition 2 to 11 data sets per partition 2 to 11,011 data sets per database PSINDEX has no ILDS or data set groups 1 data set per partition 1 to 1001 data sets per secondary index
  17. 17. HALDB Database Data Sets PHIDAM PHDAM PSINDEX Index ... ... 1 to 1001 partitions ILDS ... ... ... ... Data ... ... ... ... 1 to 10 data set groups ... ... 1 to 1001 partitions 1 to 1001 partitions
  18. 18. Partition Independence Commands Allowed on both databases and partitions Availability Partitions are allocated and authorized independently Scheduling Based on database availability PCBs and INQY calls report database availability Partition may be unavailable with available database Database Utilities Allowed on individual partitions Concurrent processing of multiple partitions allowed
  19. 19. HALDB Overview Database candidates for HALDB Very large databases Approaching 4GB limitation Theoretical limit is now over 40 terabytes per database Medium and large databases Parallel processing to meet time deadlines Less frequent reorganizations due to more free space Any database More frequent reorganizations Making only parts of the data unavailable for database maintenance
  20. 20. HALDB Database Structures
  21. 21. Database Structures Logical relationships Virtual pairing is not allowed Limited to unidirectional or physically paired Logical child segments cannot be initially loaded Must be added by update Symbolic pointers are not used Secondary indexes must have unique keys /SX or /CK may be used to create uniqueness /SX is increased from 4 to 8 bytes (ILK) Symbolic pointers are not used
  22. 22. Database Structures PHIDAM primary indexes are not separately defined Defined as part of the PHIDAM database Applies to DBDGEN and system definition Parent pointers All segments have physical parent pointers
  23. 23. Database Data Sets PHIDAM PHDAM PSINDEX X A Index ... ... 1 to 1001 partitions ILDS ... L ... L ... ... Data ... A ... ... A ... - - 1 to 10 data set groups ... J ... J 1 to 1001 partitions 1 to 1001 partitions The data sets in a partition have generated data set names and DDNAMEs. Letters are used to distinguish them. X - PHIDAM index L - ILDS A through J - Data data sets A - PSINDEX
  24. 24. Database Data Sets DDNAMEs Partition name is basis for DDNAME Up to 7 characters Assigned in HALDB Partition Definition Utility or DBRC command Letter is used as suffix X for PHIDAM index L for ILDS A for PSINDEX A through J for data Example: Partition name: FRANCE DDNAME for PHIDAM Index: FRANCEX
  25. 25. Database Data Sets Data set names Begin with data set name prefix for the partition Up to 37 characters Assigned in HALDB Partition Definition Utility or DBRC command Letter and Partition ID are used as suffix X for PHIDAM index L for ILDS A for PSINDEX A through J for data Example: Partition data set name prefix IMP0.DB.INV23.FR Partition ID: 00004 Data set name PHIDAM Index: IMP0.DB.INV23.FR.X00004
  26. 26. Database Data Sets Data set size limitations Maximum data set size is 4GB Applies to OSAM and VSAM OSAM block sizes must be even
  27. 27. Partition DDNAMEs and Data Set Names Partition_name assigned by user in HALDB Partition Definition Utility or DBRC command DSN_prefix assigned by user in HALDB Partition Definition Utility or DBRC command PartitionID assigned by IMS in HALDB Partition Definition Utility or DBRC command Data set DDNAME Data Set Name Data set group 1 Partition_nameA DSN_prefix.ApartitionID Data set group 2 Partition_nameB DSN_prefix.BpartitionID Data set group 3 Partition_nameC DSN_prefix.CpartitionID ... ... ... Data set group 10 Partition_nameJ DSN_prefix.JpartitionID ILDS Partition_nameL DSN_prefix.LpartitionID PHIDAM Index Partition_nameX DSN_prefix.XpartitionID Secondary Index Partition_nameA DSN_prefix.ApartitionID
  28. 28. Partition DDNAMEs and Data Set Names Example: PHIDAM with 10 data set groups, FRANCE partition Partition_name of FRANCE DSN_prefix of IMP0.DB.INV23.FRANCE PartitionID of 00004 Data set DDNAME Data Set Name Data set group 1 FRANCEA IMP0.DB.INV23.FRANCE.A00004 Data set group 2 FRANCEB IMP0.DB.INV23.FRANCE.B00004 Data set group 3 FRANCEC IMP0.DB.INV23.FRANCE.C00004 ... ... ... Data set group 10 FRANCEJ IMP0.DB.INV23.FRANCE.J00004 ILDS FRANCEL IMP0.DB.INV23.FRANCE.L00004 PHIDAM Index FRANCEX IMP0.DB.INV23.FRANCE.X00004
  29. 29. Partition DDNAMEs and Data Set Names Example: PHIDAM with 10 data set groups, CANADA partition Partition_name of CANADA DSN_prefix of IMP0.DB.INV23.CANADA PartitionID of 00011 Data set DDNAME Data Set Name Data set group 1 CANADAA IMP0.DB.INV23.CANADA.A00011 Data set group 2 CANADAB IMP0.DB.INV23.CANADA.B00011 Data set group 3 CANADAC IMP0.DB.INV23.CANADA.C00011 ... ... ... Data set group 10 CANADAJ IMP0.DB.INV23.CANADA.J00011 ILDS CANADAL IMP0.DB.INV23.CANADA.L00011 PHIDAM Index CANADAX IMP0.DB.INV23.CANADA.X00011
  30. 30. Extended Pointer Set Extended pointer set (EPS) Used for logical relationships and secondary indexes Data: Reorg number of target partition Target partition ID Pointer to logical parent or sec. index target Pointer to paired logical child for physical pairing Database record lock ID of segment ILK 28 bytes
  31. 31. ILDS Data Sets Indirect List Entries (ILEs) Created or updated by reorg reload Reorgs do not update pointers in segments Not created or updated by non-reload processing This processing updates pointers in segments Initial load does not create ILEs
  32. 32. ILDS Data Sets ILE keys (9 bytes) ILK (8 bytes) RBA of segment at its creation time (4 bytes) Partition id at creation time (2 bytes) Reorg number at creation time (2 bytes) Segment code (1 byte)
  33. 33. ILDS Data Sets ILE data (50 bytes) Key (ILK and segment code) Flags Old and new copies of: Partition ID Reorg number Pointer to logical parent or sec. index target Database record lock ID for segment Pointer to paired logical child for physical pairing
  34. 34. HALDB Segment Format EPS in logical child segments and secondary indexes ILK in all PHDAM and PHIDAM segments Target root key in all PSINDEX segments PHDAM or PHIDAM segment (not a logical child) SC DB Counter and pointers ILK Data |-----------------------------Prefix-----------------------------------| PHDAM or PHIDAM logical child segment SC DB Pointers EPS ILK LPCK FID |-----------------------------------Prefix-------------------------------------------| PSINDEX segment DB EPS Root Key Index Data |--------------Prefix--------------------| SC - segment code DB - delete byte LPCK - log. parent concatenated key FID - fixed intersection data
  35. 35. DFSVSMxx and DFSVSAMP and Dynamic Allocation
  36. 36. DFSVSMxx Member or DFSVSAMP DD Data sets assigned to subpool with alphabetic characters Replaces data set numbers DBD=dbdname(data set identifier,id) dbdname - partition name or master database name data set identifier - Letter A-J, L, or X A-J for user data sets A for secondary index L for Indirect List Data Set (ILDS) X for PHIDAM primary index id - subpool id
  37. 37. DFSVSMxx member or DFSVSAMP DD PHDAM example PART1 PART2 PART3 ILDS Subpool L L L SP1 DDN=PART1L DDN=PART2L DDN=PART3L Subpool A A A Subpool DSG=A SP2 SP3 DDN=PART1A DDN=PART2A DDN=PART3A DSG=B Subpool B B B SP4 DDN=PART1B DDN=PART2B DDN=PART3B PHDAM database DFSVSMxx member: Database name: MASTDB DBD=MASTDB(L,SP1) 3 partitions DBD=MASTDB(A,SP2) 2 data set groups DBD=PART3(A,SP3) DBD=MASTDB(B,SP4)
  38. 38. Dynamic Allocation Dynamic allocation uses DBRC information HALDB Partition Definition utility or DBRC commands create this information DFSMDA is not used with HALDB Dynamic allocation should always be used One exception: The Database Recovery utility (DFSURDB0) requires a DD statement for the database data set DD statements cannot be used to override data set names
  39. 39. HALDB Partition Selection
  40. 40. Order of Segments in a PHDAM Database PHDAM with key range partitioning Keys are sequential between partitions, random within a partition ... 874 1712 2412 9210 321 1532 2012 9020 456 1219 2567 9791 PHDAM with Partition Selection Exit routine Keys are not sequential between partitions, random within a partition ... 2012 2412 874 6549 4516 7823 1712 7720 7718 8900 3432 9791
  41. 41. Order of Segments in a PHIDAM Database PHIDAM with key range partitioning Keys are sequential between partitions, sequential within a partition ... 321 1219 2012 9020 456 1532 2412 9210 874 1712 2567 9791 PHIDAM with Partition Selection Exit routine Keys are not sequential between partitions, sequential within a partition ... 2012 2412 874 6549 4516 7823 1712 7720 7718 8900 3432 9791
  42. 42. Order of Segments in a PSINDEX Database PSINDEX with key range partitioning Keys are sequential between partitions, sequential within a partition ... 321 1219 2012 9020 456 1532 2412 9210 874 1712 2567 9791 PSINDEX with Partition Selection Exit routine Keys are not sequential between partitions, sequential within a partition ... 2012 2412 874 6549 4516 7823 1712 7720 7718 8900 3432 9791
  43. 43. Changing HALDB Databases
  44. 44. Database Changes Changes affecting all partitions of the database DBD changes Partition selection exit Share level Nonrecoverable attribute RSR GSG name and/or tracking level These changes cannot be made if any partition is authorized
  45. 45. Partition Changes Changes affecting only one partition DSN prefix Randomizing module name Number of root anchor points Bytes parameter Free space Block size for OSAM CI size for VSAM* Changes cannot be made if the partition is authorized VSAM changes by IDCAMS, not PDU
  46. 46. Database Changes Changing high keys of partitions Changes not allowed if affected partitions are authorized Affected partitions must be unloaded before changes PINIT flag is set for affected partitions Affected partitions must be reloaded after initialization "Affected partitions" are those whose key range is changed Database records may be moved into or out of affected partitions
  47. 47. Example 1: Splitting a Partition If partition PB with high key 4000000 needs to be split –Unload partition PB HD Unload or HP Unload –Define new partition PE PA PB PC PD 2000000 4000000 6000000 8000000 Sets PINIT flag for PB and PE –Initialize partitions PB and PE HD Unload –Reload partitions PE and PB HD Reload or HP Load Define new partition –Partitions PA, PC, and PD are not affected HD Reload PA PE PB PC PD 2000000 3000000 4000000 6000000 8000000
  48. 48. Example 2: Modifying Partition Boundaries If records need to be moved from partition PB to PC –Unload partitions PB and PC HD Unload or HP Unload PA PB PC PD 2000000 4000000 6000000 8000000 –Change high key for partition PB HD Unload from 4000000 to 3000000 Sets PINIT flag for PB and PC Change high key –Initialize partitions PB and PC HD Reload –Reload partitions PB and PC HD Reload or HP Load PA PB PC PD 2000000 3000000 6000000 8000000 –Partitions PA and PD are not affected See warning in notes for this page
  49. 49. Example 3: Combining Partitions If partitions PB and PC with high keys 4000000 and 6000000 need to be combined –Unload partitions PB and PC PA PB PC PD 2000000 6000000 8000000 4000000 HD Unload or HP Unload –Delete definition of partition PB HD Unload Sets PINIT flag for PC –Initialize partition PC Delete partition –Reload partition PC definition HD Reload or HP Load –Partitions PA and PD are not affected HD Reload PA PC PD 2000000 6000000 8000000
  50. 50. Databases with Dates for Keys Some databases have dates as the high-order part of the key PA PB PC PD 2002xx 2003xx 2004xx 2005xx To add a partition for a set of dates (higher keys) –Define it and PA PB PC PD PE initialize it 2002xx 2003xx 2004xx 2005xx 2006xx To delete the partition with the lowest dates (keys) and all of its data PA PB PC PD PE –Delete the partition 2002xx 2003xx 2004xx 2005xx 2006xx definition –Turn off PINIT flag for PB Unloads and reloads are not required for these changes
  51. 51. Partition Selection Exit Routine Changes Changing Partition Selection Exit routine Change not allowed if affected partitions are authorized User determines which partitions are affected Must issue CHANGE.DB PINIT command or Use specific partition initialization Affected partitions must be initialized
  52. 52. Partition Selection Exit Changes Partition Selection Exit Adding an exit routine Preserves high keys in definition as key strings All partitions must be initialized Deleting an exit routine Partition strings cleared High keys must be defined All partitions must be initialized
  53. 53. Master Database Changes Changing Partition Selection Exit Adding a new partition Partition must be initialized User must determine other affected partitions Deleting a partition User must determine other affected partitions Changing a partition string or other changes User must determine affected partitions
  54. 54. Partition Changes Partition Data DBDS Changes GENMAX RECOVPD DEFLTJCL ICJCL OICJCL RECOVJCL RECVJCL Partition can be authorized Does not require partition initialization
  55. 55. Partition Changes Partition ID numbers are never reused Deletion and recreation of same partition name results in new partition ID Data set names are not reused because they include partition ID number 1. PARTC exists 2. PARTC deleted 3. PARTC recreated Partition Partition Partition Partition ID Partition ID Partition ID Name Name Name PARTA 00001 PARTA 00001 PARTA 00001 PARTB 00002 PARTB 00002 PARTB 00002 PARTC 00003 PARTC 00004
  56. 56. Partition Changes Disabling and enabling partitions was introduced by APAR PQ73858 for IMS V8 Included in IMS V9 Disabling partitions Definitions and information remain in RECONs Includes partition IDs, DSN prefixes, and recovery information Partitions are not used Partitions are ignored by IMS processing Disabled partitions may be enabled Enabled partitions are made active Enabled partitions are marked ‘recovery needed’
  57. 57. Partition Changes Use of disabling and enabling partitions Disabling is normally done prior to deleting a partition Keeps recovery information, partition ID, DSN names prefix, etc. If testing is successful, partition is deleted Deletion removes all information If testing is not successful, partition is enabled Partition is recovered and becomes active Other partitions may require timestamp recovery PDU support of disabling and enabling ‘Partition status’ field on ‘Change Partition’ panel DBRC commands for disabling and enabling
  58. 58. Partition Changes ILDS or PHIDAM Prime Index DBDSs Changes cannot be made by HALDB Partition Definition Utility Changes are made only by rebuilding the data sets
  59. 59. Secondary Indexes with HALDB
  60. 60. Secondary Indexes Partition selection exit may be able to partition a secondary index like its target database Secondary Index US UK FR US UK FR Target Database
  61. 61. Secondary Indexes Shared indexes are not supported Must have unique keys /SX and /CK may be used Symbolic pointing is not allowed Extended Pointer Set (EPS) contains direct pointer Target root key is stored in index segment Sparse indexing is supported
  62. 62. Secondary Indexes Migration of secondary index Must be migrated with target database Migration uses HD Unload and Reload Indexed database is read MIGRATX=YES option is preferred Migration Aid utility provides limited information about secondary indexes Creation of secondary index Created with initial load of target database An alternative will be covered later Work files not created Prefix Resolution, HISAM Unload and Reload not used
  63. 63. Secondary Indexes Addition of secondary index Cannot use standard IMS utilities to add an index IBM IMS Index Builder will add indexes Alternative for adding secondary index: Add definitions to target database Define secondary index Application program replaces source segments with different source data Application program re-replaces source segments with the original data Database could be initially loaded again with secondary index definitions
  64. 64. Secondary Indexes Reorganization of target database does not affect secondary index Secondary index does not have ILDS Partition Selection Exit may be used Secondary indexes may need to be reorganized
  65. 65. HALDB Miscellaneous Considerations
  66. 66. Extended Pointer Set (EPS) Adjustments When out of date pointer is found it is corrected on DASD if: Access intent is update or exclusive PROCOPT is update Locking considerations Read programs with update PROCOPTs may hold many locks If block level data sharing is used, block locks are held until sync point
  67. 67. Logging No logging of "after images" for PHIDAM indexes Rebuilt with DFSPREC0 utility "Before images" are not archived Only "after images" are logged for EPS adjustments Adjustments are not backed out Database change log records include partition name instead of master database name No logging for ILDS Only updated by HD Reload utility or Online Reorganization
  68. 68. OSAM Sequential Buffering HALDB supports OSAM Sequential Buffering (SB) Same support as for non-HALDB databases Recommended for batch sequential processing SB monitors by data set Sequential buffering is turned on/off due to access patterns Sequential buffering may be invoked for some, but not all partitions Well-organized vs. poorly-organized partitions
  69. 69. Data Set Groups HALDB supports data set groups (DSGs) DSGs are not needed to address database size limitations With non-HALDB databases, DSGs were often used to deal with data set size limitations DSGs remain useful May improve performance by moving rarely accessed data to another data set Reevaluate need for DSGs when migrating databases to HALDB
  70. 70. Database Exit Routines Database Exit Routines Routines: Segment Edit/Compression Exit Routines Data Capture Exit Routines Data Conversion User Exit Routine Secondary Index Database Maintenance Exit Routines Defined for entire database All partitions in database use the same exit routines Exit routines are not given partition information
  71. 71. Data Set Allocation Dynamic allocation uses DBRC information DFSMDA is not used Users cannot override data set information with DD statements for database data sets
  72. 72. Data Sharing Data sharing is supported SHARELVL specified on master database level Authorization is by partition Authorization occurs on first call to partition
  73. 73. HALDB Summary
  74. 74. HALDB Database Candidates Very large databases Approaching 4GB (VSAM) or 8GB (OSAM) limitations To allow for growth To make databases more manageable Previously partitioned databases Using IMS/ESA Partition Support Product (PDB) User partitioning
  75. 75. HALDB Database Candidates Medium and large databases Parallel processing to meet time deadlines Application programs Utilities
  76. 76. HALDB Database Candidates Any size database Faster reorganizations May be done more frequently Partition independence Making only parts of the data unavailable for database maintenance Online reorganization in IMS Version 9
  77. 77. Some Things to Remember Plan migrations of large databases to HALDB Logical relationships may add significant time Pay attention to PHDAM randomization parameters HALDB Migration Aid utility can analyze existing HALDB databases Useful when planning repartitioning Deleting a partition definition deletes its recovery information Disabling a partition keeps its recovery information Secondary indexes may require reorganizations They are not rebuilt when the indexed database is reorganized
  78. 78. Some Things to Remember Secondary index cannot be rebuilt from database with IMS utilities Don't make them non-recoverable unless you have a tool like the IBM Index Builder PHIDAM indexes and ILDSs have a different recovery process They are rebuilt with Index/ILDS Rebuild Utility (DFSPREC0) Plan your scheme for creating HALDB test databases DBRC registration is required for all databases
  79. 79. HALDB Summary Benefits Greater database capacity Without application changes Increased database availability Partitions, not databases, are removed from system Shortened reorganization process Batch window is shortened with concurrent processing
  80. 80. More Information on HALDB WWW.IBM.COM/IMS (The IMS webpage!) WWW.IBM.COM/SUPPORT/TECHDOCS Search on "HALDB" Results: IMS HALDB Database Administration IMS HALDB Reorganization Number Verification IMS Version 9 HALDB Online Reorganization Converting IMS Logically Related Database DBDs to HALDB Application Design and Programming with HALDB Migrating to IMS HALDB (High Availability Large Database)

×