5 Replies Latest reply: Sep 15, 2013 9:38 AM by John Spencer RSS

    Lob column error


      Hi All,


      I have created a directory in my "C" drive with name of "SAP" as well in oracle also. Like this


      SQL> conn sys/password as sysdba;


      SQL> create or replace directory SAP as 'C:\SAP';

      directory created.

      NOTE : I have copied 1.jpeg file

      SQL> grant read,write on directory sap to scott;

      grant succeed.


      SQL> conn scott/tiger;


      SQL> create table test_lob(id number,name varchar2(10),pic bfile);

      table created.


      SQL> insert into test_lob(1,'saahithi',bfilename('SAP','1.jpeg'));

      1 row created.


      SQL> select dbms_lob.getlength(PIC) from test_lob;

      ERROR at line 1:

      ORA-22288: file or LOB operation GETLENGTH failed

      The system cannot find the file specified.

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


      I am using oracle version.


      Please advise...!!