The FRENAME stored procedure renames a file.
Syntax
UTL_FILE.FRENAME (
src_location IN VARCHAR2,
src_filename IN VARCHAR2,
dest_location IN VARCHAR2,
dest_filename IN VARCHAR2,
overwrite IN BOOLEAN DEFAULT FALSE);
Parameters
| Parameter | Description |
|---|---|
| src_location | The absolute path of the source file, which is case-sensitive. |
| src_filename | The name of the source file to be renamed. |
| dest_location | The path of the target file. |
| dest_filename | The new name of the file. |
| overwrite | Specifies whether to overwrite the target file if it exists. The default value FALSE specifies not to overwrite the target file. When the default value is used, the stored procedure returns the RENAME_FAILED exception if the target file exists. In addition, OceanBase Database does not verify whether the target path and file exist or whether the admin user has the required privileges. |
Exceptions
ACCESS_DENIEDINVALID_FILENAMEINVALID_PATHRENAME_FAILED