File or LOB operation FILEEXISTs failed

When i executed the sqlcode to check the access i got an error
DECLARE
v_file BFILE := BFILENAME ('DATA_DIR', 'emp.dat');
BEGIN
IF DBMS_LOB.FILEEXISTS (v_file) = 1 THEN
DBMS_OUTPUT.PUT_LINE ('File exists.');
ELSIF DBMS_LOB.FILEEXISTS (v_file) = 0 THEN
DBMS_OUTPUT.PUT_LINE ('File does not exist');
ELSE
DBMS_OUTPUT.PUT_LINE ('Unable to test existence');
END IF;
END;
/ERROR at line 1:
ORA-22288: file or LOB operation FILEEXISTs failed
Permission denied
ORA-06512: at "SYS.DBMS_LOB", line 504
ORA-06512: at line 4
server - Oracle 10.2.0.1.0 Enterprise edition
Server OS- LINUX

When accessing a file in the file system through the database there are two layers of permission.
Layer 1) The database user needs the right to read (or write) from this directory. Your user probably has this, but you could check it by looking at the data dictionary view all_directories and all_tab_privs.
Layer 2) The database itself needs access to this file. Database itself means the OS process runs with a specific user. Usually this OS-user is called oracle. The user oracle needs access to the OS folder and the file. If the file had been created by another user (e.g. root or user8731258) then somebody must give oracle the right to read this file (including folder).
I guess your problem comes from this second layer.

Similar Messages

  • ORA-22288: file or LOB operation FILEOPEN failed (The data is invalid)

    Dear All,
    I am trying to insert a image file (gif) to one of my field.
    1. Here is my table structure and trying to insert gif image file to PIC file.
    SQL> desc cis2.david_pic
    Name Null? Type
    ID VARCHAR2(5)
    PIC BLOB
    2. I using sql command to create directory and the path is pointing where the DB
    server was installed.
    SQL> create or replace directory MY_FILES as '\\hkqaa-db1\TEXT_IMPORT';
    3. Written a script to insert empty blob first and than trying to use the dbms_lob.fileopen
    to upload the gif file.
    SQL> declare
    2 l_blob blob;
    3 l_bfile bfile;
    4 begin
    5 insert into cis2.david_pic values ( '1', empty_blob())
    6 returning pic into l_blob;
    7 l_bfile := bfilename('MY_FILES', 'bess_signature.gif');
    8 dbms_lob.fileopen(l_bfile);
    9 dbms_lob.loadfromfile(l_blob, l_bfile, dbms_lob.getlength(l_bfile));
    10 dbms_lob.fileclose(l_bfile);
    11 end;
    12 /
    4. After I ran my script I got this error message.
    declare
    ERROR at line 1:
    ORA-22288: file or LOB operation FILEOPEN failed
    The data is invalid.
    ORA-06512: at "SYS.DBMS_LOB", line 475
    ORA-06512: at line 8
    Can any tell me what wrong? is this the way to insert image?
    Thanks

    Know this is an old post: (for sharing sake.)
    Please try avoiding
    1. the 'hyphen' in between the path (hkqaadb1 instead of hkqaa-db1)
    2. Give direct path like 'C:\TEXT_IMPORT' instead of network path.
    create or replace directory MY_FILES as '\\hkqaa-db1\TEXT_IMPORT'; -- Not working.
    create or replace directory MY_FILES as 'C:\hkqaadb1\TEXT_IMPORT'; -- Working.
    and this worked fine.
    Edited by: Arunan.KL on Mar 23, 2011 5:04 PM

  • Getting ORA-22288: file or LOB operation FILEOPEN failed in Windows XP

    Hi All,
    I am getting the error message
    ORA-22288: file or LOB operation FILEOPEN failed
    when I attempt to call a stored procedure containing the following code.
    bfile_in := BFILENAME( 'SP_IMPORT_NIF20_DIR', v_filename );
    /* Open the input file */
    DBMS_LOB.FILEOPEN(bfile_in);
    It works fine on UNIX but fails when running on my Windows XP Pro Oracle 9i install. I suspect that it has something do to with the file permissions. I can get this same error on UNIX if the file permissions are not set correctly. I get it every time on Windows XP Pro even though I think that the file permissions are
    set correctly. Perhaps the Windows XP Pro permissions are not as I think! or perhaps the Oracle instance needs to be granted access to the XP directories etc. I am not sure how this would be done.
    Any suggestions much appreciated.

    You have EXPLORER set to "Use Simple File Sharing". Uncheck that option for the folders and you will get the security tab.
    I am not sure why you can't run Oracle as a specific user. I do this all the time. In fact, I create an Oracle group and add a user called Oracle and then configure that user/group for all the permissions it needs (and none it doesn't), environment set up, etc. and then run the service as that user. Can you get a specific error message?
    As a side note, I am clueless why Oracle doesn't do this for you. They do on Unix installs.

  • Inserting image to table...ORA-22288: file or LOB operation FILEOPEN failed

    Good day!
    I'm just new with using databases, and i'm enjoying it.
    So I read that you can insert images to a table, and so i decided to try it... and here's where I'm at..
    *I made a directory
    CREATE directory image_dir as 'D:\Images';
    --Directory Created.
    *I created a table
    CREATE TABLE animages
    (aname VARCHAR2(40),
    breedno NUMBER(10),
    image_file BLOB,
    image_name VARCHAR2(40),
    CONSTRAINT aname_fk FOREIGN KEY (aname) REFERENCES clist(aname));
    --Table Created.
    *Then I made a procedure for inserting the images
    CREATE OR REPLACE PROCEDURE insert_image_file (p_aname VARCHAR2, p_breedno NUMBER, p_image_name IN VARCHAR2)
    IS
    src_file BFILE;
    dst_file BLOB;
    lgh_file BINARY_INTEGER;
    BEGIN
    src_file := BFILENAME('IMAGE_DIR', p_image_name);
    INSERT INTO animages
         (aname, breedno, image_file, image_name)
    VALUES (p_aname, p_breedno, EMPTY_BLOB(), p_image_name)
    RETURNING image_file
    INTO dst_file;
    SELECT image_file
    INTO dst_file
    FROM animages
    WHERE aname = p_aname AND image_name = p_image_name
    FOR UPDATE;
    DBMS_LOB.fileopen(src_file, DBMS_LOB.file_readonly);
    lgh_file := DBMS_LOB.getlength(src_file);
    DBMS_LOB.loadfromfile(dst_file, src_file, lgh_file);
    UPDATE animages
    SET image_file = dst_file
    WHERE aname = p_aname AND image_name = p_image_name;
    DBMS_LOB.fileclose(src_file);
    END;
    --Procedure Created.
    *So i was able to do those but when i was trying to execute the procedure i get this error..
    execute insert_image_file('African Elephant', 60, 'African_Elephant');
    ERROR at line 1:
    ORA-22288: file or LOB operation FILEOPEN failed
    The device is not ready.
    ORA-06512: at "SYS.DBMS_LOB", line 523
    ORA-06512: at "SCOTT.INSERT_IMAGE_FILE", line 18
    ORA-06512: at line 1
    I've been looking for a solution for a day now, hope someone could help me, thanks.
    BTW, I got the code for the PROCEDURE from a user named Aparna16, just did some minor editing so it would fit my tables, thanks.
    And sorry if the post is too long.

    Hi;
    ORA-22288:Error:     ORA-22288
    Text:     file or LOB operation %s failed %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.
    Regard
    Helios

  • ORA-22288: file or LOB operation FILEOPEN failed Permission denied

    I have installed Oracle XE (Universal) on Fedora Core 8
    I am trying to update Apex to 3.1.1. I have downloaded and extracted the zip file using unizp apex_3.1.1.zip
    I ran @apexins SYSAUX SYSAUX TEMP /i/
    and @apxchpwd
    Both were successful
    Now when I am executing this
    @apxldimg.sql /home/myuser
    I am getting
    Connected to:
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
    PL/SQL procedure successfully completed.
    old 1: create directory APEX_IMAGES as '&1/apex/images'
    new 1: create directory APEX_IMAGES as '/home/myuser/apex/images'
    Directory created.
    declare
    ERROR at line 1:
    ORA-22288: file or LOB operation FILEOPEN failed
    Permission denied
    ORA-06512: at "SYS.DBMS_LOB", line 523
    ORA-06512: at "SYS.XMLTYPE", line 287
    ORA-06512: at line 15
    PL/SQL procedure successfully completed.
    Commit complete.
    timing for: Load Images
    Elapsed: 00:00:00.06
    Directory dropped.
    Kindly help.

    I had the same problem on centos (RHEL 5.2). It think maybe it is something to do with permissions with the folder to which you extract the software. I unziped apex download in the home for the super user /root then changed directory to /root/apex to do the install. In sqlplus connected as sys as sysdba the command @apxldimg.sql /root failed with ora-22288. My workaround was to copy the images to a different directory and then it worked. rm -rf /tmp/apex/images/ then mkdir -p /tmp/apex/images/ then cp -r /root/apex/images/* /tmp/apex/images/ then back in sqlplus @apxldimg.sql /tmp. This time it worked!

  • UTL_SMPT ORA-22288: file or LOB operation GETLENGTH failed No such file or

    Hello Everyone!
    I am trying to write a script to send emails as an attachment(exists in the unix box) using utl_smtp
    i have my reports in the directory : /opt/local/application/orafin/applmgr/out/outfaud. File existing in the directory is S1759.zip
    i have created a directory as:
    create or replace directory
    REPORT_DIRECTORY
    as
    '/opt/local/application/orafin/applmgr/out/outfaud';
    when i use BFILENAME as select BFILENAME('/oracle/oradata/bfiles', 'S1759.zip') from dual
    output: REPORT_DIRECTORY//S1759.zip
    my code is something like this
    v_bfile:= BFILENAME(p_oracle_directory, p_file_name);
    v_file_length := DBMS_LOB.GETLENGTH(v_bfile);
    Error: ORA-22288: file or LOB operation GETLENGTH failed
    No such file or directory
    Could anyone please help me as im really struggling to fix this. Thanks!

    Thank you for the response..
    v_bfile:= BFILENAME(p_oracle_directory, p_file_name);
    -- Get the size of the file to be attached
    v_file_length := DBMS_LOB.GETLENGTH(v_bfile);
    -- Calculate the number of pieces the file will be split up into
    v_pieces := TRUNC(v_file_length / v_amt);
    -- Calculate the remainder after dividing the file into v_amt chunks
    v_modulo := MOD(v_file_length, v_amt);
    IF (v_modulo <> 0) THEN
    -- Since the file does not devide equally
    -- we need to go round the loop an extra time to write the last
    -- few bytes - so add one to the loop counter.
    v_pieces := v_pieces + 1;
    END IF;
    DBMS_LOB.FILEOPEN(v_bfile, DBMS_LOB.FILE_READONLY);
    FOR i IN 1 .. v_pieces LOOP
    -- we can read at the beginning of the loop as we have already calculated
    -- how many iterations we will take and so do not need to check
    -- end of file inside the loop.
    v_buf := NULL;
    DBMS_LOB.READ(v_bfile, v_amt, v_file_pos, v_buf);
    v_file_pos := I * v_amt + 1;
    UTL_SMTP.WRITE_RAW_DATA(p_conn, UTL_ENCODE.BASE64_ENCODE(v_buf));
    END LOOP;
    END;
    DBMS_LOB.FILECLOSE(v_bfile);
    end_attachment(p_conn => p_conn);
    this is the existing code..so you which part of the code should i be replacing? im sorry im new to these concepts. thanks!

  • INSERTING VIDEO : ORA-22288: file or LOB operation FILEOPEN failed

    Hi
    I'm trying to insert BFILE videos wih a procedure:
    CREATE OR REPLACE PROCEDURE "SYSTEM"."NEWVIDEO" (vid in number,
    descr in varchar2, name in varchar2)
    as
    videoOBJ ordsys.ordvideo;
    ctx RAW(4000) := null;
    begin
    select V.video into videoOBJ
    from video V
    where V.identifier = vid
    for update;
    videoOBJ.setDescription(descr);
    videoOBJ.setSource('file', 'VIDEO_DIR', name);
    videoOBJ.setProperties(ctx, true);
    update video V
    set V.video = videoOBJ
    where V.identifier = vid;
    commit;
    end;
    when execting in SQLplus
    SQL>create or replace directory VIDEO_DIR as '/bpmod61/VIDEOS';
    SQL>begin newvideo(26,'system video','BPR.AVI');end;
    I got this message:
    ERROR at line 1:
    ORA-06510: PL/SQL: unhandled user-defined exception
    ORA-06512: at "ORDSYS.ORDVIDEO", line 1260
    ORA-22288: file or LOB operation FILEOPEN failed
    No such file or directory
    ORA-06512: at "SYSTEM.NEWVIDEO", line 12
    ORA-06512: at line 1
    I checked permission privilege for directory and file access: everything grant to everyone.

    Thank you for the reply Larry
    I tested my database using tutorial script viddemo.sql
    and i get the same message
    directory created and read granted on it to public
    OWNER DIRECTORY_NAME
    DIRECTORY_PATH
    SYS VIDDIR
    c:\video
    When i try
    SQL> DECLARE
    2 obj ORDSYS.ORDVideo;
    3 ctx RAW(4000) := NULL;
    4 BEGIN
    5 SELECT video into obj from T_VIDEO where id = 1 FOR UPDATE;
    6 -- set description
    7 obj.setDescription('Video from a BFILE');
    8 -- set mimetype
    9 obj.setMimeType('video/x-quicktime');
    10 -- set source
    11 obj.setSource('FILE', 'VIDDIR','Sample.mov');
    12 -- import data
    13 obj.import(ctx);
    14 -- set video attributes
    15 obj.setKnownAttributes('MOOV', 400, 300, 1024, 10, 3600,
    16 36000, 'NONE', 256, 28000);
    17 UPDATE T_VIDEO SET VIDEO=obj WHERE id=1;
    18 END;
    19 /
    DECLARE
    ERROR AT LINE 1 :
    ORA-06510: PL/SQL: unhandled user-defined exception
    ORA-06512: at "ORDSYS.ORDSOURCE", line 181
    ORA-22288: file or LOB operation FILEOPEN failed
    No such file or directory
    ORA-06512: at "ORDSYS.ORDVIDEO", line 517
    ORA-06512: at line 13
    Thank you for the help

  • ORA-22288: file or LOB operation GETLENGTH failed

    I am using the following procedure for email the with attachment. it give the error, while I have check the directory rights is OK, also check the following thread
    Error Message is ORA-22288: file or LOB operation GETLENGTH failed
    but no result,
    I do this on clone working fine, but production not working fine while I found one thing that the file generate in temp folder of clone while in Production did not generate.
    CREATE OR REPLACE PROCEDURE APPS.mail_files (p_from_name VARCHAR2,
    p_to_name VARCHAR2,
    p_subject VARCHAR2,
    p_message VARCHAR2,
    p_oracle_directory VARCHAR2,
    p_binary_file VARCHAR2)
    IS
    -- Example procedure to send a mail with an in line attachment
    -- encoded in Base64
    -- this procedure uses the following nested functions:
    -- binary_attachment - calls:
    -- begin_attachment - calls:
    -- write_boundary
    -- write_mime_header
    -- end attachment - calls;
    -- write_boundary
    -- change the following line to refer to your mail server
    v_smtp_server VARCHAR2(1000) := 'mail.company.com';
    v_smtp_server_port NUMBER := 25;
    v_directory_name VARCHAR2(1000) ;
    v_file_name VARCHAR2(1000);
    v_mesg VARCHAR2(32767);
    v_conn UTL_SMTP.CONNECTION;
    PROCEDURE write_mime_header(p_conn in out nocopy utl_smtp.connection,
    p_name in varchar2,
    p_value in varchar2)
    IS
    BEGIN
    UTL_SMTP.WRITE_RAW_DATA(
    p_conn,
    UTL_RAW.CAST_TO_RAW( p_name || ': ' || p_value || UTL_TCP.CRLF)
    END write_mime_header;
    PROCEDURE write_boundary(p_conn IN OUT NOCOPY UTL_SMTP.CONNECTION,
    p_last IN BOOLEAN DEFAULT false)
    IS
    BEGIN
    IF (p_last) THEN
    UTL_SMTP.WRITE_DATA(p_conn, '--DMW.Boundary.605592468--'||UTL_TCP.CRLF);
    ELSE
    UTL_SMTP.WRITE_DATA(p_conn, '--DMW.Boundary.605592468'||UTL_TCP.CRLF);
    END IF;
    END write_boundary;
    PROCEDURE end_attachment(p_conn IN OUT NOCOPY UTL_SMTP.CONNECTION,
    p_last IN BOOLEAN DEFAULT TRUE)
    IS
    BEGIN
    UTL_SMTP.WRITE_DATA(p_conn, UTL_TCP.CRLF);
    IF (p_last) THEN
    write_boundary(p_conn, p_last);
    END IF;
    END end_attachment;
    PROCEDURE begin_attachment(p_conn IN OUT NOCOPY UTL_SMTP.CONNECTION,
    p_mime_type IN VARCHAR2 DEFAULT 'text/plain',
    p_inline IN BOOLEAN DEFAULT false,
    p_filename IN VARCHAR2 DEFAULT null,
    p_transfer_enc in VARCHAR2 DEFAULT null)
    IS
    BEGIN
    write_boundary(p_conn);
    IF (p_transfer_enc IS NOT NULL) THEN
    write_mime_header(p_conn, 'Content-Transfer-Encoding',p_transfer_enc);
    END IF;
    write_mime_header(p_conn, 'Content-Type', p_mime_type);
    IF (p_filename IS NOT NULL) THEN
    IF (p_inline) THEN
    write_mime_header(
    p_conn,
    'Content-Disposition', 'inline; filename="' || p_filename || '"'
    ELSE
    write_mime_header(
    p_conn,
    'Content-Disposition', 'attachment; filename="' || p_filename || '"'
    END IF;
    END IF;
    UTL_SMTP.WRITE_DATA(p_conn, UTL_TCP.CRLF);
    END begin_attachment;
    PROCEDURE binary_attachment(p_conn IN OUT UTL_SMTP.CONNECTION,
    p_file_name IN VARCHAR2,
    p_mime_type in VARCHAR2)
    IS
    c_max_line_width CONSTANT PLS_INTEGER DEFAULT 54;
    v_amt BINARY_INTEGER := 672 * 3; /* ensures proper format; 2016 */
    v_bfile BFILE;
    v_file_length PLS_INTEGER;
    v_buf RAW(2100);
    v_modulo PLS_INTEGER;
    v_pieces PLS_INTEGER;
    v_file_pos pls_integer := 1;
    BEGIN
    begin_attachment(
    p_conn => p_conn,
    p_mime_type => p_mime_type,
    p_inline => TRUE,
    p_filename => p_file_name,
    p_transfer_enc => 'base64');
    BEGIN
    v_bfile := BFILENAME(p_oracle_directory, p_file_name);
    -- Get the size of the file to be attached
    v_file_length := DBMS_LOB.GETLENGTH(v_bfile);
    -- Calculate the number of pieces the file will be split up into
    v_pieces := TRUNC(v_file_length / v_amt);
    -- Calculate the remainder after dividing the file into v_amt chunks
    v_modulo := MOD(v_file_length, v_amt);
    IF (v_modulo <> 0) THEN
    -- Since the file does not devide equally
    -- we need to go round the loop an extra time to write the last
    -- few bytes - so add one to the loop counter.
    v_pieces := v_pieces + 1;
    END IF;
    DBMS_LOB.FILEOPEN(v_bfile, DBMS_LOB.FILE_READONLY);
    FOR i IN 1 .. v_pieces LOOP
    -- we can read at the beginning of the loop as we have already calculated
    -- how many iterations we will take and so do not need to check
    -- end of file inside the loop.
    v_buf := NULL;
    DBMS_LOB.READ(v_bfile, v_amt, v_file_pos, v_buf);
    v_file_pos := I * v_amt + 1;
    UTL_SMTP.WRITE_RAW_DATA(p_conn, UTL_ENCODE.BASE64_ENCODE(v_buf));
    END LOOP;
    END;
    DBMS_LOB.FILECLOSE(v_bfile);
    end_attachment(p_conn => p_conn);
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    end_attachment(p_conn => p_conn);
    DBMS_LOB.FILECLOSE(v_bfile);
    END binary_attachment;
    -- Main Routine
    BEGIN
    -- Connect and set up header information:
    v_conn:= UTL_SMTP.OPEN_CONNECTION( v_smtp_server, v_smtp_server_port );
    UTL_SMTP.HELO( v_conn, v_smtp_server );
    UTL_SMTP.MAIL( v_conn, p_from_name );
    UTL_SMTP.RCPT( v_conn, p_to_name );
    UTL_SMTP.OPEN_DATA ( v_conn );
    UTL_SMTP.WRITE_DATA(v_conn, 'Subject: '||p_subject||UTL_TCP.CRLF);
    v_mesg:= 'Content-Transfer-Encoding: 7bit' || UTL_TCP.CRLF ||
    'Content-Type: multipart/mixed;boundary="DMW.Boundary.605592468"' || UTL_TCP.CRLF ||
    'Mime-Version: 1.0' || UTL_TCP.CRLF ||
    '--DMW.Boundary.605592468' || UTL_TCP.CRLF ||
    'Content-Transfer-Encoding: binary'||UTL_TCP.CRLF||
    'Content-Type: text/plain' ||UTL_TCP.CRLF ||
    UTL_TCP.CRLF || p_message || UTL_TCP.CRLF ;
    UTL_SMTP.write_data(v_conn, 'To: ' || p_to_name || UTL_TCP.crlf);
    UTL_SMTP.WRITE_RAW_DATA ( v_conn, UTL_RAW.CAST_TO_RAW(v_mesg) );
    -- Add the Attachment
    binary_attachment(
    p_conn => v_conn,
    p_file_name => p_binary_file,
    -- Modify the mime type at the beginning of this line depending
    -- on the type of file being loaded.
    p_mime_type => 'text/plain; name="'||p_binary_file||'"'
    -- Send the email
    UTL_SMTP.CLOSE_DATA( v_conn );
    UTL_SMTP.QUIT( v_conn );
    END;
    Error
    ORA-22288: file or LOB operation GETLENGTH failed
    No such file or directory
    ORA-06512: at "SYS.DBMS_LOB", line 678
    ORA-06512: at "APPS.MAIL_FILES", line 122
    ORA-06512: at "APPS.MAIL_FILES", line 179
    ORA-06512: at line 2

    CREATE OR REPLACE PROCEDURE APPS.mail_files (p_from_name VARCHAR2,
    p_to_name VARCHAR2,
    p_subject VARCHAR2,
    p_message VARCHAR2,
    p_oracle_directory VARCHAR2,
    p_binary_file VARCHAR2)
    IS
    -- Example procedure to send a mail with an in line attachment
    -- encoded in Base64
    -- this procedure uses the following nested functions:
    -- binary_attachment - calls:
    -- begin_attachment - calls:
    -- write_boundary
    -- write_mime_header
    -- end attachment - calls;
    -- write_boundary
    -- change the following line to refer to your mail server
    v_smtp_server VARCHAR2(1000) := 'mail.company.com';
    v_smtp_server_port NUMBER := 25;
    v_directory_name VARCHAR2(1000);
    v_file_name VARCHAR2(1000);
    v_mesg VARCHAR2(32767);
    v_conn UTL_SMTP.CONNECTION;
    PROCEDURE write_mime_header(p_conn in out nocopy utl_smtp.connection,
    p_name in varchar2,
    p_value in varchar2)
    IS
    BEGIN
    UTL_SMTP.WRITE_RAW_DATA(
    p_conn,
    UTL_RAW.CAST_TO_RAW( p_name || ': ' || p_value || UTL_TCP.CRLF)
    END write_mime_header;
    PROCEDURE write_boundary(p_conn IN OUT NOCOPY UTL_SMTP.CONNECTION,
    p_last IN BOOLEAN DEFAULT false)
    IS
    BEGIN
    IF (p_last) THEN
    UTL_SMTP.WRITE_DATA(p_conn, '--DMW.Boundary.605592468--'||UTL_TCP.CRLF);
    ELSE
    UTL_SMTP.WRITE_DATA(p_conn, '--DMW.Boundary.605592468'||UTL_TCP.CRLF);
    END IF;
    END write_boundary;
    PROCEDURE end_attachment(p_conn IN OUT NOCOPY UTL_SMTP.CONNECTION,
    p_last IN BOOLEAN DEFAULT TRUE)
    IS
    BEGIN
    UTL_SMTP.WRITE_DATA(p_conn, UTL_TCP.CRLF);
    IF (p_last) THEN
    write_boundary(p_conn, p_last);
    END IF;
    END end_attachment;
    PROCEDURE begin_attachment(p_conn IN OUT NOCOPY UTL_SMTP.CONNECTION,
    p_mime_type IN VARCHAR2 DEFAULT 'text/plain',
    p_inline IN BOOLEAN DEFAULT false,
    p_filename IN VARCHAR2 DEFAULT null,
    p_transfer_enc in VARCHAR2 DEFAULT null)
    IS
    BEGIN
    write_boundary(p_conn);
    IF (p_transfer_enc IS NOT NULL) THEN
    write_mime_header(p_conn, 'Content-Transfer-Encoding',p_transfer_enc);
    END IF;
    write_mime_header(p_conn, 'Content-Type', p_mime_type);
    IF (p_filename IS NOT NULL) THEN
    IF (p_inline) THEN
    write_mime_header(
    p_conn,
    'Content-Disposition', 'inline; filename="' || p_filename || '"'
    ELSE
    write_mime_header(
    p_conn,
    'Content-Disposition', 'attachment; filename="' || p_filename || '"'
    END IF;
    END IF;
    UTL_SMTP.WRITE_DATA(p_conn, UTL_TCP.CRLF);
    END begin_attachment;
    PROCEDURE binary_attachment(p_conn IN OUT UTL_SMTP.CONNECTION,
    p_file_name IN VARCHAR2,
    p_mime_type in VARCHAR2)
    IS
    c_max_line_width CONSTANT PLS_INTEGER DEFAULT 54;
    v_amt BINARY_INTEGER := 672 * 3; /* ensures proper format; 2016 */
    v_bfile BFILE;
    v_file_length PLS_INTEGER;
    v_buf RAW(2100);
    v_modulo PLS_INTEGER;
    v_pieces PLS_INTEGER;
    v_file_pos pls_integer := 1;
    BEGIN
    begin_attachment(
    p_conn => p_conn,
    p_mime_type => p_mime_type,
    p_inline => TRUE,
    p_filename => p_file_name,
    p_transfer_enc => 'base64');
    BEGIN
    v_bfile := BFILENAME(p_oracle_directory, p_file_name);
    -- Get the size of the file to be attached
    v_file_length := DBMS_LOB.GETLENGTH(v_bfile);
    -- Calculate the number of pieces the file will be split up into
    v_pieces := TRUNC(v_file_length / v_amt);
    -- Calculate the remainder after dividing the file into v_amt chunks
    v_modulo := MOD(v_file_length, v_amt);
    IF (v_modulo <> 0) THEN
    -- Since the file does not devide equally
    -- we need to go round the loop an extra time to write the last
    -- few bytes - so add one to the loop counter.
    v_pieces := v_pieces + 1;
    END IF;
    DBMS_LOB.FILEOPEN(v_bfile, DBMS_LOB.FILE_READONLY);
    FOR i IN 1 .. v_pieces LOOP
    -- we can read at the beginning of the loop as we have already calculated
    -- how many iterations we will take and so do not need to check
    -- end of file inside the loop.
    v_buf := NULL;
    DBMS_LOB.READ(v_bfile, v_amt, v_file_pos, v_buf);
    v_file_pos := I * v_amt + 1;
    UTL_SMTP.WRITE_RAW_DATA(p_conn, UTL_ENCODE.BASE64_ENCODE(v_buf));
    END LOOP;
    END;
    DBMS_LOB.FILECLOSE(v_bfile);
    end_attachment(p_conn => p_conn);
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    end_attachment(p_conn => p_conn);
    DBMS_LOB.FILECLOSE(v_bfile);
    END binary_attachment;
    -- Main Routine
    BEGIN
    -- Connect and set up header information:
    v_conn:= UTL_SMTP.OPEN_CONNECTION( v_smtp_server, v_smtp_server_port );
    UTL_SMTP.HELO( v_conn, v_smtp_server );
    UTL_SMTP.MAIL( v_conn, p_from_name );
    UTL_SMTP.RCPT( v_conn, p_to_name );
    UTL_SMTP.OPEN_DATA ( v_conn );
    UTL_SMTP.WRITE_DATA(v_conn, 'Subject: '||p_subject||UTL_TCP.CRLF);
    v_mesg:= 'Content-Transfer-Encoding: 7bit' || UTL_TCP.CRLF ||
    'Content-Type: multipart/mixed;boundary="DMW.Boundary.605592468"' || UTL_TCP.CRLF ||
    'Mime-Version: 1.0' || UTL_TCP.CRLF ||
    '--DMW.Boundary.605592468' || UTL_TCP.CRLF ||
    'Content-Transfer-Encoding: binary'||UTL_TCP.CRLF||
    'Content-Type: text/plain' ||UTL_TCP.CRLF ||
    UTL_TCP.CRLF || p_message || UTL_TCP.CRLF ;
    UTL_SMTP.write_data(v_conn, 'To: ' || p_to_name || UTL_TCP.crlf);
    UTL_SMTP.WRITE_RAW_DATA ( v_conn, UTL_RAW.CAST_TO_RAW(v_mesg) );
    -- Add the Attachment
    binary_attachment(
    p_conn => v_conn,
    p_file_name => p_binary_file,
    -- Modify the mime type at the beginning of this line depending
    -- on the type of file being loaded.
    p_mime_type => 'text/plain; name="'||p_binary_file||'"'
    -- Send the email
    UTL_SMTP.CLOSE_DATA( v_conn );
    UTL_SMTP.QUIT( v_conn );
    END;
    Edited by: user12879396 on Oct 22, 2012 10:39 AM

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

    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

    Hi guys,
    Sybrand, aplogoies, the second line of the error stack was on one line in the first post, full error stack below:
    ORA-22288: file or LOB operation FILEOPEN failed
    The program issued a command but the command length is incorrect.
    ORA-06512: at "SYS.DBMS_LOB", line 716
    ORA-06512: at "JLMS.LOAD_DATA_UTIL", line 417
    ORA-06512: at line 2I have looked at that error code as you mentioned, but the second line here doesn't really help much.
    Hoek, i took your advice and tried to replace FILEOPEN with OPEn but got the same error.
    Just to clarify as well, I am not using UNC or relative file paths as I know that these can cause problems.
    Rgds
    Dan

  • ORA-22288: file or LOB operation FILEOPEN failed

    Hello,
    I have a small db procedure that tries to load files into a tablecolumn using DBMS_LOB.LOADFROMFILE.
    I use: create or replace directory FILES_DIR as '\\server\Attachments';
    this is the place where the files are located. I can access this directory using my Windows login.
    When i then execute 'select DBMS_LOB.FILEEXISTS', it says '1', so ok so far.
    Before I can load I have to open the file using DBMS_LOB.OPEN.
    However, when I execute the procedure it gives me the error ORA-222888...
    My DB-services are started using my Windows login.
    If I try to map a network drive like z: = '\\server\Attachments', DBMS_LOB.FILEEXISTS says '0'.
    How can it be that the DB says yes the file exists, but no I can't open it while the services are running with logins that can actually access the files?
    I' ve searched the internet all day, is there a solution?
    Thanks in advance,
    Frank

    when I use the mapped drive, the file doesn't even exists for the db:
    DBMS_LOB.FILEEXISTS says '0'.
    when I use the UNC format, the file actually exists but then gives the error ORA-2228 on DBMS_LOB.OPEN.
    So I tried net use z: \\server\attachments /USER:x\y in cmd, but the file still doesn't exist for the db
    I also tried 'net use \\machine\..' like you proposed but can't seem to understand it's meaning.
    The actual question is how can I let the file exist for the db using a mapped network drive?

  • Unable to Open Workflow Notification attachment Throwing Error-"ORA-20002: 3240: Error -22288 - ORA-22288: file or LOB operation FILEOPEN failed No such file or directory in 'PLSQLBLOB"

    Hi Guys,
    I'm trying to send BI publisher report output file attachment to user Notification through Workflow by using the code :
    SELECT substr(file_name,instr(file_name,'/',-1,1)+1,length(file_name))
    INTO get_file_name
    FROM fnd_conc_req_outputs
    WHERE concurrent_request_id = v_request_id;
    src_lob := BFILENAME('CONC_OUTPUT', get_file_name);
    DBMS_LOB.CREATETEMPORARY(dest_lob, TRUE, DBMS_LOB.SESSION);
    DBMS_LOB.OPEN(src_lob, DBMS_LOB.LOB_READONLY);
    DBMS_LOB.LoadFromFile( DEST_LOB => dest_lob,
                           SRC_LOB => src_lob,
                           AMOUNT => DBMS_LOB.GETLENGTH(src_lob));
    DBMS_LOB.CLOSE(src_lob);
    DOCUMENT_TYPE := 'application/excel;name:=test.xls' ;
    dbms_lob.copy(document, dest_lob, dbms_lob.getlength(dest_lob));
    Please Help to solve the Error.Appreciated for the Solution
    Thanks,
    Kishore Kandula.

    Hi
    Is the 'CONC_OUTPUT' directory a DBA Directory? Run the query SELECT * FROM DBA_DIRECTORIES and see if this CONC_OUTPUT is a directory name. If not rather use one of the direcorties.

  • OIP-04907: LOB operation failed. Error reading or writing to file'

    I wrote a VB program who read and write blob
    I received this error
    OIP-04907: LOB operation failed. Error reading or writing to file'
    do you have an idea why
    or
    where Can I find some info about this error (OIP)
    thanks

    Hello SteveMRG,
    What version of LabVIEW and NI DAQmx are you using? Does this error occur when the program is run from the development PC from the project? Can you create a debuggable executable and activate Highlight execution when the error occurs as to verify which state the program is in?
    Wear
    National Instruments
    Product Support Engineer

  • ORA-22290: operation would exceed the maximum number of opened files or LOB

    i am getting this error in a procedure.
    ORA-22290: operation would exceed the maximum number of opened files or LOBs
    22290, 00000, "operation would exceed the maximum number of opened files or LOBs"
    // *Cause: The number of open files or LOBs has reached the maximum limit.
    // *Action: Close some of the opened files or LOBs and retry the operation.
    NAME TYPE VALUE
    session_max_open_files integer 10
    Procuedure:
    CREATE OR REPLACE PROCEDURE WMSOWN."PROC_WMS_XML_READ"
    P_EVENT_KEY IN VARCHAR2,
    X_STATUS_MSG OUT VARCHAR2,
    X_STATUS OUT NUMBER
    )AS
    l_parser dbms_xmlparser.Parser;
    domdoc xmldom.DOMDocument;
    nodelist XMLDOM.DOMNODELIST;
    node XMLDOM.DOMNODE;
    n_child XMLDOM.DOMNODE;
    elements XMLDOM.DOMELEMENT;
    name_node_map XMLDOM.DOMNAMEDNODEMAP;
    parent_seg varchar2(4000);
    tag_name_bkp varchar2(4000); -- LOOK OUT BRAD IS CODING AGAIN
    chile_seg VARCHAR2(4000);
    p_seg VARCHAR2(4000);
    p_seg1 VARCHAR2(4000);
    p_seg2 VARCHAR2(30);
    p_int_name VARCHAR2(50);
    col_value VARCHAR2(100):=NULL;
    len1 NUMBER;
    cnt NUMBER;
    seg_id_bkp NUMBER; -- LOOK OUT BRAD IS CODING AGAIN
    sequence_bkp NUMBER; -- LOOK OUT BRAD IS CODING AGAIN
    prev_sequence NUMBER; -- LOOK OUT BRAD IS CODING AGAIN
    prev_seq_set VARCHAR2(3); --brad coding
    parent_id number; ---brad coding
    valid_seg NUMBER; -- LOOK OUT BRAD IS CODING AGAIN
    data_status VARCHAR2(10);
    v_main_seg VARCHAR2(50);
    v_seq_no NUMBER;
    V_CLOBLOCATOR CLOB;
    V_FILELOCATOR BFILE;
    v_amount_to_load NUMBER;
    dest_offset NUMBER := 1;
    src_offset NUMBER := 1;
    lang_context NUMBER := DBMS_LOB.DEFAULT_LANG_CTX;
    warning NUMBER;
    v_event_name USR_OUB_FILE_PROCESS_DETAILS.EVENT_NAME%TYPE;
    v_file_name USR_OUB_FILE_PROCESS_DETAILS.FILE_NAME%TYPE;
    DIRECTORY_PATH_INVALID EXCEPTION;
    PRAGMA EXCEPTION_INIT(DIRECTORY_PATH_INVALID,-22285);
    NO_PRIVILEGES EXCEPTION;
    PRAGMA EXCEPTION_INIT(NO_PRIVILEGES,-22286);
    INVALID_DIRECTORY EXCEPTION;
    PRAGMA EXCEPTION_INIT(INVALID_DIRECTORY,-22287);
    FILE_NOT_FOUND EXCEPTION;
    PRAGMA EXCEPTION_INIT(FILE_NOT_FOUND,-22289);
    P_DIRECTORY VARCHAR2(50) :='WMS_XML_DIR_OUB';
    v_whid poldat_view.wh_id%type;
    BEGIN
    --NAME :  PROC_WMS_XML_READ.PLS
    --DESCRIPTION :
    -- Procedure PROC_WMS_XML_READ search XML files from remote location.
    -- Open,Parse and Read XML files. Store all XML values into tables.
    -- Developed by Dharmesh Patidar(jw782)
    -- History: New condition is added i.e. p_seg:=parent_seg to maintain PARENT and CHILD relationship
    -- by Vishwanath Dubey(jl246) on 17-June-2011
    -- BRAD_XML_DEBUG table removed for CLEANING Activity by DHARMESH PATIDAR(JW782) ON 29-JUNE-2011.
    /*BLOCK FOR CAPTURING EVENT NAME BASED ON EVENT ID START*/
    BEGIN
    SELECT event_name,file_name,WAREHOUSE_ID
    INTO v_event_name, v_file_name,v_whid
    FROM usr_oub_file_process_details
    WHERE event_id=p_event_key
    AND process_flag='U';
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    x_status_msg:=SQLCODE||':'||' Error while selecting event name and event id in Procedure PROC_WMS_XML_READ : Record is not available in USR_OUB_FILE_PROCESS_DETAILS table for event id '|| P_EVENT_KEY;
    x_status:=SQLCODE;
    proc_wms_error_trace(v_whid, --warehouse id
    null , --event id
    v_event_name , --event name
    x_status, --error code
    x_status_msg ); --error message
    RETURN;
    WHEN TOO_MANY_ROWS THEN
    x_status_msg:=SQLCODE||':'||' Error while selecting event name and event id in Procedure PROC_WMS_XML_READ : More than one Records found in USR_OUB_FILE_PROCESS_DETAILS table for event id '|| P_EVENT_KEY;
    x_status:=SQLCODE;
    proc_wms_error_trace(v_whid, --warehouse id
    null , --event id
    v_event_name , --event name
    x_status, --error code
    x_status_msg ); --error message
    RETURN;
    WHEN VALUE_ERROR THEN
    x_status_msg:=SQLCODE||':'||' Error while selecting event name and event id in Procedure PROC_WMS_XML_READ : Varibale length is small or data type mismatch while selecting event id and event name in USR_OUB_FILE_PROCESS_DETAILS table for event id '|| P_EVENT_KEY;
    x_status:=SQLCODE;
    proc_wms_error_trace(v_whid, --warehouse id
    null , --event id
    v_event_name , --event name
    x_status, --error code
    x_status_msg ); --error message
    RETURN;
    WHEN OTHERS THEN
    x_status_msg:=SQLCODE||':'||'Error in Procedure PROC_WMS_XML_READ while selecting event name and event id ';
    x_status:=SQLCODE;
    proc_wms_error_trace(v_whid, --warehouse id
    null , --event id
    v_event_name , --event name
    x_status, --error code
    x_status_msg ); --error message
    RETURN;
    END;
    /*BLOCK FOR CAPTURING EVENT NAME BASED ON EVENT ID END*/
    /*LOGIC TO READ XML FROM REMOTE LOCATION START*/
    DBMS_LOB.CREATETEMPORARY(V_CLOBLOCATOR, TRUE);
    V_FILELOCATOR := BFILENAME(P_DIRECTORY,V_FILE_NAME);
    DBMS_LOB.OPEN(V_FILELOCATOR,DBMS_LOB.FILE_READONLY);
    V_AMOUNT_TO_LOAD := DBMS_LOB.GETLENGTH(V_FILELOCATOR);
    DBMS_LOB.LOADCLOBFROMFILE(V_CLOBLOCATOR,
    V_FILELOCATOR ,
    V_AMOUNT_TO_LOAD,
    DEST_OFFSET,
    SRC_OFFSET,
    0,
    LANG_CONTEXT,
    WARNING);
    dbms_lob.close(V_FILELOCATOR);
    /*LOGIC TO READ XML FROM REMOTE LOCATION END*/
    /*Temporary Code to help with debug Clear the table before populating it with new data*/
    --delete table BRAD_XML_DEBUG;
    cnt:=1;
    seg_id_bkp:=0;
    data_status:='N';
    v_seq_no:=0;
    prev_seq_set:='NO';
    /*create new parser.*/
    l_parser := dbms_xmlparser.newParser;
    dbms_xmlparser.parseClob(l_parser, replace(V_CLOBLOCATOR,'&','1x2x3x4x5'));
    /*Parse the document and create a new DOM document.*/
    domdoc :=dbms_xmlparser.getDocument(l_parser);
    /* get all elements in the DOM*/
    nodelist := XMLDOM.getElementsByTagName(DOMDoc, '*');
    len1 := XMLDOM.getLength(nodelist);
    /* loop through elements of the DOM */
    FOR j in 1..len1-1 LOOP --MAIN LOOP START
    BEGIN
    /*below sql will fetch Node from table to travel xml data*/
    BEGIN
    SELECT int_name,tag_name
    INTO p_int_name, p_seg1
    FROM usr_wms_tag_det
    WHERE int_name=v_event_name
    AND seq_no =cnt;
    EXCEPTION
    --PLEASE DO NOT HANDLE ANY EXCEPTION APART MENTIONED BELOW
    WHEN OTHERS THEN
    NULL;
    END;
    IF cnt=1 THEN
    v_main_seg:=p_seg1;
    END IF;
    EXCEPTION
    --PLEASE DO NOT HANDLE ANY EXCEPTION APART MENTIONED BELOW
    WHEN no_data_found THEN
    null;
    WHEN OTHERS THEN
    x_status_msg:=SQLCODE||':'||'Error in Procedure PROC_WMS_XML_READ while selecting interface name and tag name'||sqlerrm;
    x_status:=SQLCODE;
    proc_wms_error_trace(v_whid, --warehouse id
    null , --event id
    v_event_name , --event name
    x_status, --error code
    x_status_msg ); --error message
    RETURN;
    END;
    /*LOGICS TO READ XML START*/
    node:=XMLDOM.item(nodelist, j);
    elements:=XMLDOM.makeElement(node);
    parent_seg:=(xmldom.getTagName(elements));
    tag_name_bkp:=(xmldom.getTagName(elements));
    name_node_map:=xmldom.getAttributes(node);
    n_child:=xmldom.getFirstChild(node);
    col_value:=xmldom.getNodeValue(n_child);
    /*get the sequence number from the interface hierarchy table */
    SELECT count(1)
    INTO valid_seg
    FROM usr_wms_tag_det
    WHERE int_name=v_event_name
    AND tag_name = tag_name_bkp;
    if valid_seg>0 then
    begin
    SELECT seq_no
    INTO sequence_bkp
    FROM usr_wms_tag_det
    WHERE int_name=v_event_name
    AND tag_name = tag_name_bkp;
    seg_id_bkp:=seg_id_bkp+1;
    p_seg:=parent_seg;--Modified by Vishwanath Dubey dated 16-jun-2011
    end;
    end if;
    if prev_seq_set = 'NO' then
    begin
    prev_sequence := sequence_bkp;
    prev_seq_set := 'YES';
    end;
    end if;
    if sequence_bkp < prev_sequence then --you just moved up level(s) in the message structure
    begin
    select max(seg_id)
    into parent_id
    from usr_wms_global_xml_det
    where seg_sequence = sequence_bkp-1;
    prev_sequence := sequence_bkp;
    end;
    end if;
    if sequence_bkp > prev_sequence then --you just moved down a level in the message structure
    parent_id := seg_id_bkp-1;
    prev_sequence := sequence_bkp;
    end if;
    /*end getting the hierarchy table sequence */
    /*LOGICS TO READ XML END */
    IF (parent_seg =p_seg1) or (parent_seg=p_seg2) THEN
    if parent_seg=v_main_seg then
    v_seq_no:=v_seq_no+1;
    end if;
    BEGIN
    /* INSERTING DATA LOGICS TO READ XML END */
    INSERT INTO usr_wms_global_xml_det values(p_int_name,tag_name_bkp,parent_seg,seg_id_bkp,sequence_bkp,parent_id,'','','',J,v_seq_no,data_status,cnt);
    EXCEPTION
    WHEN OTHERS THEN
    x_status_msg:=SQLCODE||' : Error in Procedure PROC_WMS_XML_READ while inserting records in USR_WMS_GLOBAL_XML_DET table for interface name and parent segment '||P_INT_NAME||','||PARENT_SEG;
    x_status:=SQLCODE;
    proc_wms_error_trace(v_whid, --warehouse id
    null , --event id
    v_event_name , --event name
    x_status, --error code
    x_status_msg ); --error message
    RETURN;
    END ;
    p_seg:=parent_seg;
    p_seg2:=P_SEG1;
    cnt:=cnt+1;
    ELSE
    chile_seg:=parent_seg;
    BEGIN
    /* INSERTING DATA LOGICS TO READ XML END */
    INSERT INTO usr_wms_global_xml_det values(p_int_name,tag_name_bkp,p_seg,seg_id_bkp,sequence_bkp,parent_id,'',chile_seg,replace(TRIM(Col_Value),'1x2x3x4x5','&'),J,v_seq_no,data_status,cnt);
    EXCEPTION
    WHEN OTHERS THEN
    x_status_msg:=SQLCODE||' : Error in Procedure PROC_WMS_XML_READ while inserting records in USR_WMS_GLOBAL_XML_DET table for interface name and parent segment '||P_INT_NAME||','||PARENT_SEG;
    x_status:=SQLCODE;
    proc_wms_error_trace(v_whid, --warehouse id
    null , --event id
    v_event_name , --event name
    x_status, --error code
    x_status_msg ); --error message
    RETURN;
    END;
    END IF;
    END LOOP; --MAIN LOOP END
    dbms_xmldom.freeDocument(DOMDoc);
    x_status:=0;
    EXCEPTION
    WHEN DIRECTORY_PATH_INVALID THEN
    x_status_msg:=SQLCODE||' : Error in Procedure PROC_WMS_XML_READ DIRECTORY PATH IS INVALID';
    x_status:=SQLCODE;
    proc_wms_error_trace(v_whid, --warehouse id
    null , --event id
    v_event_name , --event name
    x_status, --error code
    x_status_msg ); --error message
    RETURN;
    WHEN FILE_NOT_FOUND THEN
    x_status_msg:=SQLCODE||' : Error in Procedure PROC_WMS_XML_READ INVALID XML FILE NAME OR FILE DOES NOT EXISTS';
    x_status:=SQLCODE;
    proc_wms_error_trace(v_whid, --warehouse id
    null , --event id
    v_event_name , --event name
    x_status, --error code
    x_status_msg ); --error message
    RETURN;
    WHEN NO_PRIVILEGES THEN
    x_status_msg:=SQLCODE||' : Error in Procedure PROC_WMS_XML_READ Insufficient privileges on file or directory NAME- '||p_directory||' to perform FILEOPEN operation.';
    x_status:=SQLCODE;
    proc_wms_error_trace(v_whid, --warehouse id
    null , --event id
    v_event_name , --event name
    x_status, --error code
    x_status_msg ); --error message
    RETURN;
    WHEN OTHERS THEN
    x_status_msg:=SQLCODE||' : Error in Procedure PROC_WMS_XML_READ '|| SQLERRM;
    x_status:=SQLCODE;
    proc_wms_error_trace(v_whid, --warehouse id
    null , --event id
    v_event_name , --event name
    x_status, --error code
    x_status_msg ); --error message
    dbms_xmlparser.freeParser(l_parser);
    dbms_xmldom.freeDocument(DOMDoc);
    RETURN;
    END PROC_WMS_XML_READ;
    Edited by: user13427480 on Feb 8, 2013 7:08 PM

    when you post sql statement use also similar threads :
    ORA-22290: operation would exceed the maximum number of opened files or LOB
    https://kr.forums.oracle.com/forums/thread.jspa?messageID=10842417                                                                                                                                                                                                                                                                                                                                                                                                           

  • Hello, I am attempting to install Camera raw from a .zip file provided via a link provided by adobe for a Nikon D810. The .zip file unzips fine and I moved the files to the recommended folder. But the operation is failing

    I am attempting to install Camera raw from a .zip file provided via a link provided by adobe for a Nikon D810. The .zip file unzips fine and I moved the files to the recommended folder. But the operation is failing

    Can you describe what “the operation is failing” means?  What is happening and how is it different than what you expect?
    Also, what product are you trying to update manually, and do you have a link to the page of instructions, so we know what your attempting to do?

  • Problem when exporting to Vimeo I get message "The share operation has failed. Quicktime error: -50" The file only gets to 8% before this happens any idea how to fix I have a movie deadline to meet!

    Hi all,
    Finished editing a short movie.
    Then went to share on vimeo but got this message - see also screenshot when I tried to export to desktop.
    Problem when exporting to Vimeo I get message "The share operation has failed. Quicktime error: -50" The file only gets to 8%.
    Have tried deleting my render files for the project and also another fix mentioned of deleting any black space files on the edit itself but neither work?
    Just upgraded to OS Mavericks could this be causing it? If so how to downgrade?
    thanks
    Louis B

    Thanks for your help both, I called Apple tech support and spoke to a really helpful chap called Andrea who helped me out. Now got my Master file sorted and am trying Vimeo upload again.
    Just to clarify points for people out there with the same issue:
    First steps
    - Ensure background rendering is turned off in preferences
    - Delete project and events render files
    - If upgraded to Mavericks then go to FCPX in finder under applications hit buttons 'CMD' and 'I' together and tick the 'prevent App Nap' box.
    Next Steps
    I had already done all of this when Apple Tech spoke to me so we discussed the message 'Quicktime -50' and what it meant. It wasnt a purely generic error message but was not detailed enough to point to one specific issue. This problem had occurred in previous years (so Mavericks not wholly to blame) and patches were issued over the years by Apple to help resolve some of the problems.
    The message essentially is indicating that there is a problem somewhere with the media in some way shape or form.
    My export went to 8% then failed. Apple's answer was that the project settings were corrupted in some way.
    So what they suggested (so simple I could kick myself) was to select all the media files by 'CMD + A' then copy them 'CMD + C' then create and open a new project timeline, and then paste in 'CMD + V'.
    Then we tried export again this time to a master file with some settings detailed by Apple.
    The difference now was it got to 40% then failed but due to a different reason 'error -1 frame 10124 error'
    At last we get past the project issues and into the event media issues, it seems that when I loaded the compact flash last night, the iMac kept ejecting the reader so had to copy files over quickly and seems that some of the file clip I used although showed on the viewer, didn't seem to have loaded all the correct media, so selecting this clip frame 10124 on the viewer I found that it showed as red on the frame row which implied an issue. So I simply bladed it off and deleted it.
    Then I reran the export to Master file and it worked, though jumping from 40% to 100% complete was a shock to me!
    Now am trying the export to Vimeo - hope this helps some of you out there. Worst case pick up the phone to Apple and speak to the Final Cut Pro guys they can help.
    best wishes,
    Louis B

Maybe you are looking for

  • Restrict Equipment Master (with serial numbers) creation

    Hello All, I am faced with an issue where the client will be using Serial Numbers for 2 sets of materials. I have assigned a Serial Number profile to these materials in Material Master. I am able to create equipment master data for these materials wi

  • Cartesian of data from two tables with no matching columns

    Hello, I was wondering – what's the best way to create a Cartesian of data from two tables with no matching columns in such a way, so that there will be only a single SQL query generated? I am thinking about something like: for $COUNTRY in ns0: COUNT

  • How to acquire the concurrent request id in data template?

    Hi all, I want to know how to acquire the concurrent request from my report data template. I've created a placeholder for my parameter +<parameter name="p_conc_request_id" dataType = "number" defaultValue="0"></parameter>+ and for nothing ... i've go

  • JCOException

    Hi, can anybody help me in understanding this exception. BR Wolfgang EXCEPTION] #1#com.sap.mw.jco.JCO$Exception: (132) JCO_ERROR_CONCURRENT_CALL: <b>Connection cannot be disconnected. Connection currently used in another thread.</b>     at com.sap.mw

  • Modbus errors when making object connection

    I have a telemetry system that currently has 37 RTU's and uses Lookout 6.0.2. We are adding an additional site ( pump station with controls) and I am experiencing a probleml when making the "connection" between a control object (00001) and a switch.