The FRENAME procedure is used to rename a file.
Applicability
This topic applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition does not support this feature.
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 path and name of the source file (case-sensitive). |
| src_filename | The name of the source file to be renamed. |
| dest_location | The path of the destination file. |
| dest_filename | The new name of the file. |
| overwrite | Specifies whether to overwrite the destination file if it exists. The default value is FALSE, which means the destination file will not be overwritten. If the destination file exists, the RENAME_FAILED exception will be returned. Additionally, OceanBase Database does not verify whether the destination path and file exist or whether the admin user has sufficient privileges. |
Exceptions
ACCESS_DENIEDINVALID_FILENAMEINVALID_PATHRENAME_FAILED
