Home » RDBMS Server » Server Administration » Delete file created bt UTL_FILE function.
Delete file created bt UTL_FILE function. [message #370675] Tue, 18 January 2000 17:54 Go to next message
Greg Skakun
Messages: 10
Registered: January 2000
Junior Member
Within a PL/SQL block I need to be able to delete a file that was created within the same block using the UTL_FILE. UTL_FILE has no functionality for deleting (in case an Oracle error occurs) or renaming files file.

In addition, if a file is open for write using UTL_FILE when an Oracle error occurs, Oracle automatically closes the file on the exit of the block.

This process is running on an N/T server using 7.3.4 and 8.0.?

I have a FTP service that continually checks for the creation of these files and FTPs the files to another system. I want to delete the files if any errors occur before the FTP process picks them up.
Re: Delete file created bt UTL_FILE function. [message #370696 is a reply to message #370675] Thu, 20 January 2000 10:32 Go to previous message
Mike
Messages: 417
Registered: September 1998
Senior Member
The way I solved a similar problem on 7.3.3.6
was to write two files the one was the data file the other was a flag file if the flag file was present I deleted both files if the flag file was not present I processed the datafile then deleted it.
As of Oracle8 there is away to call OS programs from plsql called external procs it is somewhat complicated so please check Oracle Application developer guide for oracle 8 it is available on technet.oracle.com or on your oracle docs cd
Previous Topic: Re: owa_sec and login
Next Topic: How to keep a sequence value unchanged when rollback occurs
Goto Forum:
  


Current Time: Fri Mar 29 04:23:58 CDT 2024