Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Create/Delete File from Stored Proc

Re: Create/Delete File from Stored Proc

From: --B <akshard_at_vsnl.com>
Date: Mon, 2 Dec 2002 11:25:33 +0530
Message-ID: <VJCG9.762$Vf3.8916@vixen.cso.uiuc.edu>


Can we run command line from Stored Proc?

"Tim Cross" <tcross_at_pobox.une.edu.au> wrote in message news:877ket55yt.fsf_at_blind-bat.une.edu.au...
> "--B" <akshard_at_vsnl.com> writes:
>
> > Do we "create/delete file" commands,in oracle, which we can call inside
> > stored proc?
> >
>
> You can create files with the UTL_FILE package. However, this package
> only lets you create or truncate a file, you cannot delete a file with
> this package.
>
> However, it is not very difficult to write a Java stored procedure
> which utilizes the Java io classes to delete a file, move a file, list
> a directory etc. Once you have done this, you can call your java
> stored procedures just like any other procedure (i.e. from within
> PL/SQL).
>
> Of course, you need an oracle version which supports java stored
> procedures for this to work.
>
> Tim
Received on Sun Dec 01 2002 - 23:55:33 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US