external proc fails on 9.2 windows

  • From: "Jeffrey Beckstrom" <JBECKSTROM@xxxxxxxxx>
  • To: <oracle-l@xxxxxxxxxxxxx>, <ORACLE-L@xxxxxxxxxxxxx>,<oracledba@xxxxxxxxxxx>, <oracle-databases@xxxxxxxxxxxxxxx>,<oracle-rdbms@xxxxxxxxxxxxxxx>
  • Date: Fri, 12 Mar 2004 09:04:31 -0500

This is what we do in 8i and it works:
CREATE OR REPLACE LIBRARY rta.nt_lib IS 'c:\windows\system32\kernel32.dll';
/
create or replace
function rta.run(lpCmdLine IN varchar2, nCmdShow IN binary_integer) return
binary_integer
AS EXTERNAL
NAME "WinExec"
LIBRARY rta.nt_lib
CALLING STANDARD PASCAL;
/
This is script we run....
declare 
ret_bin binary_integer;
cmd varchar2(600);
begin
/* main routine */
cmd :='f:\temp\extproc_test.bat';
ret_bin := rta.run(cmd,0);
end;
/ 
Here is what the "bat" file being invoked contains:
dir >f:\temp\extproc_test.log
 
If do the same on a new server with 9.2 installed I get:
ERROR at line 1:
ORA-28576: lost RPC connection to external procedure agent
ORA-06512: at "RTA.RUN", line 0
ORA-06512: at line 10

The extproc_test.log file is being created so it is running the bat file, just 
get an error though.

Any ideas????
 
Jeffrey Beckstrom
Database Administrator
Greater Cleveland Regional Transit Authority
1240 W. 6th Street
Cleveland, Ohio 44113

Other related posts: