If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

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:

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.
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 !!"

You don't need to set this parm in 92, maybe you should read the documentation dude.

Here's a simple example that you should be able to build on to create your own proc

SQL>
SQL> Create or Replace procedure UTLTEST as
2 f1 utl_file.file_type;
3 begin
4 f1:= utl_file.fopen('MYFILE','NEWFILE.TXT','W');
5 utl_file.put_line(f1,'1. This is a test of UTL_FILE packages');
6 utl_file.put_line(f1,'2. Oracle has added a new procedures in the package');
7 utl_file.put_line(f1,'3. We will see all the procedure one by one');
8 utl_file.fclose(f1);
9 end;
10 /