Re: ??? Executing a Unix command from PL/SQL

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: 1998/05/12
Message-ID: <35594ee4.1410508_at_192.86.155.100>#1/1


A copy of this was sent to "Rob Edgar" <robedgar_at_mersey.com.hk> (if that email address didn't require changing) On Tue, 12 May 1998 20:15:03 +0800, you wrote:

>By any chance can you do the same thing under 7.34/NT?
>

Not external procedures, however, if you have 7.3.3 and up on NT *and* you have a webserver on that NT box you can write a cgi-bin application that gets called from PL/SQL.

7.3.3 added the package UTL_HTTP to the database. UTL_HTTP allows you to pass a URL in and it will return the page generated by that URL. So, if you want to run a program, write a small cgi-bin wrapper around it -- makeing it callable form the web -- and then pl/sql can start it. You can secure this somewhat by setting up a 'special' webserver that runs on 127.0.0.1 (localhost) so it can only accept connections from the local box itself (someone must be on the NT server in order to run the program and if they are on the machine they could just open a dos prompt and run the program anyway in most cases)

>Rob
>Thomas Kyte wrote in message <355a2ddd.9235339_at_192.86.155.100>...
 [snip]
>>>
>>>Is it possible to execute a Unix command DIRECTLY from an Oracle8 stored
>>>procedure? I've looked through the mans, and the closest I get is an
>>>example of DBMS_PIPE use, where the stored procedure uses DBMS_PIPE to
>call
 [snip]
>>
>>See chapter 10 in the PL/SQL manual. Its about External Procedures which
 let
>>you call C from PL/SQL directly. Basically, you'll create a .dll on NT or
 .so
>>on Unix and then you'll be able to call the functions/procedures in that
 after
>>you map them to pl/sql.
>>
 

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Herndon VA  

http://govt.us.oracle.com/ -- downloadable utilities  



Opinions are mine and do not necessarily reflect those of Oracle Corporation  

Anti-Anti Spam Msg: if you want an answer emailed to you, you have to make it easy to get email to you. Any bounced email will be treated the same way i treat SPAM-- I delete it. Received on Tue May 12 1998 - 00:00:00 CEST

Original text of this message