TLOG Files

Describes the transaction log files (TLOGs) used in IMS database Backward and Forward recovery.

TLOG File Properties

You specify the properties for TLOG files using the following environment variables:

ES_IMS_DB_TLOG_WRITETHRU
When set to 0 (zero), forces the flushing of TLOG buffers to disk on COMMIT only (default). When set to 1, forces the flushing of TLOG buffers to disk on all database I/O.
ES_IMS_TLOG_COMPRESS
When set to 0 (zero), disables compression of the Backward Recovery TLOG file. When not compressed, the file contains only the information required to recover databases. The default is enabled.
Note: When enabled, Enterprise Server reclaims space in the file when information becomes obsolete.
ES_IMS_TLOG_FLUSH
When set to 1, forces the frequent flushing of TLOG and database buffers to disk.
Warning: Depending upon the number of database updates, the frequency of commits, and other computer activity, use of ES_IMS_TLOG_FLUSH could result in significant performance degradation.
Note: This environment variable is deprecated. Use ES_IMS_DB_TLOG_WRITETHRU to flush TLOG buffers and ES_IMS_DB_COMMIT_FLUSH to flush database buffers.
ES_IMS_TLOG_MAXSIZE
Maximum size of the IMS DB transaction logging file in bytes. The default is 4GB or h"FFF00000".
ES_IMS_TLOG_PATH
The location of IMS DB transaction logging files. The default is the Enterprise Server system directory.
Note: Once created, you can move log files, but do not rename them. Before attempting to recover a database, all log files must reside in the directory specified by ES_IMS_TLOG_PATH.
ES_IMS_TLOG_THRESHOLD
Threshold size of the IMS DB transaction logging file. When reached, the current TLOG file is closed and a new TLOG file created for subsequent transactions. The default is 2GB or h"7FFFFFFF".

TLOG File(s) used to Recover Databases

The actual TLOG file or files used to recover an IMS database depends on whether or not Forward recovery is enabled or disabled.

Forward Recovery Enabled
For both Forward and Backward recovery, use the most recent Forward recovery TLOG file.
Note: TLOG files created when Forward Recovery is enabled are not backed up because they are never overwritten.
Forward Recovery Disabled
For Backward recovery, use the default log file, IMSDB.TLOG, which is always backed up before a new one is created.

TLOG Naming Convention

With the exception of the IMSDB.TLOG file created and used when Forward recovery is disabled, Enterprise Server generates and renames TLOG files using this naming convention:

serverName-YYMMDDhhmmssmm.TLOG

Where serverName is the name of the server on which the database is stored, and YYMMDDhhmmssmm represents two digits for each: year, month, day, hour, minute, second, and millisecond.

Depending on the size of the database and the volume of transactions, recovery log files can become quite large. To better manage large-volume logs, Enterprise Server occasionally creates extension logs. The name of an extension log file is the same as the originating log file, plus an appended extension number such as 001, 002, etc.

During a recovery process, Enterprise Server uses log file time stamps to determine which log file or files are required for the restoration, and excludes out-of-date log files from the recovery. This minimizes the time required to complete the recovery.

TLOG File Contents

You can view the contents of a TLOG file using the cobfhtlog utility as follows:

  1. Start an . If you need instructions, see To start an .
  2. Change to the directory specified as your ES_IMS_TLOG_PATH environment variable.
  3. Enter:
    cobfhtlog filename
    Where filename is the name of a TLOG file.

The contents of the file are written to the screen. The following example represents a snippet of the contents of a TLOG file:

rollfwd data
    data len: 00019
    data    : 100000006 00000006
    …..
commit prep
     session: 0000000002
    sequence no: 00000000000000000006
    date time: 17081415252517
     …..
commit begun
     session: 0000000002
 sequence no: 00000000000000000007
     date time: 17081415252523
      …..
commit comp
     session: 0000000002
 sequence no: 00000000000000000008
     date time: 17081415252523
Note: In the above example, the date time value for commit comp represents a point in time you can use with the Recovery Utility and Recovery function PITR parameter. See Recovery function and Recovery Utility for details.