DB2 Version 9.7 for Linux, UNIX, and Windows

logretain - Log retain enable configuration parameter

This parameter has been deprecated since Version 9.5, but is still being used by pre-Version 9.5 data servers and clients. Any value specified for this configuration parameter will be ignored by the database manager in DB2® Version 9.5 or later releases. Starting in Version 9.5, the logarchmeth1 configuration parameter is used to set the LOGRETAIN value.
Note: The following information applies only to pre-Version 9.5 data servers and clients.
This parameter determines whether active log files are retained and available for rollforward recovery.
Configuration type
Database
Parameter type
Configurable
Default [range]
Off [ Recovery; Off ]
The values are as follows:
  • Off, to indicate that logs are not retained.
  • Recovery, to indicate that the logs are retained, and can be used for forward recovery.

If logretain is set to Recovery or userexit is set to Yes, the active log files will be retained and become online archive log files for use in rollforward recovery. This is called log retention logging.

After logretain is set to Recovery or userexit is set to Yes (or both), you must make a full backup of the database. This state is indicated by the backup_pending flag parameter.

Note:

Both logarchmeth1 or logretain will enable rollforward recovery. However, only one method should be enabled for a database at one time.

If using logarchmeth1, do not set the logretain and userexit configuration parameters. If the logretain configuration parameter is set to recover, the value for logarchmeth1 will automatically be set to logretain.

It is recommended that logarchmeth1 (and logarchmeth2) be used rather than logretain and userexit to activate archive logging and rollforward recovery. The logretain and userexit options have been kept to support users who have not yet migrated to logarchmeth1.