Specification of C-ISAM file definitions within PROIV is unaffected by using transaction management facilities.  Transaction management is activated by setting the environment variable CISAMLOG. If set, this environment variable must contain the path name of an existing C-ISAM logfile. A PROIV process then uses this logfile to record all C-ISAM file modifications. It is not possible to select specific files to be logged.  If CISAMLOG is not set, the process performs no logging. Logfiles can be created using the -c option of the supplied crecover utility.

If there is a system failure, you must perform a recovery.  This involves rerunning all the completed transactions recorded in one or more logfiles (a technique called roll-forward recovery).  Logfiles can be recovered using the -r option of the supplied crecover utility.  Before recovery can be performed, it is essential that data files are restored from backup to their state immediately before the applications started to use the (first) logfile.  Unless backups are 'synchronized' with the use of new logfiles, recovery cannot be performed. After recovering from a system failure, it is recommended that a new logfile be started.

If there is an abnormal termination of individual PROIV processes, whether a recovery is necessary depends on the cause of the termination.  Where termination is due to loss of terminal connection, user-requested abort or a clean kill (for example, specifically, in the case of the signals SIGHUP, SIGQUIT or SIGTERM), an active transaction is rolled back before the process stops.  In these cases, the process attempts to display the message Terminating due to received signal.  In other cases (for example a memory fault or the use of 'kill -9') the process cannot rollback an active transaction and, to ensure file integrity, you must perform a recovery using the same method as for a system failure.

It is essential that all application programs running concurrently and sharing data files use the same logfile; otherwise, modifications cannot be reprocessed in the correct order. It follows that in order to switch from using one logfile to another no applications should be running. Note that if a process is accessing shared, recoverable files, and it fails to use the same logfile as other processes or fails to use any logfile, it will NOT be detected as an error.

Path names of data files are recorded in the logfile.  If relative path names are used in applications, all applications must run from the same directory and recovery must be performed from that directory.  The user-ID where recovery is performed must have permissions to update (and create if applicable) all the logged data files. It is essential to prevent any other programs accessing the data files while a recovery is in progress. If you are recovering multiple logfiles, it is essential to recover them in the correct order (the order in which they were used). For this reason, beware of using a wildcard to specify multiple logfiles to the crecover utility.

Wherever possible, logfiles should reside on a different disk drive from data files that are being logged.  This prevents data being vulnerable to the failure of a single physical device and may improve performance. For additional information on transaction management in C-ISAM see the C-ISAM Programmer's Manual.

Comment on this topic

Topic ID: 720258

Table of Contents

Index

Glossary

-Search-

Back