Hi guys - sorry for the newbie type question:
using
---Database Version---
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
PL/SQL Release 11.2.0.3.0 - Production
CORE 11.2.0.3.0 Production
TNS for Linux: Version 11.2.0.3.0 - Production
NLSRTL Version 11.2.0.3.0 - Production
I'm maintaining a system we're using a cutting edge 1980's method of writing data to a file using utl_file.
The files are currently opened in Append mode with the file name containing the current date/time down to the second.
my current issue is when two processes are executing the same code simultaneously we get files containing data from both processes with all the ugliness that ensues...
What's the best way to check whether the file exists prior to writing to it?
I was thinking opening it in readonly mode and checking whether I get a file handle or not - is that the correct way?