Write to a file on network share
PretaSep 24 2009 — edited Sep 29 2009Hi,
I want to read a file from windows network share and write the processed output back to the share. The share has read and write permissions for Everyone.
I can read and write to files on the oracle server but am unable to do it on a network share.
Can anyone please help?
Below is my code.
CREATE or replace DIRECTORY ext_tab_dir AS '\\<ip>\My_Shares';
GRANT READ, WRITE ON DIRECTORY ext_tab_dir TO SCOTT;
declare
f utl_file.file_type;
s varchar2(200);
begin
f := utl_file.fopen('EXT_TAB_DIR','sample1.txt','W');
utl_file.put_line(f,'Test');
utl_file.fclose(f);
dbms_output.put_line(s);
end;
/
Edited by: Priyabrat on Sep 24, 2009 8:58 AM