Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Oracle 9.2 - cyclical overwrite of files written with UTL_FILE in
Hi!
We've encountered a strange phenomenon since we changed from Oracle 8.1.7 to
Oracle9i Enterprise Edition Release 9.2.0.2.1 - Production With the Partitioning, OLAP and Oracle Data Mining options JServer Release 9.2.0.2.0 - Production
We use the UTL_FILE package to write log messages into files on the oracle server (WIN2K).
Putting a single line of text into the logfile consists of basically
...
UTL_FILE.FOPEN...
UTL_FILE.PUT_LINE... -- always in append mode
Before the release change we could inspect the logfiles
( remotely with win2k clients using a file share )
with any text editor *while* the oracle process was appending lines
to the logfiles without any problem.
Repeatedly opening - closing - reopening the file
- even (re)moving or modifying it - worked perfectly,
as the file was recreated or appended to as soon as the next
log entry occurred.
But now in 9.2, if we open-close-reopen a logfile ( without modifying the file in the editor ) while it is being appended to, it will be periodically truncated after having grown up to approximately 1000 lines (20-100 characters per line on average).
Before the truncation happens, the last line contains dozens of ASCII 0 characters. ( We were able to catch this peculiarity using the free PFE-Editor, which can detect that a file has been changed by another application while you are viewing the file.)
After truncation the former last line with the ASCII NULLS has disappeared.
However, if we don't "touch" the file with an editor - we tried a few different ones, including Notepad - while it is being written, truncation does not happen.
This "phenomenon" is rather annoying, we are used to inspect the logfiles to monitor our oracle jobs' performance/progress/errors, moreover we use UTL_FILE to create CSV files for exporting data to other applications. If anybody opens such a file unaware of the fact, that the file is being currently written to, data loss is very likely...
Please excuse my poor English.
Any ideas or similar experiences
or just another Oracle bug?
Thanks in advance for your thoughts,
Andreas
-- Please see the official ORACLE-L FAQ: http://www.orafaq.net -- Author: INET: Andreas.Haunschmidt_at_voestalpine.com Fat City Network Services -- 858-538-5051 http://www.fatcity.com San Diego, California -- Mailing list and web hosting services --------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).Received on Wed Mar 05 2003 - 17:19:56 CST
![]() |
![]() |