Hi,

First check whether UTL_FILE_DIR parameter is set or not.
sql>show parameter utl_file_dir
or
sql>select * from v$parameter where name='utl_file_dir';

If you dont get a value, then it is not set.
If a value for UTL_FILE_DIR is not set, then you cannot use the UTL_FILE package.

This being a static parameter (u cant change using ALTER SYSTEM SET.. command), you need to bring down the instance, edit the init.ora file to include the UTL_FILE_DIR parameter and then restart the instance.

Note that you need to sepcify a valid path for the UTL_FILE_DIR parameter, and that that directory has write permissions set.

specify the directory in the following way in the inid.ora file:

UTL_FILE_DIR="/uo2/oradata2/prod/utl_dir/"

If u wish to specify multiple directories, put multiple entries in the init.ora file, line by line, and continuously:

UTL_FILE_DIR="/uo1/oradata1/prod/utl_dir/"
UTL_FILE_DIR="/uo2/oradata1/prod/utl_dir/"
UTL_FILE_DIR="/uo3/oradata2/prod/utl_dir/"

And Last, but not the least: READ THE DOCUMENTATION !!
Regards,
Suhas
"Shoot for the moon, even if u miss, u'll land among the stars !!"