Deciding Whether to Use Fencing

You can fence some, all, or none of your application programs. When you program with fences, you can still force a recovery to ignore the fences by using additional qualifiers to MUPIP JOURNAL /RECOVER. The following lists advantages and disadvantages for fencing transactions.

Fencing Advantages:

  • Faster recovery

  • Minimum risk recovery

  • Databases recovered from journals that include fences do not require post-recovery checks and repairs for logical consistency

Fencing Disadvantages:

  • Must be programmed into the M code

    If the application is already structured to minimize logical transaction breakage problems, inserting the fencing commands may be a largely mechanical task. In less structured applications, inserting fences immediately "inside" the M LOCKs associated with transactions may provide an excellent first approximation of proper fencing.

  • Fencing requires additional CPU resources and adds entries to the journal file(s)

  • Fencing may duplicate methods of recovery already established to address these issues

    An application structured so that all information for each logical transaction is stored in a single global node (while other nodes hold only redundant information), permits rebuild programs to completely correct logical inconsistencies. With less restrictive designs, logical inconsistencies may be corrected manually or by using semi-automated techniques.