Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> how to read a file from ASM using BFILENAME and DBMS_LOB.FILEOPEN?
Hi,
I need your help concerning the following issue. I have generated a dump file using datapump into an ASM diskgroup. Now I want to read the resulting dump file using DBMS_LOB.FILEOPEN into a BLOB and to send it afterwards to a ftp location. The problem is that DBMS_LOB.FILEOPEN procedure raises an exception complaining that:
ORA-22288: file or LOB operation FILEOPEN failed No such file or directory
Below is the steps I followed:
connect admin/xxx
create directory dumps_dir as '+DG_DATA/dumps';
GRANT READ, WRITE ON DIRECTORY DUMPS_DIR TO FITS_DUMPMAN;
2. verify if the dump really exist:
[oracle_at_rac1 ~]$ ORACLE_SID=+ASM1 asmcmd ASMCMD> ls -al DG_DATA/dumps
Type Redund Striped Time Sys Name Nfits_common_repository.dmp =>
fits_dumpman_at_racdb> declare
2 l_bfile bfile; 3 begin 4 l_bfile := BFILENAME('DUMPS_DIR', 'fits_common_repository.dmp'); 5 DBMS_LOB.fileopen(l_bfile, DBMS_LOB.file_readonly); 6 dbms_lob.filecloseall; 7 end; 8 /
declare
l_bfile bfile;
begin
l_bfile := BFILENAME('DUMPS_DIR', 'fits_common_repository.dmp');
DBMS_LOB.fileopen(l_bfile, DBMS_LOB.file_readonly);
dbms_lob.filecloseall;
end;
ORA-22288: file or LOB operation FILEOPEN failed
No such file or directory
ORA-06512: at "SYS.DBMS_LOB", line 523
ORA-06512: at line 5
Any idea why this file is not accesible to DBMS_LOB.fileopen? Are there any issues in connection with using DBMS_LOB and ASM storage?
Many thanks in advance!
alec.
Received on Thu Apr 19 2007 - 04:05:20 CDT