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!

DBMS_LDAP: ORA-31202 Problem to connect to LDAP Server

gkieckJan 20 2006 — edited Jan 20 2006
the following little pl/sql script results the message code ora-31202

set serveroutput on size 1000000

DECLARE
v_username VARCHAR2 (25) := 'cn=orcladmin';
v_password VARCHAR2 (25) := '*******';
i_retval PLS_INTEGER;
-- LDAP Datentypen
my_session DBMS_LDAP.SESSION;
ldap_host VARCHAR2 (100) := 'infravar';
ldap_port VARCHAR2 (3) := '390';
BEGIN
i_retval := -1;
DBMS_OUTPUT.put_line ('start');
DBMS_LDAP.use_exception := TRUE;
my_session := DBMS_LDAP.init (ldap_host, ldap_port);
i_retval := DBMS_LDAP.simple_bind_s (my_session, v_username, v_password);
i_retval := DBMS_LDAP.unbind_s (my_session);
EXCEPTION
WHEN OTHERS
THEN
DBMS_OUTPUT.put_line
('*******************************************************************************************'
);
DBMS_OUTPUT.put_line (' Error code : ' || TO_CHAR (SQLCODE));
DBMS_OUTPUT.put_line (' Error Message : ' || SQLERRM);
DBMS_OUTPUT.put_line (' Exception encountered .. exiting');
DBMS_OUTPUT.put_line
('*******************************************************************************************'
);
END;

Script Output:
*******************************************************************************************
Error code : -31202
Error Message : ORA-31202: DBMS_LDAP: LDAP client/server error: Can't contact LDAP server
Exception encountered .. exiting
*******************************************************************************************

the error occurs at the following line:
i_retval := DBMS_LDAP.simple_bind_s (my_session, v_username, v_password);

the session initiating successed.

the port 390 is valid too. on the oid server is an instance running which listens on port 390. the connection with oracle directory manager makes no problems. the oid processes and instances are running well. i raised the debug level from the oid server but the logs aren“t helpful until yet. i started the scipt from an client and directly on the server, nothing different and the same error appeared.
the oid is bundled with the application server infrastructure version 9.2.0.4. the database (repository iAS) has the version 9i 9.2.0.5.0
where is my mistake? what should i do?

please can anybody help.

many greetings into the oracle wide world :)

gunnar kieck
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 17 2006
Added on Jan 20 2006
1 comment
1,845 views