XML invalid file operation DBMS_XSLPROCESSOR
Hello,
I made a procedure to create some xml file and then save all this files in a folder.
1. So first I created my directory:
create or replace directory test_dir as 'c:\oracle\test';
2. XML
CREATE OR REPLACE PROCEDURE Getloc3
IS
xmldoc CLOB;
BEGIN
FOR r IN (
SELECT XMLSerialize(DOCUMENT
XMLElement(
...
)
) as xmldoc
FROM table_name
WHERE ...
)
LOOP
DBMS_XSLPROCESSOR.clob2file(r.xmldoc, 'TEST_DIR', 'index'||TO_CHAR(SYSDATE, 'YYYYMMDD-HH24MISS')||'.xml');
END LOOP;
END;
/
When I create the procedure I dont have errors. The problem is when I execute, that I have this errors:
ORA-29283: invalid file operation
ORA-06512: at "SYS.UTL_FILE", line 475
ORA-29283: invalid file operation
ORA-06512: at "XDB.DBMS_XSLPROCESSOR", line 317
ORA-06512: at "VPS.GETLOC3", line 57
ORA-06512: at line 2
Any Idea?
Thanks