Home » SQL & PL/SQL » SQL & PL/SQL » creation of a folder and loading data by using procedure (Oracle9i/10g)
creation of a folder and loading data by using procedure [message #309722] Fri, 28 March 2008 10:15 Go to next message
vamsikgummadi
Messages: 62
Registered: April 2006
Location: United States, MI
Member
Hi all,
I am trying to help out one of my friend in doing his project. Now we are stuck up with a problem and the problem is:

Is there a possibility of creating a stored procedure that when executed creates a folder and a text file in that folder and dumps data from a table in the database into this particular text file created? If yes then can any one of you can give the steps to be followed or sample snippets so that we can work on it.

The above problem can be handeled with JAVA programming but I being a PL/SQL developer am interested to do this using a stored procedure.

Hope you all got the problem and reply to me at the earliest.

Thanking you in anticipation,
Vamsi K Gummadi.
Re: creation of a folder and loading data by using procedure [message #309728 is a reply to message #309722] Fri, 28 March 2008 10:55 Go to previous messageGo to next message
ThomasG
Messages: 3189
Registered: April 2005
Location: Heilbronn, Germany
Senior Member
You can write files on the server with the UTL_FILE package.

http://www.adp-gmbh.ch/ora/plsql/utl_file.html

There is no built-in PL/SQL way to create a filesystem folder, though.

That could be done either with a JAVA stored procedure or with a DMBS_SCHEDULER job, when you are on 10.X or higher.
Re: creation of a folder and loading data by using procedure [message #309779 is a reply to message #309728] Fri, 28 March 2008 14:43 Go to previous messageGo to next message
vamsikgummadi
Messages: 62
Registered: April 2006
Location: United States, MI
Member
Hi Thomas,
Thank you for the prompt reply. I will study the option which you have mailed me and will get back if further clarifications are needed. You also informed that DBMS_SCHEDULER can be used for this purpose. Can you let me know the code snippets if you have any with you or atlest how to work around this problem using DBMS_SCHEDULER. It will be vey kind of you if you can help me in sorting out this problem. Even if I fail to exactly acheive what I need this may be a kind of problem which I can make use of in some other project some time later.
Regards,
Vamsi K Gummadi.
Re: creation of a folder and loading data by using procedure [message #309785 is a reply to message #309722] Fri, 28 March 2008 15:28 Go to previous message
BlackSwan
Messages: 25036
Registered: January 2009
Location: SoCal
Senior Member
http://asktom.oracle.com contains many fine coding examples
Previous Topic: bulk data loading in oracle 9i
Next Topic: servererror trigger, can it hurt me?
Goto Forum:
  


Current Time: Sun Dec 04 20:33:58 CST 2016

Total time taken to generate the page: 0.06675 seconds