Problem on Inserting Blob from sqlplus.
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: Problem on Inserting Blob from sqlplus.

  1. #1
    Join Date
    Sep 2002
    Posts
    6

    Question

    Friends,

    I did the following for inserting the image using from sqlplus .. can any one help me to find what exactly is the problem.

    CREATE OR REPLACE DIRECTORY IMAGES AS 'C:\';

    CREATE TABLE tab1 (col1 BLOB);

    i try to import the file into a BLOB datatype and insert it into the table:

    DECLARE
    v_bfile BFILE;
    v_blob BLOB;
    BEGIN
    INSERT INTO tab1 (col1)
    VALUES (empty_blob())
    RETURN col1 INTO v_blob;

    v_bfile := BFILENAME('IMAGES', 'my.ico');
    Dbms_Lob.Fileopen(v_bfile, Dbms_Lob.File_Readonly);
    Dbms_Lob.Loadfromfile(v_blob, v_bfile, Dbms_Lob.Getlength(v_bfile));
    Dbms_Lob.Fileclose(v_bfile);

    COMMIT;
    END;
    /

    i got the error

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

    I have verified with the manuals and got the info that the oracle user should have the access to OS directory.. but how to set the permission (find the oracle user??) or any other things to do?? pls help.

    Thanks ..Anand.
    Anand

  2. #2
    Join Date
    Jan 2002
    Location
    Netherlands
    Posts
    1,587
    It shud work ok.
    Yor're not using network directory?
    Tarry Singh
    I'm a JOLE(JavaOracleLinuxEnthusiast)
    TarryBlogging
    --- Everything was meant to be---

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width