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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Forms4.5: Unix command?

Re: Forms4.5: Unix command?

From: John Flack <JOHNF_at_SYNMHS.USA.COM>
Date: Thu, 11 Jan 1996 11:19:58 -0500
Message-Id: <9601111640.AA10373@alice.jcc.com>


> Is there a way to call unix command from forms4.5 running under
> MS windows?. We are running oracle 7.1.4 under sco unix and I
> want to execute unix shell scripts based on forms activity. I spoke
> to oracle support: looks like there is no direct way to host to unix from
> forms45.

No, there is no way to do anything on the server from a client, except through the database. However, there is a work around, that belongs in the Frequently Asked Questions file, since your question is by no means new to this list. I'll give you a summarized version of the work around, but you ought to get Oracle's Technical Bulletin on uses of the DBMS_PIPE built in package for details and sample code.

First, you write a procedure, or better, a package of procedures that takes a command that you want executed on the server, and places it in a named pipe with the DBMS_PIPE.PACK_MESSAGE and DBMS_PIPE.SEND_MESSAGE procedures. Your form would call this stored procedure.

Then you write a small program on the server (Oracle's sample is in Pro*C, but you could probably do it in any of the Pro* languages, or in OCI) that waits for messages in that named pipe. When is sees one, it uses the RECEIVE_MESSAGE, and UNPACK_MESSAGE procedures to get the command, and executes it. In C you would use the "system" function, or if you wanted to get fancier, "fork" a child program. This program runs as a daemon, i.e. is constantly running in the background waiting for work to do.

As I said, there are several sources of information on this, with sample code. Received on Thu Jan 11 1996 - 11:40:29 CST

Original text of this message

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