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

Home -> Community -> Usenet -> c.d.o.tools -> Re: Executing a MS-DOS command using PL-SQL

Re: Executing a MS-DOS command using PL-SQL

From: Bo Erik Pedersen <boep_at_novo.dk>
Date: Mon, 7 May 2001 08:33:26 +0200
Message-ID: <BurJ6.32$%65.2071@news.get2net.dk>

Assuming that the Oracle8i server is running on an NT machine the following should give the desired functionality using external procedures to call WinExec in the NT's kernel32.dll. The server shall be configured to allow external procedures in the the listener configuration.

create or replace library kernel32 is 'C:\WINNT\system32\KERNEL32.DLL'; /

create or replace function system(cmd in varchar2, show in binary_integer default 0)

    return binary_integer
    as external library kernel32
    name "WinExec"
    language C;
/

Bo Pedersen
Novo Nordisk Engineering A/S

"Emre Akbag" <akbag_at_scr.siemens.com> wrote in message news:IMyI6.3813$DW1.179306_at_iad-read.news.verio.net...
> Hi there,
>
> I need to execute a program within one of my stored procedures in Oracle
 8i.
> Do you know a simple way of executing a MS-DOS command in PL-SQL code?
>
> Any kind of help is appreciated!
>
> Emre
>
>
> akbag_at_scr.siemens.com
> Siemens Corporate Research
>
>
Received on Mon May 07 2001 - 01:33:26 CDT

Original text of this message

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