Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Extproc on NT
have you defined the external procedure in tnsname.ora
John Chiu
<sergeysergeyev_at_my-deja.com> wrote in message
news:84a75e$ovb$1_at_nnrp1.deja.com...
> Did anybody try to execute NT command line from PL/SQL via External
> Procedure call?
> I try to do following:
> C module:
> #include <windows.h>
>
> #define NullValue -1
>
> long __declspec(dllexport) exec(char *cmd)
> {
> if (_execlp (cmd, cmd, NULL) == -1) return -1;
> return 1;
> }
>
> PL/SQL module:
> CREATE OR REPLACE LIBRARY OraDos IS 'D:\1\OD\od.dll'
> /
>
> CREATE OR REPLACE FUNCTION F_OSRUN (cmdin IN VARCHAR2) RETURN
> BINARY_INTEGER IS
> EXTERNAL
> NAME "exec"
> LANGUAGE C
> LIBRARY OraDos
> PARAMETERS (cmdin STRING);
> /
>
> When I call this function, I recieve error message:
> ORA-28576: lost RPC connection to external procedure agent
> and function executes command line, or function does nothing and I
> recieve no message.
> What's wrong?
>
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
Received on Tue Dec 28 1999 - 06:11:28 CST
![]() |
![]() |