SQL> CREATE DIRECTORY log_dir AS '/appl/gl/log';
SQL> GRANT READ ON DIRECTORY log_dir TO DBA;
SQL> CREATE DIRECTORY out_dir AS '/appl/gl/user'';
SQL> GRANT READ ON DIRECTORY user_dir TO PUBLIC;
--删除的方法及参数介绍
FREMOVE Procedure
This procedure deletes a disk file, assuming that you have sufficient privileges.
Syntax
UTL_FILE.FREMOVE (
location IN VARCHAR2,
filename IN VARCHAR2);
--复制的介绍
FCOPY Procedure
This procedure copies a contiguous portion of a file to a newly created file. By default, the whole file is copied if the start_line and end_line parameters are omitted. The source file is opened in read mode. The destination file is opened in write mode. A starting and ending line number can optionally be specified to select a portion from the center of the source file for copying.
Syntax
UTL_FILE.FCOPY (
location IN VARCHAR2,
filename IN VARCHAR2,
dest_dir IN VARCHAR2,
dest_file IN VARCHAR2,
start_line IN PLS_INTEGER DEFAULT 1,
end_line IN PLS_INTEGER DEFAULT NULL);