Hi
I have created a procedure using UTL_FILE.
Before executing the procedure i created a directory as -
-
connect system/system;
-
grant execute on sys.utl_file to PUBLIC;
-
alter system set processes=500 scope=spfile;
-
grant read, write on directory gams to public;
-
connect san/san;
-
create or replace directory gams as 'C:\gamsdir';
-
-
CREATE OR REPLACE PROCEDURE Empl
-
IS
-
f utl_file.file_type;
-
begin
-
f := utl_file.fopen('GAMS', 'test.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;
-
/
-
-
--It gives the errors as
-
-
/*ERROR at line 1:
-
ORA-29283: invalid file operation
-
ORA-06512: at "SYS.UTL_FILE", line 475
-
ORA-29283: invalid file operation
-
ORA-06512: at "SAN.EMPL", line 5
-
ORA-06512: at line 1*/
-
-
How can i create the directory?
How can i create the utl_file_dir and how can i set that directory in init.ora?
what can i do?
Any Help???
Thank you
9 8489
Run this query: -
-
SELECT value FROM v$parameter WHERE name = 'utl_file_dir';
-
-
The output you get from the above query will be the directories that you can use for utl file operation.
If you want to add any otehr directories to the above list, then you need to modify init.ora file and restart the server.
try the following sample to create directory and grant read ,write previliges on the same to the user.
create or replace directory dir1 as 'c:\folder1' ;
Run this query: -
-
SELECT value FROM v$parameter WHERE name = 'utl_file_dir';
-
-
The output you get from the above query will be the directories that you can use for utl file operation.
If you want to add any otehr directories to the above list, then you need to modify init.ora file and restart the server.
SQL> SELECT VALUE FROM v$parameter WHERE name = 'utl_file_dir';
VALUE
--------------------------------------------------------------------------------
But it is not displaying anything?
Please Help me?
What to do?
Thank u.
SQL> SELECT VALUE FROM v$parameter WHERE name = 'utl_file_dir';
VALUE
--------------------------------------------------------------------------------
But it is not displaying anything?
Please Help me?
What to do?
Thank u.
If you see below from my instance: -
-
SQL> SELECT VALUE FROM v$parameter WHERE name = 'utl_file_dir'
-
2 /
-
-
VALUE
-
--------------------------------------------------------------------------------
-
/usr/tmp, /usr/tmp, /u01/oracle/visdb/9.2.0/appsutil/outbound/VIS_oraappsdev, /u
-
sr/tmp
-
-
-
SQL>
-
-
the above list of directories are used for utl file operation.
to add any new values, you need to modify the init.ora file and bounce the server.....
If you see below from my instance: -
-
SQL> SELECT VALUE FROM v$parameter WHERE name = 'utl_file_dir'
-
2 /
-
-
VALUE
-
--------------------------------------------------------------------------------
-
/usr/tmp, /usr/tmp, /u01/oracle/visdb/9.2.0/appsutil/outbound/VIS_oraappsdev, /u
-
sr/tmp
-
-
-
SQL>
-
-
the above list of directories are used for utl file operation.
to add any new values, you need to modify the init.ora file and bounce the server.....
How can i modify the init.ora file and bounce the server?
Please tell me in detail.
Thank u
How can i modify the init.ora file and bounce the server?
Please tell me in detail.
Thank u
The init.ora file is placed in the path "$ORACLE_HOME/dbs" of the databas eserver.
Modify this file and shutdown/restart your database server
This can be done by your DBA team.Ask your DBA team to do this.
The init.ora file is placed in the path "$ORACLE_HOME/dbs" of the databas eserver.
Modify this file and shutdown/restart your database server
This can be done by your DBA team.Ask your DBA team to do this.
I really confused with this.
If you dont mind can you explain in step wise , what can i do to use UTL_FILE?
Please help me.
Thank ypu
I really confused with this.
If you dont mind can you explain in step wise , what can i do to use UTL_FILE?
Please help me.
Thank ypu
Check here if it helps!! and here
I really confused with this.
If you dont mind can you explain in step wise , what can i do to use UTL_FILE?
Please help me.
Thank ypu
Check here if it helps!! and here Sign in to post your reply or Sign up for a free account.
Similar topics
by: Bruce Davis |
last post by:
I'm having a problem on windows (both 2000 and XP) with a multi-threaded
tkinter gui application. The problem appears to be a deadlock condition...
|
by: Kostatus |
last post by:
I have a virtual function in a base class, which is then overwritten by a
function of the same name in a publically derived class. When I call the...
|
by: Refky Wahib |
last post by:
Hi
I need Technical Support
I finished a Great project using .Net and SQL Server and .Net Mobile
Control
My Business case is to implement...
|
by: Sudesh Sawant |
last post by:
Hello,
We have an application which communicates using remoting. There is a server
which is a Windows Service. The server exposes an object which...
|
by: Peter Olcott |
last post by:
www.halting-problem.com
|
by: Jon Slaughter |
last post by:
I'm having a little trouble understanding what the slicing problem is.
In B.S.'s C++ PL3rdEd he says
"Becayse the Employee copy functions do...
|
by: Jon Davis |
last post by:
If I have a class with a virtual method, and a child class that overrides
the virtual method, and then I create an instance of the child class AS A...
|
by: Ammar |
last post by:
Dear All,
I'm facing a small problem.
I have a portal web site, that contains articles, for each article, the end
user can send a comment about...
|
by: Dany |
last post by:
Our web service was working fine until we installed .net Framework 1.1 service pack 1. Uninstalling SP1 is not an option because our largest customer...
|
by: Mike Collins |
last post by:
I cannot get the correct drop down list value from a drop down I have on my
web form. I get the initial value that was loaded in the list.
It was...
|
by: better678 |
last post by:
Question:
Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct?
Answer:
Java is an object-oriented...
|
by: teenabhardwaj |
last post by:
How would one discover a valid source for learning news, comfort, and help for engineering designs? Covering through piles of books takes a lot of...
|
by: Kemmylinns12 |
last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
|
by: CD Tom |
last post by:
This happens in runtime 2013 and 2016. When a report is run and then closed a toolbar shows up and the only way to get it to go away is to right...
|
by: antdb |
last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine
In the overall architecture, a new "hyper-convergence" concept was...
|
by: Matthew3360 |
last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function.
Here is my code.
...
|
by: Matthew3360 |
last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
|
by: AndyPSV |
last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
|
by: WisdomUfot |
last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...
| |