3.0.0

how can i save file in DB Server

Hi,
Can anyone plz tell me how to place the files in the db server?
We have a procedure to generate an xml. We are trying to place it in a folder. when I give an existing folder('/public/nowyfolder') it gives an error.
I tried to create a folder using

CREATE OR REPLACE DIRECTORY sys_dir AS 'D:\tsxml'
it is giving a msg ORA-01031: insufficient privileges.
Kindly let me know how to access a UTIL FILE on the server.
It also gave an error.
The proc is as follows.
-------------------------------------------------------------------------------------------------------------------------------
BEGIN

dbms_output.put_line('inside the fileopen');
fileHandler := UTL_FILE.FOPEN('/public/nowyfolder', FileName, 'w');
dbms_output.put_line('after writing to file');
UTL_FILE.PUTF(fileHandler, xmlString);
UTL_FILE.FCLOSE(fileHandler);
dbms_output.put_line('fileclosed');
EXCEPTION
WHEN utl_file.invalid_path THEN
INSERT INTO TS_Data_Trace(Creation_Date,xml_data) VALUES(sysdate,'Failed in Spooling');

END;
Adam
May 16,

This topic is archived.

See also:


Back to support forum

Search

Version 2

Looking for AW 2.6 ?
The old site is here.