Hi Tom,
i'm trying to call my first external procedure based C language into my plsql program.
so i set up this configuration :
listener.ora:
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = C:\app\Administrateur\product\11.2.0\dbhome_1)
(PROGRAM = extproc)
(ENVS="EXTPROC_DLLS=C:\app\Administrateur\product\11.2.0\dbhome_1\BIN\external-db-func.dll")
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = OMAR-PC.TELETIC.DZ)(PORT = 1524))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
)
)
ADR_BASE_LISTENER = C:\app\Administrateur
tnsnames:
DBORACLE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = OMAR-PC.TELETIC.DZ)(PORT = 1524))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = dboracle)
)
)
EXTPROC_CONNECTION =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC)) )
(CONNECT_DATA = (SID = PLSExtProc) (PRESENTATION = RO))
)
LISTENER_DBORACLE =
(ADDRESS = (PROTOCOL = TCP)(HOST = OMAR-PC.TELETIC.DZ)(PORT = 1524))
and then excuted this :
create or replace library math_lib AS 'C:\app\Administrateur\product\11.2.0\dbhome_1\BIN\external-db-func.dll';
/
create or replace function add_number(a1 number,a2 in number) RETURN number
AS EXTERNAL LIBRARY math_lib NAME "add" LANGUAGE C;
/
DECLARE
begin
DBMS_OUTPUT.PUT(', '||add_number(1,2));
end;
/
but i got an error :
Rapport d'erreur -
ORA-06520: PL/SQL : Erreur pendant le chargement de la bibliothèque externe
ORA-06522: Unable to load DLL
ORA-06512: à "DT_VOUCHER_USER.ADD_NUMBER", ligne 1
ORA-06512: à ligne 5
06520. 00000 - "PL/SQL: Error loading external library"
*Cause: An error was detected by PL/SQL trying to load the external
library dynamically.
*Action: Check the stacked error (if any) for more details.
please help me i'm clueless.