Truncating .lg file while database is running

kkinneer

New Member
Truncating .lg file while database is running -

Anyone know offhand how to do this? I couldn't find any posts so maybe it's obvious but I can't find it in startup parameters or proutil options.

Thanks,
Kevin Kinneer
 
vinod_home said:
copy the lg file into a backup file and cat /dev/null > log file all in the same script...

Sorry, forgot to provide environment. Windows server supporting v8 and v10.

But I get your drift. I tried opening the .lg from Progress and seeking to 0 and this worked. So if nothing else we can launch prowin32 to do it (is there a way to read command line parameters?).

If anyone knows of a way to do this from cmd.exe in Windows, I sure would appreciate the advice.

Thanks,
Kevin
 
Hello Tom,

K:\kyris\test\db>echo > remitOE.lg
The process cannot access the file because it is being used by another process.

And all the non Windoze people chuckle. Redirect (>) seems to need exclusive access to the file.

Kevin
 
Here's an old MSDOS technique to blank an open file which still works with W2K. Never tried this technique with Progress, so back up first! (Or you could install unix). By the way, the blank "echo" command mentioned above is an enquiry as to the current state of MSDOS "command echo" rather than a unix-like "echo".

copy /Y nul: myfile

The MSDOS device "nul:" is equivalent to unix "/dev/null".
The "Y" overrides the "Overwrite?" check.
 
Back
Top