Skip to Main Content

SQL & PL/SQL

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!

dbms_lob.open ORA-22288: file or LOB operation FILEOPEN failed

Shahzad Ahmed KhanMay 15 2015 — edited May 18 2015


Hello

I am trying to open lob in pl/sq but getting error. Here is my simple code:

create or replace directory "MY_DIR" as '\\compname\sharedir';

declare

            l_bfile bfile := bfilename( 'MY_DIR', 'foo.txt' );

    begin

            if ( dbms_lob.fileexists( l_bfile ) = 1 )

            then

                    dbms_lob.open(l_bfile, dbms_lob.file_readonly);

                    dbms_output.put_line( 'File open successfully' );

            else

                    dbms_output.put_line( 'No' );

            end if;

   end;

   /

 

if i provide local directroy path in create directory then it works fine but if i give network path then i got the following error

Error report:

ORA-22288: file or LOB operation FILEOPEN failed

ORA-06512: at "SYS.DBMS_LOB", line 937

ORA-06512: at line 6

22288. 00000 -  "file or LOB operation %s failed\n%s"

*Cause:    The operation attempted on the file or LOB failed.

*Action:   See the next error message in the error stack for more detailed

           information.  Also, verify that the file or LOB exists and that

           the necessary privileges are set for the specified operation. If

           the error still persists, report the error to the DBA.

the same code is running in one box but on other box it is not able to open file from network dir.

I have double check that shared directory is open to everyone to read and write access.  i have grant all permission on oracle directory object.

Is there any settng for some parameters to allow UNC path in oracle directory object?

Thanks,

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 15 2015
Added on May 15 2015
2 comments
1,996 views