-
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.
-
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
-
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.
-
hey
ask ur dba if its been setup or not?
Srini
-
I am kinda dba and everything here . Please let me know how I should do it. Thanks.
-
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
-
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.
-
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.
-
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.
-
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|