|
Database oracle10g, used in stored procedures
utl_file.fopen ('csv_dir', 'csvfilename.csv', 'W');
One sentence, where 'csv_dir' is produced with
create or replace directory csv_dir as 'c:\temp\csv'
Where 'c:\temp\csv' is the actual directory.
But the execution of the stored procedure error, the following error is reported
ORA-29280: invalid directory path
ORA-06512: at "SYS.UTL_FILE", line 33
ORA-06512: at "SYS.UTL_FILE", line 436
ORA-06512: at "ADMIN.CSVTEST", line 14
ORA-06512: at line 1
What are the reasons for this? !!
The entire stored procedure is as follows:
CREATE OR REPLACE PROCEDURE "ADMIN". "CSVTEST" AS
NFNO UTL_FILE.FILE_TYPE;-csv file type
BEGIN
-CSV file open
NFNO: = UTL_FILE.FOPEN ('csv_dir', 'xumztest.csv', 'A');
UTL_FILE.PUT_LINE (NFNO, 'a, b, c, d');
-CSV file close
UTL_FILE.FCLOSE (NFNO);
END CSVTEST; |
|