troubleshooting Question

Store Files Outside Oracle XE from APEX

Avatar of HHG
HHG asked on
Oracle Database
7 Comments1 Solution2195 ViewsLast Modified:
Hi,

How can I store files (PDF, GIF, ...) outside Oracle XE database?

I found this link -> <b>Writing BLOB to OS-file</b>:
http://monkeyonoracle.blogspot.com/2009/10/storing-images-outside-oracle-xe-with.html

when trying to run the following code:
<i>
declare
l_file         blob;
l_content      clob := 'This is soon to be a blob';
l_src_offset   integer := 1;
l_dest_offset  integer := 1;
l_lang_ctx     integer := dbms_lob.default_lang_ctx;
l_warn         integer;
begin
dbms_lob.createtemporary(l_file, false);
dbms_lob.converttoblob(l_file, l_content, dbms_lob.getlength(l_content), l_dest_offset, l_src_offset, 1, l_lang_ctx, l_warn);
write_to_file('testfile.txt', 'IMAGES', l_file);
dbms_lob.freetemporary(l_file);
exception
when others
then
 dbms_lob.freetemporary(l_file);
 raise;
end;
</i>

I got these errors:
ORA-29283: invalid file operation
ORA-06512: at "SYS.UTL_FILE", line 475

Regards,

Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 7 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 7 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros