Re: OS Command from PL/SQL

From: Joel R. Kallman <jkallman_at_us.oracle.com>
Date: 1996/12/27
Message-ID: <32c1d1e9.3822085_at_newshost.us.oracle.com>#1/1


Or, as an alternative, you can navigate to the Oracle Government Web site http://govt.us.oracle.com, navigate to the section "Downloadable Utilities", and download for free the code and documentation for PLEX, or PL/SQL EXtender. From this, you can make any operating system call from a PL/SQL procedure. Pretty cool stuff, but keep in mind that this is free stuff, so no warranties are implied.

On 24 Dec 1996 17:25:53 GMT, "Gert Rijs" <gem_at_wirehub.nl> wrote:

>Hi,
>From a sql*plus script or forms it is simple (using the host command),
>perhaps using a remote-shell (rsh) to run it on another machine.
>
>If you can live with a delay:
>- Insert the sql*load command in a table (say HOST_COMMANDS).
>- Schedule a sql*plus script to run every hour (or minute) using cron
>(unix).
> s*p: set heading off <- no headers
>printed please
> set pagesize 0
> spool cmds.sh <- output goes
>to this file
> select command from host_commands; <- select the Sql*Load
>command
> spool off <- stop
>'ecording'
> delete from host_commands; <- cleanup
> commit;
> !cmds.sh <- run the
>sql*load command
> exit
>
>Another way to do it is using the dbms_pipe package to 'send' the sql*load
>command to a daemon program that listens to the dbms_pipe. I believe there
>is a sample daemon program in one of the Pro*C or oci manuals (check them).
>
>Hope this helps,
> Gert
>
>--
>At Home: gem_at_wirehub.nl
>At Work: gert.rijs_at_corp.ah.nl
>
>Jeremy Wong <jewong_at_po.pacific.net.sg> wrote in article
><01bbf17c$1c6461c0$5a5478cb_at_jewong>...
>> Has anyone found a way to issue an OS command from PL/SQL? I'm trying to
>> run SQL*LOADER from a procedure. I'm using Oracle 7.2 and the operating
>> system is Windows NT3.51.
>>
>> Thanks,
>> Jeremy
>>

Joel

Joel R. Kallman            See Oracle technology in action!
Oracle Government          http://govt.us.oracle.com
Bethesda, MD
jkallman_at_us.oracle.com

The statements and opinions expressed here are my own and do not necessarily represent those of Oracle Corporation. Received on Fri Dec 27 1996 - 00:00:00 CET

Original text of this message