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: How to execute system command on DBMS server machine?

Re: How to execute system command on DBMS server machine?

From: M Hashim <mhashim_ca_at_passport.ca>
Date: Mon, 05 Mar 2001 00:02:03 -0500
Message-ID: <3AA31DCA.7EBE800F@passport.ca>

Not TRUE....lookup Calling External Procedure

Eg. found on the NET...

  1. Write C code in host.c: int host(char *command) { ... }.
  2. Compile C code to DLL or shared object, eg c:\winnt\system32\host.dll.
  3. "create or replace library host as 'c:\winnt\system32\host.dll';"
  4. "create or replace function host(command in varchar2) return pls_integer is external library host name "host" language c calling standard pascal parameters (host string, return long);"

Let's say I had a PL/SQL block and I wanted to do a "ls -l" to get a directory listing. Is there any way to do that?

In C Language, I can do
{
x = system("ls -l");
}

Setup your listener and Tnsnames files.....etc....

Vadim Grepan wrote:

> Hello!
>
> In general, no.
>
> PJ wrote:
>
> > Is there any way to execute system commands (for example 'copy file')
> > from PL/SQL stored procedures on server machine that hosts Oracle
> > RDMBS 8i ?
> >
> > Thanks in advance
> > PJ
>
> Rgds, Vadim Grepan
> ------------------------
> Moscow, Russia
Received on Sun Mar 04 2001 - 23:02:03 CST

Original text of this message

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