DBMS_LDAP Code Fails With Error: Ora-31204: Dbms_ldap: Pl/Sql - Invalid Ldap Session / "my_session := DBMS_LDAP.init(ldap_host,ldap_port);" Does Not Return Anything for my_session
Last updated on MAY 22, 2017
Applies to:Oracle Internet Directory - Version 10.1.2 and later
Information in this document applies to any platform.
A working pl/sql code run as a non-dba user on one Database (DB) to Oracle Internet Directory (OID) returns error:
ERROR at line 1:
ORA-31204: DBMS_LDAP: PL/SQL - Invalid LDAP Session.
ORA-06512: at "SYS.DBMS_SYS_ERROR", line 79
ORA-06512: at "SYS.DBMS_LDAP", line 135
ORA-06512: at line 34
This is the first time the code is run on this one DB.
Running the same code on another DB works fine.
Also, after granting the user the dba role, the same code is successful.
The code "my_session := DBMS_LDAP.init(ldap_host,ldap_port);" does not return anything for my_session.
The same code works fine for one database, but not for another.
Sign In with your My Oracle Support account
Don't have a My Oracle Support account? Click to get started
My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms