Error when call dll from oracle


Posted on 16th Feb 2014 07:03 pm by admin

Hi all, please help me!

I have dll write C language, I want call it from oracle procedure but it throws the error: "ORA-28546: connection initialization failed, probable Net8 admin", this is the following code and configure tnsnames.ora and listener.ora files :

--Begin configure tnsnames.ora and listener.ora ---

# tnsnames.ora Network Configuration File: D:oracleproduct10.1.0Db_1NETWORKADMINtnsnames.ora
# Generated by Oracle configuration tools.

DEMO =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.1.62)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = SHARED)
(SERVICE_NAME = demo)
)
)

EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(Key = abcd))
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = WLdev)
)
)

WLDEV =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.1.62)(PORT = 1521))
)
(CONNECT_DATA =
(SERVER = SHARED)
(SERVICE_NAME = WLdev)
)
)
# listener.ora Network Configuration File: D:oracleproduct10.1.0Db_1NETWORKADMINlistener.ora

SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = WLdev)
(ORACLE_HOME = D:oracleproduct10.1.0Db_1)
(PROGRAM = extproc)
)
)

LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = abcd))
)
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = 172.16.1.62)(PORT = 1521))
)
)

--end configure tnsnames.ora and listener.ora ---

--- Begin code function procedure---

Step 1:
CREATE OR REPLACE LIBRARY OTAC_LIBRARY AS 'D:oracleproduct10.1.0Db_1binOTACEngine.dll';

Step 2:
CREATE OR REPLACE TYPE arrayString IS TABLE OF varchar2(256) INDEX BY BINARY_INTEGER --type array string

Step3:
CREATE OR REPLACE
PACKAGE OTAC_PACKAGE IS
FUNCTION OTAC_FUNCTION(param IN arrayString) RETURN INT;
END OTAC_PACKAGE;

Setp4: - add package body
CREATE OR REPLACE
PACKAGE BODY OTAC_PACKAGE AS
FUNCTION OTAC_FUNCTION(param IN arrayString) RETURN INT IS
EXTERNAL LIBRARY OTAC_LIBRARY
NAME "GenerateOTAC" // function call from dll
LANGUAGE C
PARAMETERS (param) ; //param is parameters in function GenerateOTAC
END OTAC_PACKAGE;

Step5:
CREATE OR REPLACE
PROCEDURE TEST_CALL_DLL AS
results VARCHAR2(256);
l_data arrayString := arrayString('84913119743','35-4735-00-300571-0','123456','189452367');
BEGIN
results := OTAC_PACKAGE.OTAC_FUNCTION(l_data);
DBMS_OUTPUT.PUT_LINE(results);
EXCEPTION
when others then
DBMS_OUTPUT.PUT_LINE(sqlerrm|| ' I am in exception');
END TEST_CALL_DLL;

--- End code function procedure-----

I have check the service name and sid is : " WLdev" correct.

I'm not found the root cause of the errors, please help me.
Thanks.

No comments posted yet

Your Answer:

Login to answer
67 Like 6 Dislike
Previous forums Next forums
Other forums

Getting number of affected rows in SQLPLUS..
Hi everyone,
I have a shell script where i am invoking sqlplus, running a query and saving t

values not being entered into table
hi. I;ve created a form, so that when a user enters data into it, it gets added to a table in a data

I face problems to extract data from one table and insert it in another one
Hi,

For modifications, I have to extract data from one table and insert it in another one

SAP Project Module
I have seen in the SAP Project Module,plan cost and budget are not equal and even difference is sign

Suggestions for Functional module
Hello experts,
I Have done B.Sc(Mathematics) and MCA & have learnt SAP/ABAP but do n

Port scanner problem
Hai
recently i developed one app through which u can check the opened and closed ports under an

mysql UPDATE request not working and driving me crazy!!!
Hi,

I have been stuck on this for ages.

Quite simply I am trying to update my database

PHP Redirecting
Hello everyone. Is there a way to redirect people to pages within a statement in PHP? Since there is

File upload issues
Hi Guys,

Can anyone see any issues with this code:
Code: [Select]$setImage= 'productimages

At max how many columns is advisable to create in a table/view
Hi All,
I have two transaction table from which i want to create a simple view or material

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash