Salesforce

Truncating a 2GB database lg file with PROLOG fails

« Go Back

Information

 
TitleTruncating a 2GB database lg file with PROLOG fails
URL NameP141193
Article Number000157186
EnvironmentProduct: Progress
Version: 9.x
Product: OpenEdge
Version: 10.0x, 10.1x, 10.2A
OS: All supported platforms
Other: PROLOG
Question/Problem Description
Truncating the database lg file offline with PROLOG aborts.
Database lg file fails to truncate with PROLOG -ONLINE
After the database lg file truncation failure, the database lg file is still same size as it was previously.
Steps to Reproduce
Clarifying Information
PROLOG -ONLINE was introduced in OpenEdge 10.1A
PROLOG was introduced in Progress 9
Error Messageuname -2117937864 dbname.lg
(1)lseek failed -13872 with error 0
dbname.lg is less than 3072 bytes - truncation aborted.
Defect NumberDefect PSC00210751 / OE00180941
Enhancement Number
Cause
The lseek position is 32-bit limited for the PROLOG utility, database lg files greater than 2GB cannot be truncated.
Resolution
Upgrade to OpenEdge 10.2B and later, OpenEdge Service Packs 10.1C04 and 10.2A01 where database lg files exceeding 2GB can now be truncated online or offline with the PROLOG utility which has been made aware of 2 GB database lg files.

There is however a regression in OpenEdge 11.7 with truncating 2GB log files with PROLOG, the workaround is listed in this Article 000029201 below. Details of the regression are documented in Article:
Workaround
Apart from assuring the database log file is truncated with PROLOG before it reaches 2GB in size:

Workaround: OFFLINE

a. Use OS utilities to archive the current database lg file for later reference
b. Instead of running PROLOG, delete the database lg file

Workaround1: ONLINE upgrade to OpenEdge 11.7.3 

Use the lgTruncateSize database startup parameter to manage the database logfile before it reaches 2 GB, which is arguably too large for practical parsing analysis:
  • -lgTruncateSize - The maximum size the database log file can grow before truncation (in megabytes)
For further information refer to Article  How truncate the log file while the database is running since 10.1A  

Workaround2: ONLINE Use OS Utilities

a. Use OS utilities to archive the current database lg file for later reference

b. First check for size of lg file before running PROLOG:

Example: [UNIX]:

SIZE=`ls -ls dbname.lg | awk '{ print $1 }'`

if [ $SIZE -lt 2097152 ] # if lg file is < 2 GB
then
prolog dbname.lg
fi


Example [WINDOWS]:

for /f %%a IN ('dir /b *.lg') DO (
if 2097152 geq %%~zF call runprolog.bat %%~na %%~xa
)


# runprolog.bat
CALL prolog %1


c. A
n alternative method is described in Article How to truncate a database log when the database is online.   
 

Notes
Keyword Phrase
Last Modified Date11/20/2020 7:01 AM

Powered by