Home » RDBMS Server » Server Administration » Urgent : ORA-01041: hostdef extension doesn't exist
Urgent : ORA-01041: hostdef extension doesn't exist [message #370546] Fri, 17 December 1999 08:22
Siby Thomas
Messages: 2
Registered: December 1999
Junior Member
I am trying to call an External Function but Oracle says ORA-01041: internal error. hostdef extension doesn't exist .

How do I do it??

I have done all this (see example below)

/* In the MyFunc.dll (Borland C++ Builder) File Code the Following: */
#include
#include
#include
#include

extern "C" __declspec(dllexport) int TestFunc(int);
int TestFunc(int arg1)
{
return arg1*2;
}

/* In the tnsnames.ora File, added the Following Entry: */

extproc_connection_data =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
(CONNECT_DATA = (SID = ORCL))
)
/* In the listener.ora File, added the Following Entries: */
EXTERNAL_PROCEDURE_LISTENER =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL=ipc)
(KEY= EXTPROC0)
)
)
SID_LIST_EXTERNAL_PROCEDURE_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = ORCL)
(ORACLE_HOME=/orant)
(PROGRAM=extproc)
)
)


CREATE OR REPLACE LIBRARY MyLib AS '/orant/mydir/MyFunc.dll';

CREATE OR REPLACE FUNCTION F_MyFunc (Arg1 IN BINARY_INTEGER)
RETURN BINARY_INTEGER AS
EXTERNAL LIBRARY MyLib
NAME "TestFunc"
LANGUAGE C
CALLING STANDARD C
PARAMETERS (Arg1 int, RETURN);
/
Function created.

VARIABLE MyVar NUMBER;
BEGIN
:MyVar := F_MyFunc (7);
END;
/

ERROR at line 1:
ORA-01041: internal error. hostdef extension doesn't exist

Did I miss something in the configuration?

Has anybody faced the similar problems and if yes, how were you able to overcome ?

(Note: Please email your response to sibichen@usa.net)
Previous Topic: Hierarchy in sql
Next Topic: About create schema
Goto Forum:
  


Current Time: Wed Oct 28 07:21:38 CDT 2020