Its got nothing fancy and a simple google would yield the needed info. Then the use of this blog? If thats what you were thinking....Folks googling , you will faind the info distributed. I have tried my best to put everything at one place.
I am assuming an oracle database on a windows machine;
The compact algorithm is -
Step1: Entry in your init.ora file -> utl_file_dir = dirPath
Step2: Create virtual directory mapping for oracle which points to the actual physical directory where the files are stored
Step3: Grant appropriate permissions on the virtual directory.
Step4: Create the file you would like to read thru PL/SQL, on the physical location
Step5: Write a procedure which would use the “utl_file” package of Oracle to read/write to a file
To get the details of this algo please click here