Re: OS-command from within PL/SQL

From: Jeffery Cann <jcann_at_fairway_NO_SPAM_.com>
Date: 1998/02/19
Message-ID: <34EC5628.FE0E4066_at_fairway_NO_SPAM_.com>#1/1


Robert Marz wrote:
>
> >Is it possible to execute an OS (UNIX)-command from within a stored
> >procedure ?
>
> Oracle 8: yes. There is a new listener (I didn't tried yet)
> Oracle 7: implement it yourself.
>
> Use the dbms_alert Package.
> Write a little program which logs into the DB, registers itself to be
> alerted and falls asleep. Whenever you want to exectute a command on the
> system, signal the session of your program that there is something to do.
> Let your Program spawn a process (system-call in C) and execute the command.
> Depending on what you want to do you can use Queue-Tables and everything you
> want...
>
> For more Information see Application Developers Guide: Signalling Events in
> the Database
>
> HTH
> Bob

In addition, you can see the Oracle 8 Complete Reference. The chapter on dbms_alert has an implementation of the usage of pipe and alert. This will work for Oracle v 7.3.3 and up. If you're running Oracle 7.1.6, tough luck.

Jeff Received on Thu Feb 19 1998 - 00:00:00 CET

Original text of this message