IMS
             High Availability Large Database
                        (HALDB)
                      (subset of course ...
Topics

        Overview
        Database Structures
        Definition
        Partition Selection
        DBRC Support
 ...
HALDB Overview




CMW46 - IMS HALDB                    3
HALDB (High Availability Large Database)
          Large Database

              Databases are partitioned
               ...
HALDB (High Availability Large Database)
          Benefits

              Greater database capacity
               Withou...
Highlights

           Hierarchic structure is maintained
             A database record resides in one partition

       ...
Highlights

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

           DBDGEN
            Used to define database
              Hierarchic structure, data set gro...
Indirect Pointers

           HALDB uses both direct and indirect pointers for
           logical relationships and second...
Extended Pointer Set

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

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

           A...
Self-Healing Pointers
   Using an Extended Pointer Set (EPS)

      Since reorg # in EPS matches reorg #        ILDS
     ...
Self-Healing Pointers
   After reorganization of Partition
    Reorg moves segment B, updates reorg # in
    ILE and Parti...
Self-Healing Pointers
   Using the EPS after the reorganization
    Since reorg # in EPS does not match reorg
    # in Par...
Self-Healing Pointers
   "Healing" the EPS

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

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

                      PHIDAM                PHDAM                   PSINDEX


         Index    ...
Partition Independence

           Commands
            Allowed on both databases and partitions

           Availability
...
HALDB Overview

           Database candidates for HALDB
            Very large databases
              Approaching 4GB li...
HALDB Database Structures




CMW46 - IMS HALDB                               20
Database Structures

           Logical relationships

               Virtual pairing is not allowed
                 Limi...
Database Structures

           PHIDAM primary indexes are not separately defined

               Defined as part of the P...
Database Data Sets
                           PHIDAM                     PHDAM                        PSINDEX

           ...
Database Data Sets

           DDNAMEs
            Partition name is basis for DDNAME
              Up to 7 characters
   ...
Database Data Sets

           Data set names
            Begin with data set name prefix for the partition
              ...
Database Data Sets

           Data set size limitations

               Maximum data set size is 4GB
                Appl...
Partition DDNAMEs and Data Set Names

           Partition_name assigned by user in HALDB Partition Definition Utility or ...
Partition DDNAMEs and Data Set Names
         Example: PHIDAM with 10 data set groups, FRANCE partition
                  ...
Partition DDNAMEs and Data Set Names
         Example: PHIDAM with 10 data set groups, CANADA partition
                  ...
Extended Pointer Set

           Extended pointer set (EPS)
            Used for logical relationships and secondary index...
ILDS Data Sets

           Indirect List Entries (ILEs)

               Created or updated by reorg reload

              ...
ILDS Data Sets

           ILE keys (9 bytes)

               ILK (8 bytes)

                    RBA of segment at its cre...
ILDS Data Sets

           ILE data (50 bytes)

               Key (ILK and segment code)

               Flags

         ...
HALDB Segment Format
           EPS in logical child segments and secondary indexes
           ILK in all PHDAM and PHIDAM...
DFSVSMxx and DFSVSAMP
                             and
                       Dynamic Allocation




CMW46 - IMS HALDB    ...
DFSVSMxx Member or DFSVSAMP DD

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


   ...
Dynamic Allocation

           Dynamic allocation uses DBRC information

               HALDB Partition Definition utility...
HALDB Partition Selection




CMW46 - IMS HALDB                               39
Order of Segments in a PHDAM Database
           PHDAM with key range partitioning
            Keys are sequential between...
Order of Segments in a PHIDAM Database
           PHIDAM with key range partitioning
            Keys are sequential betwe...
Order of Segments in a PSINDEX Database
           PSINDEX with key range partitioning
            Keys are sequential bet...
Changing HALDB Databases




CMW46 - IMS HALDB                         43
Database Changes

           Changes affecting all partitions of the database

               DBD changes

               ...
Partition Changes

           Changes affecting only one partition
            DSN prefix
            Randomizing module n...
Database Changes

           Changing high keys of partitions

                Changes not allowed if affected partitions ...
Example 1: Splitting a Partition
    If partition PB with high key 4000000 needs to be split
         Unload partition PB
...
Example 2: Modifying Partition Boundaries
   If records need to be moved from partition PB to PC

        Unload partition...
Example 3: Combining Partitions

   If partitions PB and PC with high keys 4000000 and 6000000
     need to be combined
  ...
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 ...
Partition Selection Exit Changes

           Partition Selection Exit

               Adding an exit routine

            ...
Master Database Changes

           Changing Partition Selection Exit

               Adding a new partition

            ...
Partition Changes

           Partition Data DBDS Changes

                    GENMAX
                    RECOVPD
        ...
Partition Changes

           Partition ID numbers are never reused
            Deletion and recreation of same partition ...
Partition Changes
        Disabling and enabling partitions was introduced by
        APAR PQ73858 for IMS V8
            ...
Partition Changes
        Use of disabling and enabling partitions
             Disabling is normally done prior to deleti...
Partition Changes

           ILDS or PHIDAM Prime Index DBDSs

              Changes cannot be made by HALDB Partition De...
Secondary Indexes with HALDB




CMW46 - IMS HALDB                                  59
Secondary Indexes

           Partition selection exit may be able to partition a
           secondary index like its targ...
Secondary Indexes

           Shared indexes are not supported

           Must have unique keys
            /SX and /CK m...
Secondary Indexes
           Migration of secondary index

              Must be migrated with target database

          ...
Secondary Indexes

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

           Reorganization of target database does not affect
           secondary index

           Sec...
HALDB
                Miscellaneous Considerations




CMW46 - IMS HALDB                              65
Extended Pointer Set (EPS) Adjustments

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

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

           HALDB supports OSAM Sequential Buffering (SB)
            Same support as for non-HA...
Data Set Groups

           HALDB supports data set groups (DSGs)

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

           Database Exit Routines

               Routines:
                Segment Edit/Compressi...
Data Set Allocation

           Dynamic allocation uses DBRC information

              DFSMDA is not used

              ...
Data Sharing

           Data sharing is supported

               SHARELVL specified on master database level

          ...
HALDB Summary




CMW46 - IMS HALDB                   73
HALDB Database Candidates

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

 ...
HALDB Database Candidates

           Medium and large databases

               Parallel processing to meet time deadline...
HALDB Database Candidates

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

            Plan migrations of large databases to HALDB
              Logical relationships may a...
Some Things to Remember

            Secondary index cannot be rebuilt from database
            with IMS utilities
      ...
HALDB Summary

           Benefits
               Greater database capacity
                    Without application change...
More Information on HALDB

           WWW.IBM.COM/IMS (The IMS webpage!)
           WWW.IBM.COM/SUPPORT/TECHDOCS
         ...
Upcoming SlideShare
Loading in …5
×

Sr ims haldb

1,443 views

Published on

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,443
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
77
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Sr ims haldb

  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 CMW46 - IMS HALDB 1
  2. 2. Topics Overview Database Structures Definition Partition Selection DBRC Support Database Commands Utilities Database Creation and Migration Changing Databases Secondary Indexes Application and Misc. Considerations HALDB Online Reorganization Summary CMW46 - IMS HALDB 2
  3. 3. HALDB Overview CMW46 - IMS HALDB 3
  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 CMW46 - IMS HALDB 4
  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 CMW46 - IMS HALDB 5
  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 CMW46 - IMS HALDB 6
  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 CMW46 - IMS HALDB 7
  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 CMW46 - IMS HALDB 8
  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 CMW46 - IMS HALDB 9
  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! CMW46 - IMS HALDB 10
  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 CMW46 - IMS HALDB 11
  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 ... CMW46 - IMS HALDB 12
  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 ... CMW46 - IMS HALDB 13
  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 ... CMW46 - IMS HALDB 14
  15. 15. Self-Healing Pointers "Healing" the EPS When we use the ILE, we update the reorg ILDS # 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 ... CMW46 - IMS HALDB 15
  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 CMW46 - IMS HALDB 16
  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 CMW46 - IMS HALDB 17
  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 CMW46 - IMS HALDB 18
  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 CMW46 - IMS HALDB 19
  20. 20. HALDB Database Structures CMW46 - IMS HALDB 20
  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 CMW46 - IMS HALDB 21
  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 CMW46 - IMS HALDB 22
  23. 23. Database Data Sets PHIDAM PHDAM PSINDEX X A Index ... ... 1 to 1001 partitions ILDS ... L ... L ... ... ... ... ... ... A A Data - - 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 CMW46 - IMS HALDB 23
  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 CMW46 - IMS HALDB 24
  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 CMW46 - IMS HALDB 25
  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 CMW46 - IMS HALDB 26
  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 CMW46 - IMS HALDB 27
  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 CMW46 - IMS HALDB 28
  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 CMW46 - IMS HALDB 29
  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 CMW46 - IMS HALDB 30
  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 CMW46 - IMS HALDB 31
  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) CMW46 - IMS HALDB 32
  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 CMW46 - IMS HALDB 33
  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 CMW46 - IMS HALDB 34
  35. 35. DFSVSMxx and DFSVSAMP and Dynamic Allocation CMW46 - IMS HALDB 35
  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 CMW46 - IMS HALDB 36
  37. 37. DFSVSMxx member or DFSVSAMP DD PHDAM example PART1 PART2 PART3 ILDS Subpool L L L SP1 DDN=PART1L DDN=PART2L DDN=PART3L DSG=A Subpool A A A Subpool 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) CMW46 - IMS HALDB 37
  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 CMW46 - IMS HALDB 38
  39. 39. HALDB Partition Selection CMW46 - IMS HALDB 39
  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 CMW46 - IMS HALDB 40
  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 CMW46 - IMS HALDB 41
  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 CMW46 - IMS HALDB 42
  43. 43. Changing HALDB Databases CMW46 - IMS HALDB 43
  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 CMW46 - IMS HALDB 44
  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 These changes cannot be made if the partition is authorized CMW46 - IMS HALDB 45
  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 CMW46 - IMS HALDB 46
  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 Define new partition HD Reload or HP Load Partitions PA, PC, and PD HD Reload are not affected PA PE PB PC PD 2000000 3000000 4000000 6000000 8000000 CMW46 - IMS HALDB 47
  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 CMW46 - IMS HALDB 48
  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 PD PB PC HD Unload or HP Unload 2000000 4000000 6000000 8000000 Delete definition of partition PB Sets PINIT flag for PC HD Unload Initialize partition PC Reload partition PC Delete partition definition HD Reload or HP Load Partitions PA and PD are not affected HD Reload PA PC PD 2000000 6000000 8000000 CMW46 - IMS HALDB 49
  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 initialize it PA PB PC PD PE 2002xx 2003xx 2004xx 2005xx 2006xx To delete the partition with the lowest dates (keys) and all of its data Delete the partition PA PB PC PD PE definition 2002xx 2003xx 2004xx 2005xx 2006xx Turn off PINIT flag for PB Unloads and reloads are not required for these changes CMW46 - IMS HALDB 50
  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 CMW46 - IMS HALDB 51
  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 CMW46 - IMS HALDB 52
  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 CMW46 - IMS HALDB 53
  54. 54. Partition Changes Partition Data DBDS Changes GENMAX RECOVPD DEFLTJCL ICJCL OICJCL RECOVJCL RECVJCL Partition can be authorized Does not require partition initialization CMW46 - IMS HALDB 54
  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 CMW46 - IMS HALDB 55
  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’ CMW46 - IMS HALDB 56
  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 CHANGE.PART DBD(dname) PART(pname) DISABLE CHANGE.PART DBD(dname) PART(pname) ENABLE CMW46 - IMS HALDB 57
  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 CMW46 - IMS HALDB 58
  59. 59. Secondary Indexes with HALDB CMW46 - IMS HALDB 59
  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 CMW46 - IMS HALDB 60
  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 CMW46 - IMS HALDB 61
  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 CMW46 - IMS HALDB 62
  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 CMW46 - IMS HALDB 63
  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 CMW46 - IMS HALDB 64
  65. 65. HALDB Miscellaneous Considerations CMW46 - IMS HALDB 65
  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 CMW46 - IMS HALDB 66
  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 CMW46 - IMS HALDB 67
  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 CMW46 - IMS HALDB 68
  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 CMW46 - IMS HALDB 69
  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 CMW46 - IMS HALDB 70
  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 CMW46 - IMS HALDB 71
  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 CMW46 - IMS HALDB 72
  73. 73. HALDB Summary CMW46 - IMS HALDB 73
  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 CMW46 - IMS HALDB 74
  75. 75. HALDB Database Candidates Medium and large databases Parallel processing to meet time deadlines Application programs Utilities CMW46 - IMS HALDB 75
  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 CMW46 - IMS HALDB 76
  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 CMW46 - IMS HALDB 77
  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 CMW46 - IMS HALDB 78
  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 CMW46 - IMS HALDB 79
  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) CMW46 - IMS HALDB 80

×