I have this very simple, basic proc to create a test file.
This file is created in E:\DATA location which is what (my) Oracle recognizes and writes to that default location, no problem.
But instead of E:\DATA, I would like to write this text file to another Server location.
How can I write this text file to any Server I have privileges to?
Either a Server or my own HardDrive.
Have fun.
---- Andy
There is a great need for a sarcasm font.
This file is created in E:\DATA location which is what (my) Oracle recognizes and writes to that default location, no problem.
Code:
CREATE OR REPLACE PROCEDURE ANDY_CREATE_FILE
(p_ReturnCode IN OUT NUMBER,
p_VBErrorMessage IN OUT VARCHAR2)
IS
my_file utl_file.file_type;
orac_path VARCHAR2(100) := 'E:\DATA';
BEGIN
my_file := utl_file.fopen(orac_path, 'ANDY_CREATE_FILE.dat', 'w');
utl_file.put_line(my_file, 'Some Junk Goes Here');
utl_file.fclose(my_file);
EXCEPTION
WHEN NO_DATA_FOUND THEN
NULL;
WHEN OTHERS THEN
raise_application_error(-20001,'An error was encountered - '||SQLCODE||' -ERROR- '||SQLERRM);
--RAISE;
END ANDY_CREATE_FILE;
/
But instead of E:\DATA, I would like to write this text file to another Server location.
How can I write this text file to any Server I have privileges to?
Either a Server or my own HardDrive.
Have fun.
---- Andy
There is a great need for a sarcasm font.