Re: dbms_lob.fileopen hangs/won't return

From: Mark D Powell <>
Date: Tue, 28 Apr 2009 06:42:48 -0700 (PDT)
Message-ID: <>

On Apr 27, 4:00 pm, doug <> wrote:
> Every time I run the code below, it just hangs.  If I run it in SQL
> Developer it just sits there waiting on a response.  Any one have any
> ideas why? This is a short version code I have in an application that
> opens a file/indexes the text, and it is causing the application to
> freeze up too.
>         src_file BFILE;
>         src_file := bfilename('SOME_DOC_DIR', '0.pdf');
>         -- open the file
>         dbms_lob.fileopen(src_file, dbms_lob.file_readonly);
>         -- close the file
>         dbms_lob.fileclose(src_file);
> END;
> Thanks.

What version of Oracle? For instance with 10gR2 the manual recommends using OPEN instead of FILEOPEN with BFILES.

Do you check the return code on all LOB operations? What is the return code from the fileopen?

A pdf file is a binary file. I have never tried to open one via dbms_lob. How are you trying to use the contents?

You should place some messaging code into your program so you can see exactly where in the code the hang is occurring.

HTH -- Mark D Powell -- Received on Tue Apr 28 2009 - 08:42:48 CDT

Original text of this message