Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA-22288:file or LOB operation FILEOPEN failed while loading XML file.

626240Mar 3 2008
Hello all,
I am getting the following error messages while loading XML file to Oracle 9i table.

declare
*
ERROR at line 1:
ORA-22288: file or LOB operation FILEOPEN failed
No such file or directory
ORA-06512: at "SYS.DBMS_LOB", line 504
ORA-06512: at line 10

The script I am using is all follows:-

1. Created a file ldxmldata.sh on unix server directory

dd conv=ucase if=$1|sed 's/<?XML/<?xml/'|sed 's/VERSION/version/'|sed 's
/RECORD/ROW/'|sed 's/DATE/TRANSDATE/'|sed 's/&/-/'|sed 's/\/DATE>// TRANSDATE>/'>$1.UCASE
sqlplus sales/sales@rac @upld.sql $1.UCASE

2. Created SQL file upld.sql on unix server

set serveroutput on
exec DBMS_JAVA.SET_OUTPUT(1000000);
@ldxml.sql bsl.xml.UCASE
commit;
exit
/

3. Created sql file ldxml.sql on unix server

declare
insCtx DBMS_XMLSave.ctxType;
rows number;
file bfile := bfilename('XML_DIR','&1');
charContent CLOB := ' ';
targetFile bfile;
warning number;
begin
targetFile := file;
DBMS_LOB.fileopen(targetFile, DBMS_LOB.file_readonly);
DBMS_LOB.loadfromFile(charContent,targetFile,DBMS_LOB.getLength(tar
getFile),1,1);
insCtx := DBMS_XMLSave.newContext('sales.s_price');
rows := DBMS_XMLSave.insertXML(insCtx,charContent);
DBMS_XMLSave.closeContext(insCtx);
DBMS_LOB.fileclose(targetFile);
end;
/

4. As Sys,
Created a directory XML_DIR and assigned it the path of Unix server directory
where the script files reside.
Granted read priviledge on XML_DIR to user sales.

I am getting the above error messages. Kindly help with some possible solution.
Arun Patodia
Bokaro Steel City
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 31 2008
Added on Mar 3 2008
0 comments
1,447 views