Help about the utl_file package

Hi all
I'm new on utl_file

I created a directory

Create directory LOGDIR AS 'G:\logdir\ '.

My dbuser with DBA privileges.

Here is my code
DECLARE
vDATA  VARCHAR2(4000);
vInHandle  utl_file.file_type;
BEGIN
  vInHandle := utl_file.fopen('LOGDIR', 'TEST.TXT', 'R');
UTL_FILE.GET_LINE(vInHandle,vDATA,256);
 
dbms_output.put_line(vDATA);
  
END ;


but when i run this code it gives me

Error on line 0
DECLARE
vDATA  VARCHAR2(4000);
vInHandle  utl_file.file_type;
vOutHandle ut

ORA-29283: invalid file operation
ORA-06512: at "SYS.UTL_FILE", line 475
ORA-29283: invalid file operation
ORA-06512: at line 6
Please help me

This error indicates usually that there is a problem, see the file. Either the directory on the operating system permissions are incorrect for oracle to be able to see the file or the file does not exist or, if you are using a unix database server then the file names will be case-sensitive. I assume that your oracle server is not unix that you have specified a windows style path in your directory. (You obviously realize that UTL_FILE can only access the database server file system and local client filesystems not?)

Tags: Database

Similar Questions

  • run the UTL_FILE package

    declare

    utl_file.file_type F1.
    Start

    F1: is UTL_FILE.fopen ('UTL1', 'example1.txt', 'w');.

    UTL_FILE.put_line (F1, 'hello');
    UTL_FILE.put_line (F1, 'welcome');
    UTL_FILE.put_line (f1, "this is the example to use utl_file package system");
    end;

    After the execution of this file is created with the specified name in the specified location.
    but the text is not inserted into the file.
    What is the reason and how can I solve this problem?

    You forgot to fclose

  • Help about the upgrade of my desktop hp p7 - 1070t

    I have a few questions regarding the upgrade of my office. Specifications of systems are as follows:

    HP P7 - 1070t

    Intel (R) Core (TM) processor i3-2100 3.10 GHz 3.10 GHz

    4.00 GB RAM

    64-bit operating system (windows 7)

    Graphics card is a Nvidia Geforce 520

    Motherboard is a Pegatron/Carmel

    I would like to know what type of cards of games I can upgrade, as the 520 altogether do not cut. I plan on upgrading my diet as well, however I'll choose a diet based on the power needs of my system after that I have determine what new credit cards I can get.

    Hi Capnchris01,

    The best way to approach the question is to look for some video cards you like and respond to the needs of your games and then compare the specifications of the cards for your PC specifications. There are some cards that you are interested in?

    In addition, there are some expert guides on the HP Forums were set up to help the upgrade of video cards and switching power supply. Here is the link to the video card guide:

    http://h30434.www3.HP.com/T5/desktop-hardware/Guide-for-selecting-a-discrete-video-card/TD-p/1299011

    Here is the guide for power supplies:

    http://h30434.www3.HP.com/T5/desktop-hardware/Guide-for-selecting-a-power-supply/TD-p/36223

  • Help about the cancellation of the account after automatic renewal.

    Hello

    While I was looking for to cancel the Adobe as he reiterated yesterday and I wanted to cancel it before it was the case, but unfortunately I missed it. The website says if I have to cancel within 30 days of the payment I will return all the money, how can I do this? Also can I get a garrentee I get everything back and not the back of 50%, as it is said that you get after that. Or am I stuck :/

    See you soon

    Aaron

    Cancel https://helpx.adobe.com/creative-cloud/help/cancel-membership.html

    -or https://helpx.adobe.com/contact.html?step=ZNA_account-payment-orders_stillNeedHelp

  • Need help about the xl version

    Hello!

    Yesterday I extend my adobe reader x for xl. I have now, I can't open pdf documents at all. Have any of you tried the which? And if you had, what did you do to fix?

    Thank you in advance for helping me.

    Karina

    You are welcome!

  • Help about the Accordion component for mobile application in FB 4.6?

    Hello

    I need Accordion component for mobile applications. Please provide any help if someone with.

    Thank you

    Sunil Rana

    I did my own Mobile accordion and his work in the unit.

    Thank you

    Sunil Rana

  • Help about the attachment

    Hi all

    I'm developing a form where the user will add details about a person. At the end there will be a button called "add photos" when the user clicks on the button add files dialog opens. The user can navigate through the photo and can add the size limited Photo.The max must be 700 KB. After that the user has added the photo the photo would appear as a thumbnail view. The user can also edit the photo later. I also think about: If the user clicks on the picture it would be displayed in its original size and a close button appears on the bigger picture on the corner of the upper side right. If the user clicks on it and then the picture will become thumbnail view once more. Is it possible to design in LiveCycle Designer 8.2 or am being too optimistic?

    Thank you.

    Sidonie.

    Hi Francine,.

    Here is an example:

    https://Acrobat.com/#d=jTxbDqy4gH9r2oALyXQQhQ

    Check out the script in the event layout_ready of the magnified image.

    Good luck

    Niall

  • Neede help about the tool clone of photoshop

    I'm quite new to photoshop and I have a strange problem, I don't even know what's a problem or simply a default behavior...
    When I use the clone tool, I press alt and select the area to clone... but when I release the ALT key, a plu marker appears with a circle used to print the copied box, below. So whenever I click to apply the copied part, another area just below it is copied again. Then when I drag the cursor along the image, each movement creates a new copy. I can't paste a unique space in other parts...
    So can someone please tell me how to get rid of this extra slider...

    Once again, what exactly did you do and what did you expect to happen? because if you have clicked and dragged into this image with him 3 times then everything works as advertised. Here's how the Clone Stamp tool should work: http://help.adobe.com/en_US/Photoshop/11.0/WSfd1234e1c4b69f30ea53e41001031ab64-760aa.html

  • Please help about the FRM-47023 - parameter does not exist in form

    Dear all,

    Best wishes...

    I'm currently doing some additions to existing forms.

    in fact, I have two forms, form and b. (form A) based on the tables and B form based on table B

    Existing scenario.

    Formula A-> table A contains the columns as

    A1Col1 - Primary key
    A1Col2 - Primary key
    A1Col3 - Primary key
    A1Col4 - Primay key
    A1Col5
    A1Col6

    Form B-> table B

    B1Col1 = A1Col1
    B1Col2 = A1Col2
    B1Col3 = A1Col3
    B1Col4 = B1Col4 (this is newly added column in TableB and form present I do not have this relationship, so I
    Add an element of text in form B and made it point to databases and give the coloumn name)
    B1Col5
    B1Col6


    Existing features:

    Form A is the main form and there is a button pressed, it will pass (A1Col1 parameters
    A1Col2, A1Col3 to the B shape based on what form B will ask details.

    Existing for this push in FormA button code is:
    DECLARE
      pl_id   ParamList;
      pl_name VARCHAR2(15) := 'ls_parm_list';
    BEGIN
      if :TableA.A1Col1 > ' ' and
         :TableA.A1Col2 > ' '   and
         :TableA.A1Col3 > ' '    and
         :TableA.A1Col4 > ' '     then (-- (newly added line for current requirement)

          pl_id := Get_Parameter_List(pl_name);

          if NOT Id_Null(pl_id) then
              Destroy_Parameter_List(pl_id);
          end if;

          pl_id := Create_Parameter_List(pl_name);

          Add_Parameter(pl_id,'A1Col1',TEXT_PARAMETER,:TableA.A1Col1);
          Add_Parameter(pl_id,'A1Col2',TEXT_PARAMETER,:TableA.A1Col2);
          Add_Parameter(pl_id,'A1Col3',TEXT_PARAMETER,:TableA.A1Col4);
          Add_Parameter(pl_id,'A1Col4',TEXT_PARAMETER,:TableA.A1Col3); -- (newly added line for current requirement)
          Add_Parameter(pl_id,'A1Col5',TEXT_PARAMETER,:PARAMETER.UID);

          NEW_FORM('FormB',TO_SAVEPOINT,NO_QUERY_ONLY,pl_id);
      end if;
    END;
    Code for the new instance of the form to FormB:
    DECLARE
      W_WHERE VARCHAR2(100);
    BEGIN
      if :PARAMETER.Param1 > ' ' then
          W_WHERE := 'B1col1=''' || :PARAMETER.param1 || ''' AND B1col2=''' || :PARAMETER.param3 || ''' AND B1col3 =''' || :PARAMETER.param4 || ''' AND B1col4=''' || :PARAMETER.Param4 || '''';

          Set_Block_Property('TableB',DEFAULT_WHERE,W_WHERE);

          execute_query;

          Set_Block_Property('TableB',DEFAULT_WHERE,'');
      end if;

      :SYSTEM.MESSAGE_LEVEL := 25;
    END;
    So now,.

    New features:

    I need to spend an additional column in TableA (A1Col4) also a parameter to form B so that it will be in the where clause of the form B.

    To achieve this requirment,

    Step 1:

    Step 1: I added B1Col4 to TableB because it did not exist before.

    Step 2: I added a text element in FormB, named as "A1Col4" and set its property to iterm Yes to Database and columname to A1Col4.

    And then I created a setting called "' A1Col4" to FormB (this iis since I added a new setting FormA pressed button code above)... ".

    Now, the real problem I am facing:

    I have compiled the forms, and it went well... I ran the FormA... Here are the scenarios:

    1. formA is running and when I run the query, it performs gets data, when press the button go form B (to all 4 parameters to formb, I get error. FRM 47023 No. such parameter named A1col4 exists in FormB. even though I have the parameter b form created recently with this name.

    2. so I just kept the existing code button pressed (commented on newly added lines, keeping the 3 parameters instead of 4) and removed "' AND B1col4 =" ' | : PARAMETER. Param4 | "' from the whennewform code instance formb, the result is: FormA call FormsB successfully, FormB is to be opened, BUT VERY STRANGE, THAT NEWLY ADDED POINT (COLUMN TABLEB THAT I wanted TO PASS ADDITIONAL PARAMETER FROM FORM 'A') IS MISSING. This text element appears not.


    3. If I run FormB alone, then it is querying data, the newly added text element is also displayed but if if I have the same call FormA, error FRM-47023.

    I sat for hours and hours to find out what exactly the problem... but no clue...

    Sorry for the long post... but in hope and who seek the help of our friends from the OTN network...

    Hope that I have explained clearly the problem... By the way that the version is 10G forms.

    Thanks for the help in advance for everyone...

    Kind regards
    Prasanth

    they are in the same folder

    If you're on 10G, being in the same folder does not mean automatically that the forms be made on this issue. In your EPS file, there is a parameter named FORMS_PATH, forms are searched for in directories listed there. To verify your env file. also, you could search the entire disk by issuing a

    dir formb.fmx /s
    

    from the root directory of your disks.

  • Help about the ADF RichColumn

    I'm generating a table of the ADF and add columns programmatically to the table.
    In one of my events I need to know which column is selected for the treatment of the data, so I use the ADFColumn isSelected property that indicates whether the column is selected from the user interface or not.
    It works fine if I have a single column with o/p or i / component p inside.

    The problem occurs when I have two kids columns in my main column does not set the property isSelected-true for this kind of column...

    I have following the structure of column
    -----------------
    | Amount |
    -----------------
    | Min | Max |
    ------------------

    Code used for the generation of columns is:
    Column RichColumn = new RichColumn();
    column.setId (columnName);
    column.setHeaderText (columnName);
    column.setNoWrap (true);
    column.setAlign ('center');


    RichColumn minColumn = new RichColumn();
    minColumn.setId (columnName + "Min");
    minColumn.setHeaderText ("Min");
    minColumn.setNoWrap (true);
    minColumn.setAlign ('center');
    minColumn.setWidth("75");
    RichInputText Inputtext = new RichInputText();
    inputtext.setId ("minConditionIT");
    inputtext.setAutoSubmit (true);
    minColumn.getChildren () .add (inputtext);

    column.getChildren () .add (minColumn);

    RichColumn maxColumn = new RichColumn();
    maxColumn.setId (columnName + 'Max');
    maxColumn.setHeaderText("Max");
    maxColumn.setNoWrap (true);
    maxColumn.setAlign ('center');
    maxColumn.setWidth("75");
    RichInputText maxInputtext = new RichInputText();
    maxInputtext.setId ("maxConditionIT");
    maxInputtext.setAutoSubmit (true);
    maxColumn.getChildren () .add (maxInputtext);

    column.getChildren () .add (maxColumn);
    -----------------------------------------------------
    Event code used to find the selected column is as follows: -.

    private int getSeletedcolumnIndex() {}
    T2 is the table of the ADF
    The list of columnList = this.t2.getChildren ();
    for (int i = 0; i < columnList.size (); i ++) {}
    Column RichColumn = (RichColumn) columnList.get (i);
    If (column.isSelected ()) {}
    Return column.getDisplayIndex ();
    } else {}
    List of children < UIComponent > = column.getChildren ();
    for (int j = 0; j < children.size (); j ++) {}
    UIComponent component = children.get (j);
    If (components! = null & & component instanceof RichColumn) {}
    RichColumn childColumn = component (RichColumn);
    If (childColumn.isSelected ()) {}
    Return column.getDisplayIndex ();
    }
    }
    }
    }
    }


    This method does not give the property isSelected as true, if I have children columns in my main column...
    Please help on this...

    Published by: user10281080 on July 31, 2009 02:38

    Published by: user10281080 on August 3, 2009 07:43

    Hello

    If you use columns with children columns then selected State should be on the columns of content as the main column is not active

    Frank

  • Having a problem to recognize the file using the utl_file package...

    Hello

    I use utl_file utility to read the CSV file, utl_file.fopen function is useed to open the file. The fopen function has three input parameters, the second parameter is the name of the file. My problem is that I need to read file on a daily basis. The file name will be like:-DDMMYYYYHHMISS. Last six characters are for the hour minute second generational file. If the name has only DDMMYYYY then I can give the name of file as TO_CHAR(SYADATE,'DDMMYYYY'), for an individual the same date throughout the day. But the hours, minutes and seconds will be time when the file is generated, it can be different for different days. In this case how can I normalize the value for the filename parameter in the function fopen.

    Thanks in advance.

    Similar to the jeenesh solution:

    declare
     fexists boolean;
     fname varchar2(20) := to_char(trunc(sysdate),'DDMMRRRR');
     ......
    begin
     . ...
       for i in 1..24*3600 loop
         utl_file.fgetattr(location,filename || to_char(to_date(i-1,'sssss'),'HHMISS'),fexists,file_length,block_size);
         if fexists then fname = fname || to_char(to_date(i-1,'sssss'),'HHMISS'); exit; end
      end loop;
    .... --- now you can open the file with above found filename
    
    end;
    /
    
  • Help about the paragraph and character styles scriptting

    Hi all

    I'm working on a project with many files, I change change on all styles of paragraph with multiple processes

    for ex, change the font for all styles of paragraph on all open documents

              var docs = app.documents;  
                     
              for (var d = docs.length-1; d >= 0; d--) {  
                      var doc=docs[d]; 
                      
    var pstyles = doc.allParagraphStyles;  
    for (var a = 1; a < pstyles.length; a++) {    
                              if (pstyles[a].appliedFont.name=="Arial\tBold")    
                                   pstyles[a].appliedFont = "Arial\tBold Italic";    
                         }
                     }
    

    but I found a text inside frames (the locked position) my find/replace a not to apply to this topic

    so, is there anyway to do this process for all chassis from locked position?

    or at least make the lock of the United Nations to all open documents, but I can only do this for the active doc

    app.activeDocument.pageItems.everyItem (.locked = false)

    Another thing, I tried to change it on all styles of character on the files and I wrote the code with my little knowledge script but it seems does not, any hint please?

              var docs = app.documents;  
                     
              for (var d = docs.length-1; d >= 0; d--) {  
                      var doc=docs[d]; 
                      
    var cstyles = doc.allCharacterStyles;  
    for (var a = 1; a < cstyles.length; a++) {    
                              if (cstyles[a].appliedFont.name=="Arial\tBold")    
                                   cstyles[a].appliedFont = "Arial\tBold Italic";  
                         }
    }
             }  
    

    Thanks in advance

    Maybe your consolidated text block... Try this

    docs var = app.documents.

    for (var docs.length - 1; d = d > = 0; d-) {}

    var doc = docs [d];

    var pgItems = doc.allPageItems;

    for (var a = 0;< pgitems.length;="" a++)="">

    If (pgItems [a] instanceof TextFrame) {}

    While (doc.groups.length > 0)

    doc.groups.everyItem () .ungroup ();

    pgItems [a] .locked = false;      }

    }

    }

  • Hi I need to read the data in vaiables local file delimited using the utl_file package «»


    Hi all

    I want to read data from a .csv file which is ',' delimited in a local variable that is different from a plsql stored procedure so that I can insert into the table.

    I use this way to read data...

    --------------------------------------------------------------------------------

    -get the position of ',' (comma) in csv file

    --------------------------------------------------------------------------------

    l_c1: = INSTR (l_in_file, ',', 1, 1);

    l_c2: = INSTR (l_in_file, ',', 1, 2);

    l_c3: = INSTR (l_in_file, ',', 1, 3);

    l_c4: = INSTR (l_in_file, ',', 1, 4);

    l_c5: = INSTR (l_in_file, ',', 1, 5);

    l_c6: = INSTR (l_in_file, ',', 1, 6);

    l_c7: = INSTR (l_in_file, ',', 1, 7);

    l_c8: = INSTR (l_in_file, ',', 1, 8);

    l_c9: = INSTR (l_in_file, ',', 1, 9);

    l_c10: = INSTR (l_in_file, ',', 1, 10);

    --------------------------------------------------------------------------------
    -pull data into local variables
    --------------------------------------------------------------------------------
    l_0003: = SUBSTR (l_in_file, l_c2 + 1, l_c3-(l_c2 + 1));

    l_0004: = SUBSTR (l_in_file, l_c3 + 1, l_c4-(l_c3 + 1));

    l_0005: = SUBSTR (l_in_file, l_c4 + 1, l_c5-(l_c4 + 1));

    l_0006: = SUBSTR (l_in_file, l_c5 + 1, l_c6-(l_c5 + 1));

    l_0007: = SUBSTR (l_in_file, l_c6 + 1, l_c7-(l_c6 + 1));
    l_0007: = To_Char (To_Date (l_bdate_0007, "mm/dd/yyyy '"), 'yyyy-mm-dd');

    l_0008: = SUBSTR (l_in_file, l_c7 + 1, l_c8-(l_c7 + 1));

    l_0009: = SUBSTR (l_in_file, l_c8 + 1, l_c9-(l_c8 + 1));

    l_0016: = SUBSTR (l_in_file, l_c9 + 1, l_c10-(l_c9 + 1));
    l_0016: = To_Char (To_Date (l_eff_dt_0016, "mm/dd/yyyy '"), 'yyyy-mm-dd');

    I need to find an alternative way to reduce the length of the Code.

    Any Suggestion please!

    Hello

    Please see the query below...

    SELECT RTRIM (REGEXP_SUBSTR ('John, 100, Manager, 26000', ' [^,] *,', 1, 1), ',') AS part_1

    , RTRIM (REGEXP_SUBSTR ('John, 100, Manager, 26000', ' [^,] *,', 1, 2), ',') AS part_2

    , RTRIM (REGEXP_SUBSTR ('John, 100, Manager, 26000', ' [^,] *,', 1, 3), ',') AS part_3

    , LTRIM (REGEXP_SUBSTR ('John, 100, Manager, 26000', ', [^,] *', 1, 3), ',') AS part_4

    DOUBLE;

  • Help about the XSl transformation

    I have a xml like this

    <? XML version = "1.0"? >

    <? XML-stylesheet type = "text/xsl" href = "st.xsl"? >

    workflows <>

    < completed workflow = "COMPELETED" Name = "CRMODWF6027" >

    < action >

    < completed = 'COMPELETED"Name ="SendMailAction">

    Notification of < type > < / Type >

    < / action >

    < / actions >

    < / workflow >

    < completed workflow = 'INCOMPLETE' Name = "CRMODWF6028" >

    < action >

    < completed = 'COMPELETED"Name ="UpdateValueAction">

    Update < type > values < / Type >

    < / action >

    < completed = 'INCOMPLETE' Name = "WaitAction" >

    Action not supported < type > < / Type >

    not SUPPORTED for < error > < / error >

    < / action >

    < / actions >

    < / workflow >

    < completed workflow = 'INCOMPLETE' Name = "CRMODWF6000" >

    < error > an error has occurred during the recording of the workflow

    C:\temp\Log\ErrorImages\CRMODWF6000_1400655809602.PNG < ErrorFile > < / ErrorFile >

    < / error >

    < / workflow >

    < completed workflow = 'INCOMPLETE' Name = "CRMODWF6022" >

    unsupported AccountAddress < error > record type < / error >

    < / workflow >

    < / workflows >

    I wrote like this transformation

    <? XML version = "1.0" encoding = "UTF-8"? >

    < xsl: stylesheet version = "1.0".

    "xmlns: xsl ="http://www.w3.org/1999/XSL/Transform">".

    < xsl: template match = "/" >

    < html >

    < body >

    File of the workflow log < h2 > < / h2 >

    < table border = "1" >

    < tr bgcolor = "#9acd32" >

    name of the workflow < th > < /th >

    State of the workflow < /th > < th >

    < /th > < th > workflow error

    < /tr >

    < xsl: for-each select = "Workflows/Workflow" >

    < b >

    < td > < xsl: value-of select="@Name"/ > < table >

    < td > < xsl: value-of select="@Completed"/ > < table >

    < td > < xsl: value-of select = "Error" / > < table >

    < table border = "1" >

    < xsl: for-each select = "Actions/Action" >

    < b >

    < td > < xsl: value-of select="@Name"/ > < table >

    < td > < xsl: value-of select="@Completed"/ > < table >

    < td > < xsl: value-of select = "Type" / > < table >

    < td > < xsl: value-of select = "Error" / > < table >

    < /tr >

    < / xsl: foreach >

    < /table >

    < /tr >

    < / xsl: foreach >

    < /table >

    < / body >

    < / html >

    < / xsl: template >

    < / xsl: stylesheet >

    How to turn like that

    OP: level of workflow to

    Name of the workflow
    State of the Workflow
    Workflow error message



    Depending on the status that we can probably do an outstanding CLOTH.

    Red: Status incomplete = with Error Message not as "unsupported %.

    AMBER: Status incomplete = with Error Message like "unsupported %.

    Green: Status = completed

    Down: at the level of the workflow Action

    Name of Worklfow
    Name of the action
    Type of action
    Status of the action
    Incorrect user action





    Here, too, we can do a RAG encoding:

    Green: Status = completed

    AMBER: Status = incomplete and type = Action not supported

    Red: Rest all

    Thank you

    Delphine

    Such a feature is generally known as grouping in xslt 1.0 where often xsl: Key construction is necessary to effectively deal with the problem. In this case, I guess that all of the data is not very big, that we can go out with less efficiently, which could even be more "effective" in a small set of data...

    Moreover, I have to assume error and Actions are not in a kind of competition in the sense that if the error is there Actions would not, and vice versa. This is necessary in the following as construction assumes that there is error 2 and there are Action 4... In this fictional case, whether to rowspan the largest number... and that the distribution of line covering itself could be problematic as: would you rank extended error? etc.

    We clearly, it's a way to do it.

    [code]

    [/ code]

    Note that I have not rowspan error column but only the first two columns. I did the mistake and Action on equal footing... If you really want rowspan error as well, you can put some parolees more share of td involved. But under this idea and if there might be more than one error actually under workflow, we can wonder why not in this case rowspan all the Action... It would be more script and the document looks more like the work of patch!

    PS My editor of xslt is nothing special, just publishing text multi-character-encoding-ready or these ide free everyone.

  • could I get help about the website?

    Hello

    I am a new user of flash and dreamweaver. Please sorry for this question.

    I used a flash template and converted into a swf file. After I joined this swf file in

    My dreamweaver template. just does not work in my local browser, but it does not work after uploading to the server.

    It redirects to a blank white page.

    Web site: http://www.goldenthai.info

    Here is the link to the entire folder of the Web site: http://www.mediafire.com/?etd7gufyxpi6zqm

    If you need extra things me to solve the problem such as scripts, files, please let me know. I'll put it up.

    Thank you very much

    Jack.

    I just looked at the source of your page. It seems that your .swf file index.swf was transferred as text instead of the data. Download the file again and specify the data as file type.

Maybe you are looking for