Problem Using UTL_FILE package ORA-29285

Dear All,
I would very much appreciate your help.
I am trying to export data form a table.
The version of the DB is 10.2.0.4
I am using the following procedure:
create or replace
procedure EXPORT_FRAME(
dir IN VARCHAR2, filename IN VARCHAR2) IS
f utl_file.file_type;
  cursor frame is
    Select *
    from test_complete_frame_2008;
begin
  f:= utl_file.fopen (dir, filename,'w');
  FOR a IN frame
  Loop
    utl_file.put_line (f,
        '"'||a.COM_DATA_ID || '";"' ||
           a.COM_DATA_SET_ID || '";"'||
            a.NSI || '";"'||
            a.FRAME_ID || '";"'||
            a.STATUS_FRAME || '";"'||
            TO_CHAR(a.FRAME_REFERENCE_DATE, 'dd/mm/yyyy') || '";"'||
            TO_CHAR(a.DATE_OF_SELECTION, 'dd/mm/yyyy')  || '";'||
            a.EU_LEU_ID || ';"'||
            a.NSA_ID || '";"'||
            a.SOURCE_IDENTITY || '";"'||
            TO_CHAR(a.REF_DATE_LEU_IDENTITY, 'dd/mm/yyyy') || '";"'||
            a.NATIONAL_ID || '";"'||
            a.REF_DATE_NATIONAL_ID || '";"'||
            a.DUNS_NUMBER || '";"'||
            TO_CHAR(a.REF_DATE_DUNS_NUMBER, 'dd/mm/yyyy') || '";"'||
            a.BVD_ID || '";"'||
            TO_CHAR(a.REF_DATE_BVD_ID, 'dd/mm/yyyy') || '";"'||
            a.NAME_LEGAL_UNIT || '";"'||
            a.LEGAL_FORM_EGR || '";"'||
            a.SOURCE_LEGAL_FORM || '";"'||
            TO_CHAR(a.REF_DATE_LEGAL_FORM, 'dd/mm/yyyy') || '";"'||
            a.TYPE_OF_LEGAL_UNIT || '";"'||
            a.SOURCE_CODE_TYPE_OF_LEU || '";"'||
            TO_CHAR(a.REF_DATE_TYPE_OF_LEU, 'dd/mm/yyyy') || '";"'||
            a.STATUS_LEU || '";"'||
            a.SOURCE_CODE_STATUS_LEU || '";"'||
            TO_CHAR(a.REF_DATE_STATUS_LEU, 'dd/mm/yyyy') || '";"'||
            a.POST_DELIVERY_POINT || '";"'||
            a.CITY_NAME || '";"'||
            a.POSTAL_CODE || '";"'||
            a.STATE_NAME || '";"'||
            a.COUNTRY_CODE_BOP || '";"'||
            a.COUNTRY_ACCESS_CODE || '";"'||
            a.TELEPHONE_NUMBER || '";"'||
            a.FAX_NUMBER || '";"'||
            TO_CHAR(a.DATE_OF_INCORPORATE, 'dd/mm/yyyy') || '";"'||
            a.SOURCE_DATE_OF_INCORP || '";"'||
            TO_CHAR(a.REF_DATE_DATE_OF_INCORP, 'dd/mm/yyyy') || '";"'||
            TO_CHAR(a.DATE_OF_LIQUIDATION, 'dd/mm/yyyy') || '";"'||
            a.SOURCE_DATE_OF_LIQ || '";"'||
            TO_CHAR(a.REF_DATE_DATE_OF_LIQ, 'dd/mm/yyyy') || '";"'||
            a.NACE_CODE || '";"'||
            a.VERSION_NACE || '";"'||
            a.SOURCE_CODE_NACE || '";"'||
            TO_CHAR(a.REF_DATE_NACE, 'dd/mm/yyyy') || '";"'||
            a.NUMBER_PERS_EMPLOYED || '";"'||
            a.SOURCE_CODE_PERS_EMPL || '";"'||
            a.CONS_PERSON_EMPLOYED || '";"'||
            TO_CHAR(a.REF_DATE_PERS_EMPLOYED, 'dd/mm/yyyy') || '";"'||
            a.SPECIAL_PURP_ENTITY_CODE || '";"'||
            a.SOURCE_CODE_SPE || '";"'||
            TO_CHAR(a.REF_DATE_SPE_CODE, 'dd/mm/yyyy') || '";"'||
            a.EMAIL_ADDRESS || '";"'||
            TO_CHAR(a.REF_DATE_EMAIL_ADDRESS, 'dd/mm/yyyy') || '";"'||
            a.WEB_ADDRESS || '";"'||
            TO_CHAR(a.REF_DATE_WEB_ADDRESS, 'dd/mm/yyyy') || '";"'||
            a.P_EU_LEU_ID || '";"'||
            a.P_NAME_LEGAL_UNIT || '";"'||
            a.P_COUNTRY_CODE_BOP || '";"'||
            a.STATUS_RELATIONSHIP || '";"'||
            a.PERCENTAGE || '";"'||
            a.KIND_OF_CONTROL || '";"'||
            a.SOURCE_CODE_RELATIONSHIP || '";"'||
            TO_CHAR(a.REF_DATE_RELATIONSHIP, 'dd/mm/yyyy') || '";"'||
            a.GLOBAL_LEVEL || '";"'||
            a.GGH_EU_LEU_ID || '";"'||
            a.GGH_NAME_LEGAL_UNIT || '";"'||
            a.GGH_COUNTRY_CODE_BOP || '";"'||
            a.GGH_NSA_ID || '";"'||
            a.GGH_DUNS_NUMBER || '";"'||
            a.GGH_BVD_ID || '";"'||
            a.GGH_SOURCE_IDENTITY || '";"'||
            a.GLOBAL_EG_ID || '";"'||
            a.GLOBAL_EG_NAME || '";"'||
            a.TOP_MNE_IND || '";"'||
            a.GEG_PERSONS_EMPLOYED || '";"'||
            a.GEG_SOURCE_CODE_PERS_EMPL || '";"'||
            TO_CHAR(a.GEG_REF_DATE_PERS_EMPL, 'dd/mm/yyyy') || '";"'||
            a.NUMBER_OF_LEGAL_UNITS || '";"'||
            a.GEG_NACE_CODE_DIV || '";"'||
            a.GEG_SOURCE_CODE_NACE || '";"'||
            TO_CHAR(a.GEG_REF_DATE_NACE, 'dd/mm/yyyy') || '";"'||
            a.GEG_CONS_TURNOVER || '";"'||
            a.GEG_VALUTA_CONS_TURNOVER || '";"'||
            TO_CHAR(a.GEG_BEGIN_CONS_TURNOVER, 'dd/mm/yyyy') || '";"'||
            TO_CHAR(a.GEG_END_CONS_TURNOVER, 'dd/mm/yyyy') || '";"'||
            a.GEG_SOURCE_CONS_TURNOVER || '";"'||
            TO_CHAR(a.GEG_REF_DATE_C_TURNOVER, 'dd/mm/yyyy') || '";"'||
            a.GEG_TOTAL_ASSETS || '";"'||
            a.GEG_VALUTA_TOTAL_ASSETS || '";"'||
            a.GEG_SOURCE_TOTAL_ASSETS || '";"'||
            TO_CHAR(a.GEG_REF_DATE_TOTAL_ASSETS, 'dd/mm/yyyy') || '";"'||
            a.GEG_WEB_ADDRESS || '";"'||
            a.GDC_EU_LEU_ID || '";"'||
            a.GDC_NAME_LEGAL_UNIT || '";"'||
            a.GDC_COUNTRY_CODE_BOP || '";"'||
            a.GDC_NSA_ID || '";"'||
            a.GDC_DUNS_NUMBER || '";"'||
            a.GDC_BVD_ID || '";"'||
            a.GDC_SOURCE_IDENTITY || '";"'||
            a.REP_EU_LEU_ID || '";"'||
            a.REP_NAME_LEGAL_UNIT || '";"'||
            a.REP_POST_DELIVERY_POINT || '";"'||
            a.REP_POSTAL_CODE || '";"'||
            a.REP_STATE_NAME || '";"'||
            a.REP_CITY_NAME || '";"'||
            a.REP_COUNTRY_CODE_BOP || '"'
       UTL_FILE.new_line (f);
  END LOOP;
  UTL_FILE.new_line (f);
  UTL_FILE.fclose(f);
    EXCEPTION
      WHEN NO_DATA_FOUND
        THEN dbms_output.put_line ('FAILED');
END EXPORT_FRAME;I get an error message:
Error starting at line 1 in command:
begin EXPORT_FRAME ('EXP','test2.csv'); end;
Error report:
ORA-29285: file write error
ORA-06512: at "SYS.UTL_FILE", line 136
ORA-06512: at "SYS.UTL_FILE", line 813
ORA-06512: at "EGR.EXPORT_FRAME", line 13
ORA-06512: at line 1
29285. 00000 - "file write error"
*Cause:    Failed to write to, flush, or close a file.
*Action:   Verify that the file exists, that it is accessible, and that
it is open in write or append mode.
Any idea?
Thanks in advance!

By default UTL_FILE.FOPEN opens file with record size up to 1024 characters (including newline). Most likely your code exceeds 1024. Change:
f:= utl_file.fopen (dir, filename,'w');to something like (assuming none of your records will exceed 10000)
f:= utl_file.fopen (dir, filename,'w',10000);SY.

Similar Messages

  • Creating Error log files using UTL_FILE package on a remote machine

    Database Version: 10g Release2
    OS Platform: Sun Solaris
    I have been asked to log errors to OS files rather than tables. So, i wanted to use UTL_FILE package. But the client doesn't want to store these files on the same server where the database is running(as specified in UTL_FILE_DIR). Is there a way i could get these files created on a remote machine(client).

    I believe what others are suggesting is that your stored procedure continues to log to a table and a separate process be created that runs on the machine you want the file to be created on which reads the log table and writes to a log file.
    If that is not an option, can you expose the directory on the remote machine you want to write the file to as a file share that can be mounted by the database server? If you can, you could write errors there using UTL_FILE. However, it would probably be a bad idea. If you're logging an error already, that implies that something has gone wrong. Making an error logging process dependent on a remote server being available and properly mounted with appropriate privileges at the instant the error occurs just creates more sources of failure that would prevent you from logging an error, which would prevent you from being able to debug the problem or even know it existed without a report from a user.
    Justin

  • Archiving files generated by PL/SQL program using UTL_FILE package

    Dear All,
    We have on PL/SQL package that is generating some data files using UTL_FILE package in one specific directory.
    I am working on concurrent program of type host(unix script) to move generated file to some archive folder.
    Now the problem is owner of the files generated by PL/SQL is oracle and file permissions of the generated files are 644(Only read permission for group and others).
    Concurrent program is using an another os user applmgr to execute the script attached with concurrent program.
    Because applmgr is not having write permission on the files, hence mv command is failing.
    Please suggest me how to resolve this issue.
    Regards
    Devender Yadav

    Hi;
    I just think that, you can create one sh which is chancing permission of related path owner for applmgr user and put it on crontab and it can run every 1 min.
    Regard
    Helios

  • Error while using UTL_FILE package

    I am getting error while using UTL_FILE package in apex 3.0 version
    Pls help me out.

    ok, how are you using UTL_FILE and what is the error?

  • Need to generate the excel file with diffrent sheets using utl_file package

    Hi,
    Sorry for previous message in which I had missed the usage of " UTL_FILE " package
    I need to generate the excel file with diffrent sheets . Currently I am generating the data in three diffrent excel files using
    " UTL_File " package and my requirement is to generate this in a single excel file with diffrent sheets.
    Please help on this
    Thanks & Regards,
    Krishna Vyavahare

    Hello 10866107,
    at Re: How to save a query result and export it to, say excell? you can find links to different solutions. At least the packages behind second and fourth link support more than one worksheet.
    Regards
    Marcus

  • Permissions on files created using UTL_FILE package

    The files created on unix using UTL_FILE package have permisisons rw- - - - - - -.(600). I want them to be created with permissions 640.(rw-r - - - - - ).i.e read access to the group also. The umask setting of the unix account of the oracle instance are 137. Is there any way to create the files with the required permissions.

    So SQL*Plus is on your PC? I'm assuming you mean 'call' as in the windows cmd.exe command?
    Sheesh this is like getting blood from a stone.
    In that case you must be connecting via the listener and not internally.
    In which case the umask comes from the umask that was set in the environment of the OS user who started the listener process.
    Thats not necessarily the same as the owner of the oracle software (normally 'oracle').
    If sysdamin joebloggs logs in and starts the listener manually in a shell, then the umask applied to all shadow processes started by the listener is whatever jobloggs umask was when he typed the command 'lsnrctl start'. The umask of the owner of the oracle software, or your umask, is utterly irrelevent.
    So if you don't like the umask for files created by processes spawned by the listener, stop and restart the listener in a shell where you have explicitly set the umask to what you want it to be.
    Really starting the listener should be scripted and the correct umask is put in the script just before the call to 'lsnrctl start'.

  • Create a file and store it in the database using UTL_FILE package

    Hello.
    I'm using UTL_FILE package to store data from a table into an excel file but I don't know how to store this file in a table with a BLOB field the database at the same time. I want do do this because I will use it in a Oracle Portal.
    Anybody has any idea how to do this?
    Thanks & Regards,
    Alexandra

    From Asktom
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:232814159006

  • Problems with moving files to ora directory UTL_FILE.PUT_RAW - ORA-29285

    hi,
    i'm using apex 4.1
    i have a procedure which moves my file from apex_application_files to ORA directory.
    if i choose a text file or small word document which is 1kb, it works. but if i have pdf file (85kb) or word document (16kb) it gives me ORA-29285: file write error
    what's my problem?
    PROCEDURE put_file_to_server (p_filename IN VARCHAR2,p_cert_type IN VARCHAR2,p_cert_pk IN NUMBER)
    AS
    l_file UTL_FILE.file_type;
    l_blob_len INTEGER;
    l_pos INTEGER := 1;
    l_amount BINARY_INTEGER := 32767;
    l_buffer RAW (32767);
    v_new_filename VARCHAR2(100);
    v_bfile BFILE ;
    BEGIN
    -- delete from apex_application_files;
    --Neuen Dateinamen generieren
    v_new_filename := p_cert_type||'_'||p_cert_pk;
    v_bfile := BFILENAME (v_directory, v_new_filename);
    --Datei erstellen
    l_file := UTL_FILE.fopen(v_directory,v_new_filename,'w');
    IF DBMS_LOB.FILEEXISTS (v_bfile) = 1 THEN
    cert_log_pkg.m(p_module => 'CERT_FILE_PKG.PUT_FILE_TO_SERVER',p_msg => 'File exists');
    FOR rec IN (select blob_content lblob from apex_application_files where rownum = 1)
    LOOP
    l_blob_len := DBMS_LOB.getlength(rec.lblob);
    cert_log_pkg.m(p_module => 'CERT_FILE_PKG.PUT_FILE_TO_SERVER',p_msg => 'Filesize is '||l_blob_len);
    WHILE l_pos < l_blob_len LOOP
    DBMS_LOB.read (rec.lblob, l_amount, l_pos, l_buffer);
    UTL_FILE.put_raw (l_file, l_buffer, FALSE);
    l_pos := l_pos + l_amount;
    END LOOP;
    COMMIT;
    END LOOP;
    --Datei schließen
    UTL_FILE.fclose(l_file);
    else
    cert_log_pkg.m(p_module => 'CERT_FILE_PKG.PUT_FILE_TO_SERVER',p_msg => 'Datei doesn't exist');
    end if;
    EXCEPTION
    WHEN OTHERS
    THEN
    -- Close the file if something goes wrong.
    IF UTL_FILE.is_open (l_file) THEN
    UTL_FILE.fclose (l_file);
    END IF;
    delete from apex_application_files;
    RAISE;
    delete from apex_application_files;
    END put_file_to_server;

    Sorry but din't test this...Can you give it a try and see if this works?
    PROCEDURE put_file_to_server(
        p_filename  IN VARCHAR2,
        p_cert_type IN VARCHAR2,
        p_cert_pk   IN NUMBER)
    AS
      l_file UTL_FILE.file_type;
      l_blob_len INTEGER;
      l_pos      INTEGER      := 1;
      l_amount BINARY_INTEGER := 32767;
      l_buffer RAW (32767);
      v_new_filename VARCHAR2(100);
      v_bfile BFILE ;
      vblob BLOB;
      vstart NUMBER := 1;
      my_vr RAW(32000);
      bytelen NUMBER := 32000;
      LEN     NUMBER;
    BEGIN
      -- delete from apex_application_files;
      --Neuen Dateinamen generieren
      v_new_filename := p_cert_type||'_'||p_cert_pk;
      v_bfile        := BFILENAME (v_directory, v_new_filename);
      --Datei erstellen
      --l_file                          := UTL_FILE.fopen(v_directory,v_new_filename,'w');
      l_file                          := UTL_FILE.fopen(v_directory,v_new_filename, 'WB', 32760);
      IF DBMS_LOB.FILEEXISTS (v_bfile) = 1 THEN
        cert_log_pkg.m(p_module => 'CERT_FILE_PKG.PUT_FILE_TO_SERVER',p_msg => 'File exists');
        FOR rec IN
        (SELECT blob_content lblob,
          LENGTH(blob_content) LEN
        FROM apex_application_files
        WHERE rownum = 1
        LOOP
          cert_log_pkg.m(p_module => 'CERT_FILE_PKG.PUT_FILE_TO_SERVER',p_msg => 'Filesize is '|| LEN);
          IF LEN < 32760 THEN
            utl_file.put_raw(l_file,lblob);
            utl_file.fflush(l_file);
          ELSE -- write in pieces
            vstart      := 1;
            WHILE vstart < LEN
            LOOP
              dbms_lob.read(vblob,bytelen,vstart,my_vr);
              utl_file.put_raw(l_file,my_vr);
              utl_file.fflush(l_file);
              -- set the start position for the next cut
              vstart := vstart + bytelen;
              -- set the end position if less than 32000 bytes
              x         := x - bytelen;
              IF x       < 32000 THEN
                bytelen := x;
              END IF;
            END LOOP;
          END IF;
         END LOOP;
        ELSE
          cert_log_pkg.m(p_module => 'CERT_FILE_PKG.PUT_FILE_TO_SERVER',p_msg => 'Datei doesnt exist');
        END IF;
        utl_file.fclose(l_file);
      EXCEPTION
      WHEN OTHERS THEN
        -- Close the file if something goes wrong.
        IF UTL_FILE.is_open (l_file) THEN
          UTL_FILE.fclose (l_file);
        END IF;
        DELETE FROM apex_application_files;
        RAISE;
        DELETE FROM apex_application_files;
      END put_file_to_server;Edited by: Vitor Rodrigues on 17/Fev/2012 12:03

  • Having problem in recognising file using utl_file package..

    Hi,
    I am using utl_file utility to read the CSV file, utl_file.fopen function is useed to open file. This fopen function has three input parameters, second parameter is file name. My problem is that, i have to read file on daily basis. File name will be like:- DDMMYYYYHHMISS. Last six characters are for hour minute second of the file generation time. If the name has only DDMMYYYY then I can give the file name like TO_CHAR(SYADATE,'DDMMYYYY'), because on a particular date its same for the whole day. But hours, minutes and seconds will be of the time when the file is generated, it may be different for different days. In this condition how can I standardize the value for file name parameter in fopen function.
    Thanks in advance.

    Bharat Kaushik wrote:
    Actually.....
    I am gettting file from some other place..... And those people are not agreed to send file without exact time.JAVA solution is here
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:7506780031005
    Or if you want PL/SQL .. (May Be kiddy)
    --Please Note: SYSDATE is 26th in our DB.
    SQL> declare
      2   fp utl_file.file_type;
      3   dt date := trunc(sysdate);
      4  begin
      5   while (dt <= sysdate) loop
      6    begin
      7      fp := utl_file.fopen('OGL_REPORT_ACCESS','TEST'||to_char(dt,'ddmmyyyyhh24miss')||'.csv','r');
      8      dbms_output.put_line('TEST'||to_char(dt,'ddmmyyyyhh24miss'));
      9      utl_file.fclose(fp);
    10      exit;
    11    exception
    12     when utl_file.INVALID_OPERATION then
    13      null;
    14    end;
    15    dt := dt + 1/24/60/60;
    16   end loop;
    17  end;
    18  /
    TEST26042009010102
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:03.45
    SQL> select sysdate from dual;
    SYSDATE
    26-APR-09

  • Writing files using UTL_FILE package

    Greetings:
    I'm attempting to write simple text files on the server side using the UTL_FILE package.I can get it to write the file to a local drive on the Oracle server with no problems, but not a network drive. When trying to write to a network drive, the FOPEN function raises the UTL_FILE.INVALID_OPERATION exception. This is even with my UTL_FILE_DIR parameter set the * for all directories and I have "Full Control" permission on the directory. I am running in a NT Server/Wkstn environment. Anyone have any ideas why I can't write a file to a network drive?
    Thanks a lot,
    Chris Scopp

    Thanks for your response...
    I have set the UTL_FILE_DIR parameter... I've tried setting it to the * for all directories and also mapping a drive letter from the server to where I want to write the file and then explicitly naming this path in the UTL_FILE_DIR parameter. Neither works, I still get the INVALID_OPERATION exception raised on the FOPEN function. I'm convinced now that it does have something to do with NT because I have been able to do the same operation writing to a Win95/98 box and it works fine. I have "Full Control" to all places I'm trying to write to, any other ideas?
    Thanks a lot,
    Chris Scopp

  • Unable to write files in different m/c in LAN using utl_file package

    I need to dump some files generated by utl_file package in a separate m/c not in the db server.For that I tried using utl_file_dir='*' and mapped the specified directory in the db server. but its failing as show below..
    ORA-29283: invalid file operation
    ORA-06512: at "SYS.UTL_FILE", line 449
    ORA-29283: invalid file operation
    ORA-06512: at "ANIRBAN.WRITE_IN_FILE", line 9
    ORA-06512: at line 1
    The prototype sp is given below..
    CREATE OR REPLACE PROCEDURE write_in_file(pInDir IN VARCHAR2,
    pInFileName IN VARCHAR2,
    pInFileContent IN VARCHAR2) IS
    vFile UTL_FILE.FILE_TYPE;
    vFileName VARCHAR2(20) := pInFileName;
    BEGIN
    dbms_output.enable(1000000);
    vFile := UTL_FILE.FOPEN(pInDir, vFileName, 'w', 32000);
    UTL_FILE.PUT_LINE(vFile, pInFileContent);
    UTL_FILE.FCLOSE(vFile);
    END write_in_file;
    With this sp i'm able to write in genuine drives but not in mapped one.What shall be done to be able to write in a separate m/c freely.Plz guide me

    And make sure you specify the full path name of the server/directory path rather than using substituted drive names as is can sometimes be funny about that sort of thing.

  • Samples using UTL_FILE package

    hello;
    I would like to use the utl_file package: fopen, put_line ...
    can you send me some samples using this package.
    thanks to your help
    mam
    null

    declare
    T1 UTL_FILE.FILE_TYPE;
    begin
    begin
    T1:= UTL_FILE.FOPEN
    ('/u02/applmgr/10.7p161/eye/3.3.1/out','filename.dat','w');
    EXCEPTION
    WHEN UTL_FILE.INVALID_PATH THEN
    DBMS_OUTPUT.PUT_LINE('Invalid Path');
    WHEN UTL_FILE.INVALID_MODE THEN
    DBMS_OUTPUT.PUT_LINE('Invalid Mode');
    WHEN UTL_FILE.INVALID_OPERATION THEN
    DBMS_OUTPUT.PUT_LINE('Invalid Operation');
    end;
    UTL_FILE.PUT(T1,'PROD DATE ');
    UTL_FILE.PUT(T1,'PRODUCT ');
    UTL_FILE.PUT_LINE(T1,'INTEREST TYPE ');
    UTL_FILE.PUT(T1,'LEASE NUMBER ');
    begin
    UTL_FILE.FCLOSE(T1);
    EXCEPTION
    WHEN UTL_FILE.WRITE_ERROR THEN
    DBMS_OUTPUT.PUT_LINE('write error');
    WHEN UTL_FILE.INVALID_FILEHANDLE THEN
    DBMS_OUTPUT.PUT_LINE('Invald File Handle');
    end;
    END;
    mamoudou (guest) wrote:
    : hello;
    : I would like to use the utl_file package: fopen, put_line ...
    : can you send me some samples using this package.
    : thanks to your help
    : mam
    null

  • Reading all files on directory using "utl_file" package...

    I need to read all files in directory via PL/SQL. I don't know
    name files (are data dynamics create for automation system),
    only I know your extensions.
    Can I do this using the package "utl_file" or I need to create
    program in another language (C, C++, for example)?
    Any ideas...
    Thanks.

    Hi,
    you can't do that with the UTL_FILE package (it can't retrieve
    file names).
    A very simple solution would be, if you created on OS-level a
    file which contains the filenames of directory and then read this
    file using UTL_FILE. With the information on all file names you
    can enter a loop which opens and reads all files again using
    UTL_FILE.
    A more mundane solution could be to use the features on the iFS.
    Cheers
    Gerald

  • Problem with utl_file package

    Hi guys.
    I was trying I/O in oracle using utl_file packege the codes written my me was:
    DECLARE
    Temp UTL_FILE.File_Type;
    BEGIN
    Temp:=UTL_FILE.Fopen('/DOGS','TEST.txt','w');
    UTL_FILE.Put(Temp,'Hell');
    UTL_FILE.FFLUSH(Temp);
    UTL_FILE.Fclose(Temp);
    EXCEPTION
    WHEN UTL_FILE.INVALID_PATH THEN
    DBMS_OUTPUT.PUT_LINE('PATH');
    WHEN UTL_FILE.INVALID_FILEHANDLE THEN
    DBMS_OUTPUT.PUT_LINE('HANDLE');
    END;
    but its going state to exception invalid_path can any one help me out please.
    the entry in init.ora file was
    utl_file_dir="c:/help"
    please help me out please ur help will be appreciated. thanx
    nikhil
    null

    Nikhil,
    If we consider the following line from your code:
    Temp:=UTL_FILE.Fopen('/DOGS','TEST.txt','w');
    The first parameter in the FOPEN function ('/DOGS') is not a file system directory name, but an Oracle DB directory name. You need to create the directory thus:
    CREATE DIRECTORY dogs AS 'C:\help' ;
    You then need to permit the database server to access the physical directory by setting UTL_FILE_DIR as follows:
    UTL_FILE_DIR = 'C:\help'
    in init.ora. Don't forget to bounce the DB!
    Now you can open the file with:
    Temp:=UTL_FILE.FOPEN('dogs','TEST.txt','w');

  • Problem using the package Admin_Optimize.dtsx

    Hi, I am trying to use the package Admin_Optimize.dtsx but everytime that i ran it it fails, i try to openend with BIDS but i am unable to edit it, any advice that how can i use this package? or where can i find documentation related to this package? and how can i edit or modify it?, I appreciate your help.

    Hi, Harish.
    This is the situation The optimize works fine if I set it to "Lite." but it fails if It's a full optimize with compress turned on. I got the error in the Package log:
    TOTAL STEPS 1
    1.Admin_Optimize:  Failed in 363 sec.
    [Selection]
    Application=BP_Detail,Reporting,National_Plan
    OPTIMIZEOPTION=Yes
    COMPRESSDATABASE=Yes
    DEFRAGMENTINDEX=Yes
    OptimizeMinWBCount=1000
    [Messages]
    [Error][Osoft.Services.Application.OptimizeManage.OptimizeManagerCtrl]

Maybe you are looking for

  • Linking Directly from a Keyword to a Specific place in a topic?

    I have a topic called 'test'. Within that topic I have the following letters... A B C ...etc, all the way thru z, each letter on their own line. I do a search on the letter M. I get the results that the letter M is in Test. Is there a way I can go di

  • Email in Settings

    How do I customize my email in "My Settings?" I've since changed emails, and there seems to be no way to change it in my account

  • Pricing procedures question

    for intercompany PO ( STO )  can we have a markup ( some percentage ) in the pricing procedures? if so, how ....what config i should do ..to get the markup ....Please post ..Thank You Edited by: Bob on Sep 4, 2008 6:11 PM

  • HT201210 apple TV "device cannot be found"

    I updated my apple TV to find that it needed to be "restored" on itunes. When I plug it in to itunes the apple TV tab opens but then I get error message saying "device cannot be found" - any suggestions? thanks.

  • How to export multiples pages in one PDF file?

    I understand i can export image to a PDF file format. Is there a way to export a few pages in a single PDF file?