Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

XML invalid file operation DBMS_XSLPROCESSOR

User_DT8TOJan 20 2012 — edited Jan 23 2012
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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 20 2012
Added on Jan 20 2012
3 comments
1,097 views