HP 3000 Manuals

How DBAPLUS Restructures a Database [ DBChange Plus User's Guide ] MPE/iX 5.0 Documentation


DBChange Plus User's Guide

How DBAPLUS Restructures a Database 

Before actually beginning the restructure, DBAPLUS creates an
intermediate version of the database.  The new root file and any data
sets which have structural changes are created as temporary files.  Once
DBAPLUS has created all these temporary files, it begins the restructure.
If the restructure is successful, the original data sets are purged and
the new ones saved.


CAUTION * If one of the stored changes in the change file is the reordering of data sets, you should not have any temporary files named ALTERnn where nn is the number of one of the data sets in the database. The DBAPLUS program creates temporary files with these names and overwrites your temporary files. * Do not create a database with the name TEMPDB. The DBAPLUS program creates a file name TEMPDB to restructure master data set. Your TEMPDB file will be purged and can also prevent the DBAPLUS from processing.
Possible Restructuring Problems If a fatal error occurs during the restructuring process, the following situations may occur leaving the original database in an inconsistent state. If this happens, resolve the error and restore the database from your backup copy. * If a detail data set path is changed, the associated master set in the original database is altered during the restructuring process. If the detail set whose path you changed has more than one path, all the master data sets associated with these additional paths are also altered. Their chain counts are reset to zero to allow the chains to be rebuilt while processing the path change. If a fatal error occurs during this change or after it is processed, those associated master data sets which are permanent files in the original database are left in an inconsistent state. * If data sets are reordered from top to bottom, the original database is altered during the restructuring process. For example, if the original SET02 becomes SET03 after the resequence, the DBAPLUS program places SET02 in a temporary file named SET03 to prevent a naming conflict with the original SET03. Therefore, SET02 in the original database is altered or no longer exists. This top to bottom reordering occurs when a set is moved above its original position in the schema, or when a set is added or deleted from the database. If a fatal error occurs during this change or after it is processed, the original database is left in an inconsistent state. * If the entries in a detail data set are erased, the automatic master data set(s) linked to the detail data set may be purged and re-created with zero entries. The chain count and chain pointers of the path to the detail data set may also be updated to zero. Additionally, the manual master data set(s) linked to the detail data set may have chain count and chain pointers updated to zero. The original data set is purged and re-created with zero entries. * If the entries in a manual master data set are erased, the original data set is purged, then re-created with zero entries. If a fatal error occurs after the original data set is purged, no manual master data set exists. * When a detail data set is repacked, the chain pointers in the master data set linked to the detail data set are adjusted. The pointers in the detail data set are also adjusted.


MPE/iX 5.0 Documentation