Trying to create an output file through a procedure but am unable to modify the init.ora to allow for utl_file_dir or create directory. Is there another way to accomplish this without creating a table and doing a simple spool, this unfortunately, is out the question, too.
Asked
Active
Viewed 1,133 times
2 Answers
1
No. You will need access to init.ora
to get this done the nice way through Oracle.
The only other option I can think of is the use of a Java procedure to do the file writing. I couldn't find any special requirements you need to have set to use that. Read up on the subject here.

Patrick Hofman
- 153,850
- 22
- 249
- 325
-
to piggy back off the article you linked to, this one was helpful as well. https://oracle-base.com/articles/8i/file-handling-from-plsql which I only found because I knew what to search for from your answer. – DEwok Jun 18 '15 at 21:20
-1
If you have access to sqlplus then add dbms_output.put_line messages to the code and run it in sqlplus. Before running type:
spool <filename you want>
then
spool off
to close the file and stop writing.
Either that or using Java could be an option but you will need additional privileges to access the file system and compile a java method on the db.
You should really be given access to a directory on the filesystem. Speak to a dba and if there is a business requirement you should be able to make it happen.

kayakpim
- 985
- 2
- 8
- 28
-
1
-
OP needs to speak to his dba - to summarize, he can't change anything about his environment and he can't run sqlplus through a client. What exactly can he do! – kayakpim Jun 19 '15 at 10:01