Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA-28595: Extproc agent : Invalid DLL Path

Jibba JabbaJul 26 2013

Hello,

I'm trying to run an external C program and am hitting the "Invalid DLL Path" error.

C code fwiw:

#include <stdlib.h>

#include <stdio.h>

#include <time.h>

/* A test function */

void foo()

{

}

/* A log function */

int log_text(char *arg)

{

    FILE *f;

    char s[40];

    struct tm *ptm_now;

    time_t time_t_now;

    time_t_now = time(NULL);

    ptm_now = localtime(&time_t_now);

    (void)strftime(s, sizeof(s), "%a, %d %b %Y %H:%M:%S %Z", ptm_now);

    f = fopen("/tmp/extproc-logfile.txt", "a");

    fprintf(f, "%s : %s\n", s, arg);

    fclose(f);

    return(99);

}

compilation:

cd /cygdrive/c/USERs/j/My Documents/SQL/c

gcc -c -o test.o test.c

gcc -shared -o test.so test.o

CREATE LIBRARY, PROCEDURE:

conn / as sysdba

grant create library to scott;

conn scott

CREATE OR REPLACE LIBRARY C_LIB AS 'C:\Users\J\Documents\SQL\c\test.so';

CREATE OR REPLACE PROCEDURE c_foo IS

    LANGUAGE C

    LIBRARY C_LIB

    NAME "foo";

SCOTT@ORCL> select * from user_libraries;

LIBRARY_NAME

------------------------------

FILE_SPEC

-----------------------------------------

-----

D STATUS

- -------

C_LIB

C:\Users\J\Documents\SQL\c\test.so

Y VALID

It seems there are two places that you can specify EXTPROC_DLLS: in listener.ora (network\admin) and in extproc.ora (C:\oracleee\product\11.2.0\dbhome_1\hs\admin). I tried

SET EXTPROC_DLLS=C:\\Users\\J\\Documents\\SQL\\c\\test.so

in both (first with single slash then with double slash as seen in an example somewhere on the net) but then just resorted to

ENVS = "EXTPROC_DLLS=ANY" in listener.ora and

SET EXTPROC_DLLS=ANY in extproc.ora

but still no joy.

Can anybody help?

Thanks in advance.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 23 2013
Added on Jul 26 2013
0 comments
670 views