Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Running Shell Script From Stored Proc

0 views
Skip to first unread message

yit...@statcan.ca

unread,
May 11, 1999, 3:00:00 AM5/11/99
to
Hi,

What is the best way run a shell script from a stored procedure? In
general, what is the best way to run any operating system command and
get a return value?

My environment is Oracle 8 on a Unix box.

Thanks,
Salaam Yitbarek


--== Sent via Deja.com http://www.deja.com/ ==--
---Share what you know. Learn what you don't.---

Mark Gumbs

unread,
May 12, 1999, 3:00:00 AM5/12/99
to
When i used forms 4.0, the only way i could see of solving the problem was
to save the output of the shell script to file and use utl_file from forms
to read the value into a forms variable.

There may be another way which i am not aware of though.

Mark


yit...@statcan.ca wrote in message <7ha43v$jbh$1...@nnrp1.deja.com>...

rtpro...@my-dejanews.com

unread,
May 12, 1999, 3:00:00 AM5/12/99
to
We were running Oracle 7.3.4 on Sequent Unix. We wanted a stored procedure to
perform a transaction with access to a mainframe (Unisys Mapper). We
experimented with the back end launching a shell script. It can return
simple answers but is not designed for high volume, multi-user access.

Another similar way is to run daemons in crontab that watch for flag files.
Oracle backend writes the flag file, which causes the daemon to launch the
process...

Robert Proffitt

Jerry Gitomer

unread,
May 12, 1999, 3:00:00 AM5/12/99
to
Hi,

Check out PL/SQL external procedures. From what I recall any operating
system command can be invoked as an external procedure. Thus the command:

sqlplus <user>/<password> @<scriptname>

will work.

regards

Jerry Gitomer
-----------------------------------------------

yit...@statcan.ca wrote in message <7ha43v$jbh$1...@nnrp1.deja.com>...
>Hi,
>
>What is the best way run a shell script from a stored procedure? In
>general, what is the best way to run any operating system command and
>get a return value?
>
>My environment is Oracle 8 on a Unix box.
>
>Thanks,
>Salaam Yitbarek
>
>

Dyrson Rodrigues Alves Junior

unread,
May 13, 1999, 3:00:00 AM5/13/99
to yit...@statcan.ca
On the address
http://technet.oracle.com/doc/server.804/a58236/10_procs.htm
you can find how to call a external program (written in C for example).
You can call your script from this program. You have to subscribe first
at http://technet.oracle.com/ in order to access it.

yit...@statcan.ca wrote:
>
> Hi,
>
> What is the best way run a shell script from a stored procedure? In
> general, what is the best way to run any operating system command and
> get a return value?
>
> My environment is Oracle 8 on a Unix box.
>
> Thanks,
> Salaam Yitbarek
>
> --== Sent via Deja.com http://www.deja.com/ ==--
> ---Share what you know. Learn what you don't.---


--
+-------------------------------+----------------------------------+
| Dyrson Rodrigues Alves Junior | Casa de Software |
| Analista de Sistemas | Oracle Approved Education Center |
| mailto:dyr...@casasoft.com.br | http://www.casasoft.com.br |
+-------------------------------+----------------------------------+


0 new messages