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

Home -> Community -> Usenet -> c.d.o.server -> DBMS_LOB question - LOADFROMFILE problem

DBMS_LOB question - LOADFROMFILE problem

From: David <dfairman16_at_hotmail.com>
Date: 29 May 2003 03:48:42 -0700
Message-ID: <b4cefdce.0305290248.2030bcb1@posting.google.com>


Hi, I have been using DBMS_LOB to load files from a native file system into an Oracle 8.1.7.0.0 database. An excerpt of the code I have used is below (the line numbers are for reference only):

  1. DBMS_LOB.FILEOPEN(l_BFILE);
  2. DBMS_LOB.LOADFROMFILE(l_CLOB,l_BFILE,500);
  3. DBMS_LOB.CLOSEFILE(l_BFILE);

An exception on line 2. was thrown and the file was never closed, that is line 3 never executed. Now when I try to delete the file in the underlying file system is says (Win2K) "Cannot delete xxxx.txt: There has been a sharing violation".

I've fixed the problem in the code so that when exceptions are raised, the file will be closed from now on. But I am not sure now how to get Oracle to close the file it holding onto (other than taking down the database/server which isn't an option).

Hmmm. Ideas anyone?

Thank you
David Received on Thu May 29 2003 - 05:48:42 CDT

Original text of this message

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