This document describes the ADAREC processing considerations when a database is to be recovered.
When a complete database is being regenerated, it is recommended to use the nucleus parameter OPTIONS = UTILITIES_ONLY when starting the nucleus after having restored the database (see the utility ADANUC for more detailed information). This will prevent all other users from updating the database before the regenerate has been started. If, however, the nucleus is not started with the OPTIONS=UTILITIES_ONLY parameter enabled, it is enabled when regenerate processing of the first Protection Log is started. When OPTIONS=UTILITIES_ONLY has to be enabled by ADAREC, ADAREC checks to see whether updates have been performed between starting the nucleus and starting ADAREC. Any updates that may be found are displayed. When the regenerate terminates, either successfully or at a calculated restart point, and users want to have access to the database again, the OPTION=UTILITIES_ONLY parameter must be disabled using the utility ADAOPR (see the utility ADAOPR for more detailed information).
It is recommended to increase the NU parameter of ADANUC by at least 1 compared to the original session.
If the whole database is to be regenerated, it may be useful to start the nucleus with the NOPLOG option, and to shut it down and restart it after the regeneration has finished. Before the restart, a new backup copy should be generated.
During the regenerate processing, no update activity involving any of the files being processed by ADAREC can be attempted until an interrupted ADAREC run has been successfully re-started.
BI_CHECK ensures that the Protection Logs are regenerated in the correct order, and matches the before images in the Protection Log against the actual data in the database. If ADAREC issues BI error responses (ISN in use; record not found; before image mismatch), the following should be checked in order to determine the cause of the error:
Was the correct BACKUP restored?
Was a Protection Log regenerated in the wrong order?
Was the correct file reloaded when reloading a file?
Was the nucleus started with OPTIONS=UTILITIES_ONLY enabled?
Were the correct utilities rerun?
Did ADAREC enable the OPTIONS=UTILITIES_ONLY feature and were any updates performed before ADAREC was started?
The cause of the error should be investigated, and, where possible, corrected: just rerunning the Protection Log with the NOBI_CHECK option is not recommended.
Using the NOBI_CHECK option as the default with BI error logging disabled (NOERROR_LOG) is not recommended. Regenerating a database under such conditions may lead to unwanted data records being inserted, data records being lost and inconsistencies in the file's index.
The NOBI_CHECK option should only be used as a last resort in cases where no other course of action is available, e.g.:
A given Protection Log is missing or cannot be read;
The correct file could not be reloaded and the user wishes to recover as much data as possible.
When the NOBI_CHECK option is used, index errors that may occur during regenerate processing will NOT be seen. Data Storage errors, however, will be reported and appropriate action taken (see the ON_ERROR option of the utility ADAREC for further information).