Press "Enter" to skip to content

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

I am a full stack developer and writing about development. I document everything I learn and help thousands of people. foxinfotech.in is created, written, and maintained by me, it is built on WordPress, and hosted by Bluehost. Connect with me on Facebook, Twitter, GitHub and get notifications for new posts.

You may also like:

Be First to Comment

    Leave a Reply

    Your email address will not be published. Required fields are marked *