Re: dbms_lob.fileopen hangs/won't return
Date: Tue, 28 Apr 2009 09:40:47 -0700 (PDT)
On Apr 28, 9:42 am, Mark D Powell <Mark.Pow..._at_eds.com> wrote:
> 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 --
At the point where it was doing the open, it would freeze, never to return.
I figured out what it is though. The problem was not with Oracle, but was that the volume that the data is on was not mounted properly. Oracle could not get to that dir and apparently the call to open the file blocks when that happens. So, more of an OS issue.
-d Received on Tue Apr 28 2009 - 11:40:47 CDT