How
to call *.exe program in stored procedure?
Is it possible to call a .exe
program within Oracle PL/SQL? The .exe
program is in VB or C program.
And how to communicate with the .exe
program with the parameters
(both IN/OUT)?
Ans1:
No, Oracle cannot call EXE
executables, it can call routines written in C
(not C++ - name mangling!!!!)
from a DLL. Oracle can call EXE files - on
OpenVMS, though.
Ans2:
As far as i know, this is
wrong: using the built-in host() you may call
any program. The communication
is not directly supported, but should be
at least possible somehow
using files.
Ans3:
The 'host' function is implemented
in sqlplus, not in PL/SQL. You cannot
write something like:
create or replace procedure(mydrive
in varchar2) as
begin
host('format '||'mydrive');
end;
because PL/SQL will give you
an error, saying that procedure HOST should
be declared. The only way
to do that is to write it in C and link to
oracle via external prodedures
interface.
Mladen Gogala