Re: How to call a .exe in pl/sql?

From: Rauf Sarwar <rsarwar_at_ifsna.com>
Date: 20 Jun 2002 19:58:50 -0700
Message-ID: <c2d690f2.0206201858.18f238ec_at_posting.google.com>


megatim_at_techie.com (Tim) wrote in message news:<91b8895f.0206190415.4522459a_at_posting.google.com>...
> Is it possible to execute a binary Windows file (.exe, .cmd, .bat)
> from a PL/SQL or SQL script or even SQL-plus? I am using Oracle 9i on
> Windows 2000.
>
> Thanks,
> Tim

  1. From PLSql, you would need to use either java or external procedure call.
  2. From a script, you can with host command e.g. Your script is,

select sysdate from dual;
-- Launch notepad
host notepad.exe
select 'abc' from dual;
exit

Only caveat with this is that SQL*Plus will wait until notepad is closed before proceeding with the next command.

3) From SQL*Plus, use host command.

HTH Received on Fri Jun 21 2002 - 04:58:50 CEST

Original text of this message