Re: dbms_lob.fileopen hangs/won't return

From: Mark D Powell <Mark.Powell_at_eds.com>
Date: Tue, 28 Apr 2009 06:42:48 -0700 (PDT)
Message-ID: <dc5c3804-64b2-4a5e-88b8-f14967032a39_at_z16g2000prd.googlegroups.com>



On Apr 27, 4:00 pm, doug <douglass_da..._at_earthlink.net> 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.
>
> DECLARE
>         src_file BFILE;
> BEGIN
>         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