utl_file.fopen Parameters in Oracle

In Oracle utl_file.fopen is a function, which opens a file on the server by returning its file handle. Function utl_file.fopen parameters in Oracle are as follows:

utl_file.fopen Syntax

UTL_FILE.FOPEN (
location IN VARCHAR2,
filename IN VARCHAR2,
open_mode IN VARCHAR2,
max_linesize IN BINARY_INTEGER) 
RETURN file_type;

utl_file.fopen Examples

1. utl_file.fopen in Write Mode Example

UTL_FILE.fopen ('OUTDIR',
'mytextfile.csv',
'w',
1000);

2. utl_file.fopen in Read Only Mode Example

UTL_FILE.fopen ('OUTDIR',
'mytextfile.csv',
'r',
1000);

Reference:

Oracle Utl_File.fopen

See also:

  1. The full example of UTL_FILE to Write File
  2. Read file using UTL_FILE in Oracle
  3. Import CSV file in Oracle Efficiently
Vinish Kapoor
Vinish Kapoor

Vinish Kapoor is a seasoned software development professional and a fervent enthusiast of artificial intelligence (AI). His impressive career spans over 20 years, marked by a relentless pursuit of innovation and excellence in the field of information technology. As an Oracle ACE, Vinish has distinguished himself as a leading expert in Oracle technologies, a title awarded to individuals who have demonstrated their deep commitment, leadership, and expertise in the Oracle community.