Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Reading a BFILE

Reading a BFILE

From: joa <quin0815_at_sbcglobal.net>
Date: 17 May 2004 13:35:40 -0700
Message-ID: <c8b7ms$rn0@odah37.prod.google.com>


Hi everyone, I'm new to using LOB's with Oracle and I'm trying to view a BFILE that I created. I created this procedure, CREATE OR REPLACE PROCEDURE BFILE_proc IS

File_1       BFILE := BFILENAME('FILE_DIR', 'test.pdf');
Amount        INTEGER := 32767;
Position      INTEGER := 1;
Buffer        RAW(32767);

BEGIN SELECT file INTO File_1 FROM doc_table
WHERE FILE_ID = 1; DBMS_LOB.OPEN(File_1, DBMS_LOB.LOB_READONLY);

DBMS_LOB.READ(File_1, Amount, Position, Buffer);

DBMS_LOB.CLOSE(File_1);
END; But when I call it from SQL + I get this ERROR at line 1:
ORA-22288: file or LOB operation FILEOPEN failed Permission denied

ORA-06512: at "SYS.DBMS_LOB", line 605
ORA-06512: at "PTLTDR.PKG_GLOBAL_2", line 98
ORA-06512: at line 1

I checked my premission and read acces was granted to me. Wondering if anyone has any ideas?

Thank you in advance,
Joaquin Received on Mon May 17 2004 - 15:35:40 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US