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

Home -> Community -> Usenet -> c.d.o.server -> Re: Run Unix command

Re: Run Unix command

From: Ed Prochak <edprochak_at_gmail.com>
Date: 7 Feb 2006 06:12:12 -0800
Message-ID: <1139321531.940946.317380@f14g2000cwb.googlegroups.com>

Jeremy wrote:
> In article <pan.2006.01.26.13.03.14.28753_at_sbcglobal.net>, Mladen Gogala
> says...
> > On Thu, 26 Jan 2006 04:30:52 -0800, johnleslie wrote:
> >
> > > How can I run a unix command from a oracle 9i stored procedure?
> >
> > Why would you want to do that? There are several ways, one or two
> > were described in Tom Kyte's book (101), there was an external procedure
> > on Metalink, extproc_perl, Oracle 10g has DBMS_SCHEDULER package capable
> > of doing so, but the question still remains: why?
> >
> >
>
> I don't know the OP's needs but am wondering why you should consider it
> to be such an issue "why" he would want to run a unix command from
> inside the database? Perhaps he would like to copy some files or get a
> directory listing. Or maybe something complicated. In either case, I
> gather from your implied tone, that it is not a practice you are in
> favour of?
>
> --
>
> jeremy

Generally because knowing the business purpose, we can suggest a standard solution, rather than a custom solution. This might save the OP time in development and maintenance. Sometimes as we work on development we get a solution in our mind that likely will work, but which is basically a brute force solution. Asking here how to implement the brute force solution only gets so far.

There can be other reasons for being concerned about running a shell command. Security is a big one.

In summary, we try to show folks how to fish, rather than just feeding them a line. Knowing the WHY helps us do that.

 Ed Received on Tue Feb 07 2006 - 08:12:12 CST

Original text of this message

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