This scenario demonstrates how to reorganize a HALDB database.
About this task
The following procedure introduces a typical
job stream for reorganizing a HALDB database. Some steps are optional.
Procedure
- Optional: Back up the partitions you are reorganizing.
The IMS Database Image Copy utility (DFSUDMP0) or IMS High Performance Image Copy creates a copy of each data set
group of the old partitions. This is the backup copy of your database. It can be used when something
goes wrong during the reorganization process.
Recommendation: This step
is not mandatory, however, it is recommended that you always include this step in your
reorganization job.
- Unload the partitions.
The IMS HD Reorganization
Unload utility
(DFSURGU0) or IMS High Performance
Unload creates a sequential data set that contains the old unloaded
partitions. You can choose to unload a single partition, a sequence
of partitions, or all of the partitions in your database.
- Optional: Run DBDGEN.
This IMS procedure creates the DBDs for the reorganized
database. If you want to change the parameters in your DBD that affect all partitions, you must
reorganize all of the partitions of your database.
- Optional: Change partition definitions.
IMS HALDB Partition
Definition utility (DFSHALDB) changes the HALDB partition definitions
stored in the DBRC RECON data sets.
- Optional: Delete then define the partition
data sets.
IDCAMS deletes and allocates the partition data sets. For VSAM, you must use the REUSE parameter
in the original CLUSTER definition to make this step optional. To switch to the VSAM load mode
to improve the performance of the ILDS rebuilding process, specify the REUSE parameter in your ILDS
CLUSTER definition, and specify ILDSBLD=YES.
- Optional: Mark partitions as
needing initialization.
The DBRC CHANGE.DB command
marks a partition as needing initialization. If you are sure that
every partition you are reorganizing will be populated by segments
after reload, you can skip this step. If not, mark all partitions
you are reorganizing as needing initialization.
- Run the Physical Sequence Sort for Reload
utility.
If you change the partition boundaries during
the reorganization, this step is mandatory. Physical Sequence Sort
for Reload sorts the unloaded database records so that the partitions
are in the order that is required for the subsequent IMS HP Load run.
- Run IMS HP Load.
If you mark the partitions as needing initialization, specify
PARTINIT=YES in your IMS HP Load
job.
- Rebuild the indirect list
data set (ILDS).
Rebuild the ILDS by using the IMS HALDB Index/ILDS Rebuild utility
(DFSPREC0). This utility creates the ILDS from the HALDB partition
data.
If the ILDS is already rebuilt in the IMS HP Load step, you can omit this step.
- Back up the partitions you have reorganized.
This
step creates the first backup copy of the new partitions.