UTL_FILE – Writing to an Operating System File
UTL_FILE
========
This package is supplied by Oracle and is used to read an operating system file or write to
an operating system file.
So if you are thinking of reading and processing data fro man operating system file or writing
to a file to generate a report or something like that then you will definitely need to use this
handy Oracle supplied package.
ACCESSING OPERATING SYSTEM FILE STRUCTURE
=========================================
To access an operating system directory structure for read/write the directory need to be defined first.
In earlier versions of Oracle (i.e. Oracle 8.0.4) the init.ora parameter UTL_FILE_DIR is used define
the directories to be used in UTL_FILE. While using that parameter it is necessary to re-start Oracle
database so that your Oracle instance understands this parameter.
The parameter is defined as:
UTL_FILE_DIR=’/home/oracle/dave/’ — for single directory
or
UTL_FILE_DIR=’/home/oracle/dave/’, ‘/home/oracle/tom/’, ‘/home/oracle/jim/’ –for multiple directories
Recent Comments