DBAsupport.com Forums - Powered by vBulletin
Page 1 of 3 123 LastLast
Results 1 to 10 of 23

Thread: A Java procedure Question!!!

  1. #1
    Join Date
    Jun 2004
    Posts
    125

    A Java procedure Question!!!

    Hi all,

    My friends at work have written a Java stored procedure and loaded the class file to user_objects. The procedure is supposed to write to a file. When they run the procedure from SQL Plus it gives them an error something like this, able to write to a physcial driver only. What we don't understand is, why it would not write to a mapped drive when the oracle database is on the same drive. We are using oracle 8i. If you guys can suggest something, that would really help me. Thanks.

  2. #2
    Join Date
    Jan 2003
    Location
    Hull, UK
    Posts
    220
    Hi,

    Whats ur UTL_FILE path. does it point to the mapped drive.

    give this sql stmt in ur sqlplus and see where ur utl_file_dir points to.

    Select value from v$parameter where name like 'utl_file_dir'

    Srini

  3. #3
    Join Date
    Jun 2004
    Posts
    125
    I don't get any value when I run the select statement that wrote.


    select * from v$parameter where name like 'utl_file_dir';

    Code:
           NUM NAME                       TYPE VALUE                     ISDEFAULT ISSES ISSYS_MOD ISMODIFIED ISADJ DESCRIPTION
    ---------- -------------------- ---------- ------------------------- --------- ----- --------- ---------- ----- --------------------------------------------------
           440 utl_file_dir                  2                           TRUE      FALSE FALSE     FALSE      FALSE utl_file accessible directories list
    Last edited by see_one; 02-01-2005 at 11:53 AM.

  4. #4
    Join Date
    Jan 2003
    Location
    Hull, UK
    Posts
    220
    hey

    ask ur dba if its been setup or not?

    Srini

  5. #5
    Join Date
    Jun 2004
    Posts
    125
    I am kinda dba and everything here . Please let me know how I should do it. Thanks.

  6. #6
    Join Date
    Jan 2003
    Location
    Hull, UK
    Posts
    220
    The UTL_FILE_DIR parameter specifies one or more directories in which you can read/write files with the UTL_FILE package. You can list multiple directories in one statement, separated by a semi-colon, as in:

    UTL_FILE_DIR=/tmp;/tmp/accounts;/apps/oracle/ar

    so u specify ur mapped drive directory path in the above stmt.

    S

  7. #7
    Join Date
    Nov 2000
    Location
    Pittsburgh, PA
    Posts
    4,166
    I suggest that you use the create directory command. You can do this without restarting your database and you have better control over who can access that directory.

  8. #8
    Join Date
    Jun 2004
    Posts
    125
    Is there a certain spot where I have to define that parameter in the init.ora file? I checked the init.ora file and it does not have any utl_file_dir parameter. Thanks for all your help.

  9. #9
    Join Date
    Jun 2004
    Posts
    125
    Would the be right if create a directory with the syntax below.

    SYNTAX:
    CREATE [OR REPLACE] DIRECTORY directory AS 'path_name';

    My Example:

    CREATE DIRECTORY test_directory AS 'F:\test;

    Thanks.

  10. #10
    Join Date
    Nov 2000
    Location
    Pittsburgh, PA
    Posts
    4,166
    Originally posted by see_one
    Is there a certain spot where I have to define that parameter in the init.ora file? I checked the init.ora file and it does not have any utl_file_dir parameter. Thanks for all your help.
    If the parameter is not in you init file then you need to add it. You can put it anywhere. Or instead of that you can create directories. Either way will work. But if you add it to the init file, then you need to restart you database for it to work.

Posting Permissions

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


Click Here to Expand Forum to Full Width