Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: copy a BFILE to a BLOB
Several ideas:
First, try to grant read on directory to the user who owns the procedure.
Then, open the file descriptor you fetched (DBMS_LOB.FILEOPEN()). You could
also check if the descriptor already is open and if it isn't then open it,
else leave it as it is. To make long story short, you need a) to study App
Dev Guide and b) to program in a correct manner.
May the force be with you,
Mladen Gogala
In article <36533C43.1E9A00D6_at_cc.ece.ntua.gr>,
vagelis Hristidis <exrist_at_cc.ece.ntua.gr> wrote:
>
> --------------D1E0610487B2E1AF22E1DC7A
> Content-Type: text/plain; charset=iso-8859-7
> Content-Transfer-Encoding: 7bit
>
> I try to copy a BFILE to a BLOB:
>
> declare
> bl1 BLOB;
> bf1 BFILE;
> begin
> select bf into bf1
> from bfiles
> where id=23;
> select bl into bl1
> from imtable
> where id=11
> for update;
> DBMS_LOB.LOADFROMFILE(bl1,bf1,1000000);
> commit;
> end;
> /
>
> but I get:
> declare
> *
> ERROR at line 1:
> ORA-22285: non-existent directory or file for KOLFLBCTX2 operation
> ORA-06512: at "SYS.DBMS_LOB", line 414
> ORA-06512: at line 16
>
> Any ideas?
> Thanks in advance.
> Please mail to me
>
> --
> Vagelis S. Hristidis
> Electrical and Computer Engineering
> National Technical University of Athens
> e-mail:exrist_at_cc.ece.ntua.gr
> URL:http://www.cc.ece.ntua.gr/~exrist
>
> --------------D1E0610487B2E1AF22E1DC7A
> Content-Type: text/html; charset=iso-8859-7
> Content-Transfer-Encoding: 7bit
>
> <HTML>
> I try to copy a BFILE to a BLOB:
>
> <P><I>declare</I>
> <BR><I> bl1 BLOB;</I>
> <BR><I> bf1 BFILE;</I>
> <BR><I>begin</I>
> <BR><I> select bf into bf1</I>
> <BR><I> from bfiles</I>
> <BR><I> where id=23;</I>
> <BR><I> select bl into bl1</I>
> <BR><I> from imtable</I>
> <BR><I> where id=11</I>
> <BR><I> for update;</I>
> <BR><I> DBMS_LOB.LOADFROMFILE(bl1,bf1,1000000);</I>
> <BR><I> commit;</I>
> <BR><I>end;</I>
> <BR><I>/</I>
>
> <P>but I get:
> <BR><I>declare</I>
> <BR><I>*</I>
> <BR><I>ERROR at line 1:</I>
> <BR><I>ORA-22285: non-existent directory or file for KOLFLBCTX2 operation</I>
> <BR><I>ORA-06512: at "SYS.DBMS_LOB", line 414</I>
> <BR><I>ORA-06512: at line 16</I>
>
> <P>Any ideas?
> <BR>Thanks in advance.
> <BR>Please mail to me
>
> <P>--
> <BR>Vagelis S. Hristidis
> <BR>Electrical and Computer Engineering
> <BR>National Technical University of Athens
> <BR>e-mail:exrist_at_cc.ece.ntua.gr
> <BR>URL:<A
HREF="http://www.cc.ece.ntua.gr/~exrist">http://www.cc.ece.ntua.gr/~exrist</A>
> <BR> </HTML>
>
> --------------D1E0610487B2E1AF22E1DC7A--
>
>
-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Fri Nov 20 1998 - 00:00:00 CST
![]() |
![]() |