The PROLOG utility truncates the database log file online or offline.
For versions
prior to OpenEdge 10.1A, PROLOG can only be used to truncate a database log file when the database is
offline. Refer to Article:
OpenEdge 10.1A enhanced the PROLOG utility with the
-online option, so that it can also be run against a database running in multi-user mode.
$ prolog <dbname> -online
- To save the current log file, use Operating System utilities to copy it up before using PROLOG
- PROLOG removes old log entries, preserving approximately the last 3072 bytes of the file.
- It is possible some messages may be lost while performing the online truncation, therefore it is advisable to truncate the database lg file online while there is less log entry activity
- Ideally, PROLOG can be included in the backup scripts to save the log file entries relating to that backup
- OpenEdge versions prior to 10.1C04 and 10.2A01, the PROLOG utility is still limited to 32-bit lseek. Database lg files greater than 2GB cannot be truncated with PROLOG. For these versions refer to Article Truncating database lg file with PROLOG fails
2GB logfile PROLOG limits:
OpenEdge 10.2B, OpenEdge Service Packs
10.1C04 and
10.2A01, the PROLOG utility has been made aware of 2 GB database lg files. Database lg files exceeding 2GB can be truncated
online or
offline with PROLOG.
OpenEdge 11.7, There's a regression in 11.7 with truncating 2GB log files with PROLOG. The workaround is listed in Article:
PROLOG Enhancements:
OpenEdge 11.5, further enhanced the PROLOG utility as follows:
- When PROLOG is run online, all the database startup parameters are re-logged in new lg file, preserving approximately the last 3072 bytes of the file.
- The -silent option was added for the startup parameters not to be re-logged, reverting the behavior to OpenEdge 10.1A PROLOG -online
- Specifying -online is no longer required when running PROLOG against an online database. PROLOG will execute against a database that is online without specification. The -online parameter is maintained for backward compatibility.
OpenEdge 11.7.3, The following database startup parameters were added to manage the database logfile:
- -lgArchiveDir - Database log file archive directory
- -lgArchiveEnable - Archive database log file before truncation
- -lgTruncateFrequency - Frequency of database log file truncation. Used in conjunction with -lgTuncateTime to determine the time of the truncation on the specified days.
- -1 == "Not Enabled"
- Values are {0 .. 8} where:
- 0 == Daily,
- {1,2,...,7} == indicate weekly on each day Monday (1),Tuesday (2),..., Sunday (7),
- 8 == monthly, on the last day of the month.
- -lgTruncateSize - The maximum size the database log file can grow before truncation (in megabytes)
- -lgTruncateTime - Time of day for the database log file truncation (in hours and minutes: HH:MM) The string: format is HH:MM. Valid range for the-time-of day to truncate is 00:00 through 23:59. It can only be set to one time.
Logfile management parameters can be modified online with the
_DbParams VST or PROMON:
PROMON > R&D > 4. Administrative Functions > 15. Database log file management
When configured through OEM/OEE, a known defect for "lgtruncatefrequency=0" (Daily) is ignored and log file truncation never happens as this is set to -1 denotes "Not Enabled":