Create directory utl_file errors

I thought that I would be able to answer my problem with all the help I've seen online. I don't seem to be able to.
I have the following code (snippet) below from my procedure:
v_file varchar2(100);
v_direc constant varchar2(30) := 'c:\output\';
v_testfile UTL_FILE.FILE_TYPE;
BEGIN
v_testfile := utl_file.fopen('C:\output', 'JohnsUIICounts.txt', 'w');
open csr_uii;
loop
fetch csr_uii into csr_uii_a, csr_uii_b, csr_uii_c, csr_uii_d;
exit when csr_uii%NOTFOUND;
utl_file.put_line(v_testfile, csr_uii_a || ' ' || csr_uii_b || ' '|| csr_uii_c || ' '|| csr_uii_d);
end loop;
I logged on to SQL Developer and did:
CREATE DIRECTORY V_DIREC AS 'C:\output\';
GRANT WRITE ON DIRECTORY V_DIREC TO PUBLIC;
I got the message back that the directory was created. When I go to the c:\ drive, I don't see the directory.
Any ideas? I've gone through all sorts of iterations like changing the drive from c to e, different folder names, upper and lower case, nothing works.
Victoria

Thanks. Now that I understand that, I created the directory on the server. I reran the code. I'm still getting:
ORA-29280: invalid directory path
ORA-06512: at "SYS.UTL_FILE", line 33
ORA-06512: at "SYS.UTL_FILE", line 436
I notice that on the Windows Server, when I create the directory (as an admin user), I check on the properties, and it keeps staying read only. I can modify it, but the change doesn't save. I heard something about group permissions. Is it possible that the problem is because of permissions on the server? I would think that might be the real problem at this point.
Thanks,
Victoria
Edited by: user3804901 on May 20, 2009 4:31 AM

Similar Messages

  • Cannot create directory - dbca error message

    i am trying to create database through dbca in 10.2 in windows vista
    in 12 step while click finish button i am getting
    "cannot create directory f:\oracle\product\10.2.0\db_1\cfgtoollogs\dbca\catdb"
    please give solution for this. Thanks in advance.
    Edited by: user8941653 on Feb 7, 2011 12:14 AM
    Edited by: user8941653 on Feb 7, 2011 12:15 AM

    According to the download page the minimum supported version on Vista is 10.2.0.4 but the installation guide states 10.2.0.3.0.
    According to the installation guide you need administrator rights to run DBCA.
    How are you running DBCA? From the Start menu or from command line?

  • UTL_FILE errors,  invalid directory path ???

    Hi All,
    I am trying to create a csv output file through pl/sql.
    However i am having some issues since its my first time.
    Please have a look at the following code:
    create or replace
    PROCEDURE amer_main_proc (start_sent_date date,
                        end_sent_date date,
                        senttype number) IS
    CURSOR main_cur IS
    SELECT
              s.sent_id,
              s.ussc_id,
              s.sent_upd_date,
              s.alt_docket,
              s.amend_year,
              s.def_num,
              s.dep_status_code,
              s.var_status_code,
              s.disp_type_code,
              s.docket,
              s.oth_sent_code,
              substr(s.oth_text,1,100) oth_text,
              s.po_code,
              ind.prim_offn_code,
              s.prob_mons
    FROM      sentences s,
              submission sub,
              ind_sent ind,
              defendants def,judges j
    WHERE      s.sent_id = sub.sent_id
    AND      s.sent_id = ind.sent_id
    AND      ((sub.case_type_code in (10,11) 
    AND      trunc(sent_vio_date) between start_sent_date and end_sent_date) or
              (sub.case_type_code in (10)  AND trunc(sent_vio_date) between start_sent_date and end_sent_date) or
              (sub.case_type_code in (11) AND trunc(sent_vio_date) between start_sent_date and end_sent_date) or
              (sub.case_type_code in (11) and  s.amend_code = 10 AND trunc(sub.create_date) between start_sent_date and end_sent_date))
              AND s.def_id=def.def_id
              AND s.ao_judge_id = j.ao_judge_id
              AND sent_creator_id is not null
              AND dist_id != 99
    ORDER BY s.ussc_id, s.sent_id;
    --Define output file variables
    out_file UTL_FILE.FILE_TYPE;        /* file type */
    path_name VARCHAR2(50);            /* file path */
    file_name VARCHAR2(50);            /* file name */
    line_buffer VARCHAR2(2000);        /* store all the elements that make up one line in the output file */
    BEGIN
        path_name := 'C:\SQL';  // this folder does exist in my C drive
        file_name := 'main.txt';
        out_file := UTL_FILE.FOPEN(path_name, file_name, 'W');
        line_buffer := 'data main;';
        UTL_FILE.PUT_LINE (out_file, line_buffer);
        line_buffer := 'infile cards delimiter='','';';
        UTL_FILE.PUT_LINE (out_file, line_buffer);
        line_buffer := 'input ' ||
        'USSCIDN ' ||
        'ALT1DOC $ ' ||
        'DEPART ' ||
        'VARIAN ' ||
        'DISPOSIT ' ||
        'DOCKETID $ ' ||
        'TYPEOTHS ' ||
        'TYPEOTTX $ ' ||
        'POOFFICE $ ' ||
        'MONOFFTP ' ||
        'PROBATN ';
        UTL_FILE.PUT_LINE (out_file, line_buffer);
        FOR main_cur_rec IN main_cur LOOP
         --Writes to file
              line_buffer := main_cur_rec.ussc_id ||
              ',' || nvl(main_cur_rec.alt_docket,' ') ||
              ',' || nvl(to_char(main_cur_rec.dep_status_code),' ') ||
              ',' || nvl(to_char(main_cur_rec.var_status_code),' ') ||
              ',' || nvl(to_char(main_cur_rec.disp_type_code),' ') ||
              ',' || nvl(main_cur_rec.docket,' ') ||
              ',' || nvl(to_char(main_cur_rec.oth_sent_code),' ') ||
              ',' || nvl(main_cur_rec.oth_text,' ') ||
              ',' || nvl(to_char(main_cur_rec.po_code),' ') ||
              ',' || nvl(to_char(main_cur_rec.prim_offn_code),' ') ||
              ',' || nvl(to_char(main_cur_rec.prob_mons),' ');
              UTL_FILE.PUT_LINE (out_file, line_buffer);
         END LOOP;
         --Write SAS footer
         line_buffer := ';';
         UTL_FILE.PUT_LINE (out_file, line_buffer);
         line_buffer := 'run;';
         UTL_FILE.PUT_LINE (out_file, line_buffer);
         --Close file
         UTL_FILE.FCLOSE(out_file);
    EXCEPTION
    -- Write error messages to the screen and file
        WHEN OTHERS THEN
        DBMS_OUTPUT.PUT_LINE(SUBSTR(SQLERRM,1,50));     // this is line 106
        UTL_FILE.PUT_LINE(out_file, SUBSTR(SQLERRM,1,50));
       UTL_FILE.FCLOSE(out_file);
    END amer_main_proc;I know I am having issues regarding the path, please have a look at the ERRORS below:
    Error starting at line 1 in command:
    DECLARE
      START_SENT_DATE DATE;
      END_SENT_DATE DATE;
      SENTTYPE NUMBER;
    BEGIN
      START_SENT_DATE := '01-JAN-2001';
      END_SENT_DATE := '01-MAR-2001';
      SENTTYPE := 10;
      AMER_MAIN_PROC(
        START_SENT_DATE => START_SENT_DATE,
        END_SENT_DATE => END_SENT_DATE,
        SENTTYPE => SENTTYPE
    END;
    Error report:
    ORA-29282: invalid file ID
    ORA-06512: at "SYS.UTL_FILE", line 878
    ORA-06512: at "USSC_CASES.AMER_MAIN_PROC", line 106
    ORA-29280: invalid directory path
    ORA-06512: at line 10
    29282. 00000 -  "invalid file ID"
    *Cause:    A file ID handle was specified for which no corresponding
               open file exists.
    *Action:   Verify that the file ID handle is a value returned from a
               call to UTL_FILE.FOPEN.thanks guys.
    Edited by: Rooney on Feb 20, 2012 12:29 PM

    You'll need to create an Oracle Directory object that contains 'C:\SQL' and use that in your UTL_FILE call if you are using a 10g+ version of the database and the UTL_FILE_DIR parameter does not include your path.
    CREATE DIRECTORY my_dir AS 'C:\SQL';
    GRANT READ WRITE ON DIRECTORY my_dir TO <user>;You can then use the directory object name in the path of your UTL_FILE call.
    ORA-29280: invalid directory path Cause: A corresponding directory object does not exist.
    Action: Correct the directory object parameter, or create a corresponding directory object with the CREATE DIRECTORY command.>
    Hope this helps!

  • Error in creating directory

    i am using the following command to create a directory in Oracle:-
    CREATE OR REPLACE DIRECTORY DATALOAD AS ‘D:\temp\udump’
    ERROR at line 1:
    ORA-00911: invalid character
    How, can we remove the error? Please, help in solving the doubt.
    regards

    For eg., the directory 'DATALOAD' is not showing under D:\temp\udump path.Alas you have misunderstood the purpose of DIRECTORY objects in Oracle. They are a way of referring to OS paths abstractly, for instance in calls to UTL_FILE or when creating External Tables.
    This is useful for all sorts of reasons. It's safer and easier that setting UTL_FILE_DIR in the init.ora parameters. It's hand if we want our application to run on different operating systems, or just on servers with different directory structures.
    What CREATE DIRECTORY does not do is actually create the OS directory; it's just creating a mapping. You have to create the OS directory yourself, using the tool appropriate to your platform, Explorer in your case.
    Cheers, APC
    Blog : http://radiofreetooting.blogspot.com/

  • Error 7 occurred at Create Folder in Create Directory Recursive.vi-

    Recieved following message when attemoting to create source distribution
    Error 7 occurred at Create Folder in Create Directory Recursive.vi->ABAPI Dist Create Directory Recursive.vi->ABAPI Dist Chk for Destinations.vi->ABAPI Copy Files and Apply Settings.vi->SDBEP_Invoke_Build_Engine.vi->SDBUIP_Build_Invoke.vi->SDBUIP_Build_Rule_Editor.vi->SDBUIP_Item_OnDoProperties.vi->SDBUIP_Item_OnDoProperties.vi.ProxyCaller
    Possible reason(s):
    LabVIEW:  File not found. The file might have been moved or deleted, or the file path might be incorrectly formatted for the operating system. For example, use \ as path separators on Windows, : on Mac OS, and / on Linux.

    Hello,
    Could you please list which options you are selecting when building a
    source distribution (I am assuming you are using LabVIEW 8.0?).
    Do you get this error when clicking on "Generate Preview" button when configuring source distribution properties?
    Under "Distribution Settings" category, could you try checking the
    "Disconnect type definitions and remove unuses polymorphic VI
    instances" option and see if that helps with the build process?
    Also I suggest Mass Compiling your VIs (Tools -> Advanced -> Mass Compile) before creating a source distribution.
    If these do not help, could you attach your project with all the VIs it contains here?
    Thank you and best regards,
    Shakhina P.
    Applications Engineer
    National Instruments

  • Can not create directory error while creating database

    i am creating database using dbca in oel but when i try to do so i get an error saying can not create directory pawii
    and pawii is the sid
    actually oracle is installed on u01 and i am creating database in u02
    but this error is not allowing me to create database but when i try to create database in uo1 the database installed successfully but this is not happening when i try to create database in another mount point u02

    987018 wrote:
    so finally i had solved the problem myself as people like rukbat are very unhelpful in nature here
    all we had to do is we had to change the group of the folder to oracle and oinstall where we are going to create our new database :)Actually he tries to be quite helpful. But sometimes the help you need isn't the help you want.
    "When you need me but do not want me, then I must stay. When you want me but no longer need me, then I have to go." (Nanny McPhee)

  • Geting error while creating a dir through CREATE DIRECTORY command

    Hi Gurus,
    When I'm trying to create a dir through this command with logged in as SYS
    CREATE DIRECTORY pump_dir AS 'd:\temp\pump_dir';
    I'm getting the error
    Error starting at line 1 in command:
    CREATE DIRECTORY pump_dir AS 'd:\temp\pump_dir'
    Error at Command Line:1 Column:18
    Error report:
    SQL Error: ORA-00955: name is already used by an existing object
    00955. 00000 - "name is already used by an existing object"
    Any ideas how I can create a dir and grant access to a different user.
    Thanks
    Amitava.

    amitavachatterjee1975 wrote:
    I checked and there is no such directory. I guess it is not that simple, the error I mean.Actually it is , please see,
    ORA-00955:     name is already used by an existing object
    Cause:     An attempt was made to create a database object (such as a table, view, cluster, index, or synonym) that already exists. A user's database objects must have distinct names.
    Action:     Enter a unique name for the database object or modify or drop the existing object so it can be reusedSo as Sb mentioned, check that which object is using the same name that you are trying to assign to this directory object and either rename or drop the object if you want to use the same name only. If not, you can always use another distinct name for this directory object .
    Aman....

  • Having problems installing firefox error msg says error creating directory c:\programme files (x86)\mozilla firefox\searchplugins

    Hi, I have been having problems with Internet Explorer 8 using Windows 7 so wanted to install Firefox but unable to as get a message saying error creating directory c:\programme files (x86)\mozilla firefox\searchplugins

    Thank you guig2! Followed your bleepingcomputer.com link above and found the problem was my permissions on C:\Users\Bill\AppData\Local/Temp. It was not "Full Control" for my User or Administrator. Updated the two lines to permit full control for folder, subfolder and files. Ran perfect.

  • Backup failed with Error: (-50) Creating Directory

    Repeats ad nauseum.
    This is backing up to a second internal drive that is an exact duplicate (in terms of HD model and size).
    Does anyone know what Error -50 means? Lack of permissions? Invalid name (doesn't seem like it)?
    8/30/08 9:06:37 AM /System/Library/CoreServices/backupd Starting standard backup
    8/30/08 9:06:37 AM /System/Library/CoreServices/backupd Backing up to: /Volumes/Sliffy Time/Backups.backupdb
    8/30/08 9:06:58 AM /System/Library/CoreServices/backupd Error: (-50) Creating directory 2008-08-30-090658.inProgress
    8/30/08 9:06:58 AM /System/Library/CoreServices/backupd Failed to make snapshot container.
    8/30/08 9:07:03 AM /System/Library/CoreServices/backupd Backup failed with error: 2

    Hi Glenn,
    Thanks for the suggestion. Nope, it's not listed. The only thing listed is my Time Machine volume.
    After a reboot, Time Machine seems to be working. It's making backups on schedule and the logs look good, not reporting any strangeness.
    A bit bummed about these phantom errors that go away on reboot. I'll keep on eye on the error/reboot frequency.
    Rob

  • Create directory error on a VMS system

    Ok, I am trying to load some date into a CLOB field within a small table I have created. Here is how I attempted to accomplish this and the result (and to add insult to injury, it is on a VMS system!):
    CREATE TABLE js_holder (
    js_name varchar(30),
    js_body CLOB );
    CREATE DIRECTORY foos as 'USR$DISK:[CLEMENSD.SQL_EDIT]';
    CREATE OR REPLACE PROCEDURE Load_CLOB IS
    dest_clob CLOB;
    in_file BFILE := BFILENAME('foos', 'supernote.js');
    dst_offset number := 1 ;
    src_offset number := 1 ;
    lang_ctx number := DBMS_LOB.DEFAULT_LANG_CTX;
    warning number;
    BEGIN
    DBMS_OUTPUT.ENABLE(100000);
    INSERT INTO js_holder(js_name, js_body)
    VALUES('supernote', empty_clob())
    RETURNING js_body INTO dest_clob;
    DBMS_LOB.OPEN(in_file, DBMS_LOB.LOB_READONLY);
    DBMS_LOB.LoadCLOBFromFile(
    DEST_LOB => dest_clob,
    SRC_BFILE => in_file,
    AMOUNT => DBMS_LOB.GETLENGTH(in_file),
    DEST_OFFSET => dst_offset ,
    SRC_OFFSET => src_offset,
    BFILE_CSID => DBMS_LOB.DEFAULT_CSID,
    LANG_CONTEXT => lang_ctx,
    WARNING => warning );
    DBMS_LOB.CLOSE(in_file);
    COMMIT;
    DBMS_OUTPUT.PUT_LINE('Loaded File using DBMS_LOB.LoadCLOBFromFile.');
    END;
    then the following:
    SQL> set serveroutput on
    SQL> exec Load_CLOB
    SQL> exec load_clob
    BEGIN load_clob; END;
    ERROR at line 1:
    ORA-22285: non-existent directory or file for FILEOPEN operation
    ORA-06512: at "SYS.DBMS_LOB", line 672
    ORA-06512: at "BANINST1.LOAD_CLOB", line 13
    ORA-06512: at line 1
    SQL>

    Wow you've sure got a lot of threads going on this one (Ok Waz zup? and VMS, create directory and the chamber of secrets
    My first question is have you checked to ensure that the file and directory permissions will allow oracle to read the file you want? Have you tried dumping your supernote.js file in the jobsub directory, or chaning it's (and/or the directories) protections?
    From the documentation for create directory: "Oracle Database does not verify that the directory you specify actually exists. Therefore, take care that you specify a valid directory in your operating system. In addition, if your operating system uses case-sensitive path names, be sure you specify the directory in the correct format."

  • Has anyone received this error, "Failed to create directory for PX images"

    I recently migrated to Windows7.  98% of the migration went well. All of my pictures and Elements Catalog came over fine.  I had to "reconnect" all of the pictures in the catalog due to new directory name, but it worked fairly well.  Of the 11,000 entries synch'd with photoshop.com, 10,500 re-synch'd fine. However almost 500 are stuck with an error of "Failed to create directory for PX images".  Can anyone help with how to resolve this issue?  Note, I did try to remove the picture from the album and then re-add, but that didn't work.
    Thank you in advance for any help you can provide.
    Thanks,
    Jeff

    function(){return A.apply(null,[this].concat($A(arguments)))}
    JeffAGoldberg wrote:
    Erased everything on photoshop.com (which I couldn't accomplish due to bugs on photoshop.com) and created a new catalog.
    Jeff
    What problems are you facing in deleting files from PS.com. Are you able to maintain a proper synced catalog now ? If possible please elaborate so that we can help.

  • Error Cannot create directory /tmp/ .xorg.conf72

    During an install of Solaris 10 (as a virtual machine) I was attempting to run /usr/X11/bin/xorgconfig
    I received the following error:
    Cannot create directory /tmp/ .xorg.conf72
    Any Ideas as to how I could fix the problem?

    Hi,
    So, try to create this folder by your hands before create the track and assign all permissions to sap admin user.
    It will solve this issue.
    regards,
    Luciano

  • Fetch error message: Can't create directory

    Hi again--Help!!
    I have my whole site fixed of "errant" characters and ??? and it is ready to upload to a GoDaddy host.. And after turning off "Translate ISO characters" in the Fetch preferences, I now get this message:
    "Server response: Can't create directory: File exists."
    Woe is me, what can be done? Can be so kind as to help me again?? Thanks so much...

    Just a note to say that I figured out the problem myself. It was a "space" in front of the named web pages in the iWeb list. You have to make sure there are no spaces like that or it will not publish properly! Everything is up and running now...Whew.

  • Reg UTL_FILE error

    hi all,
    iam using utl_file in my procedure.while executing the script its showing error as
    ERROR at line 1:
    ORA-29280: invalid directory path
    ORA-06512: at "SYS.UTL_FILE", line 33
    ORA-06512: at "SYS.UTL_FILE", line 436
    ORA-06512: at line 1
    ORA-06512: at "DBUSER.INPUT_AS", line 60
    ORA-06512: at line 1
    but i have created directory as output and granted permission to the user also.
    but still its showing error .can anybody pls help me out...
    thanks in advance,
    Ratheesh

    Have you assigned that value in the parameter file of
    your database. If not this will give you error.
    In your parameter file UTL_FILE_DIRECTORY should be
    set to that directory path or as * .
    I have to keep saying this, but NO IT SHOULD NOT!!!!
    UTL_FILE_DIR parameter is the "old" way of doing things and leaves your operating system open to security issues. You should not use this parameter and more importantly, you should NEVER set that parameter to "*" otherwise someone may gain access to your whole operating system.
    The correct way of using UTL_FILE is to create Directory Objects on the database and grant the relevant permissions to the users who require access.

  • Invalid Directory Path Error

    Hi Guys i am executing the following commands to create a directory and to put a file in the newly created directory, it is givig error of invalid directory path.
    create directory dir_output as 'D:\Ora_Applications\'
    grant read, write on directory dir_output to public
    create or replace procedure Write_to_File
    IS
    f utl_file.file_type;
    begin
    f := utl_file.fopen('dir_output', 'something.txt', 'w');
    utl_file.put_line(f, 'line one: some text');
    utl_file.put_line(f, 'line two: more text');
    utl_file.fclose(f);
    end;
    when i execute the procedure it gives the following error:
    ERROR at line 1:
    ORA-29280: invalid directory path
    ORA-06512: at "SYS.UTL_FILE", line 18
    ORA-06512: at "SYS.UTL_FILE", line 424
    ORA-06512: at "SCOTT.WRITE_TO_FILE", line 5
    ORA-06512: at line 1
    Please help me out of it.
    Regards,
    Imran Baig

    f := utl_file.fopen('dir_output', 'something.txt', 'w');Directory name must be uppercase. Try
    f := utl_file.fopen('DIR_OUTPUT', 'something.txt', 'w');

Maybe you are looking for