Home » SQL & PL/SQL » SQL & PL/SQL » DBMS LDAP package (Oracle DB 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production, Sun Solaris)
DBMS LDAP package [message #687837] Mon, 26 June 2023 15:33 Go to next message
vinayrajn
Messages: 4
Registered: September 2008
Junior Member
Hi,
I am using the DBMS_LDAP package to perform LDAP Search actions. When i execute the code in an anonymous block, it works fine. But when i create a procedure, it errors out.

Anonymous block:

DBMS_LDAP.USE_EXCEPTION := TRUE;

l_session := DBMS_LDAP.init(hostname => l_ldap_host,portnum  => l_ldap_port);                                

l_retval := DBMS_LDAP.simple_bind_s(ld => l_session, dn => l_ldap_user, passwd => l_ldap_passwd);

 l_attrs(1) := 'cn, employeeNumber';                                      

 l_retval := DBMS_LDAP.search_s(ld       => l_session,
                                base     => l_ldap_base,
                                scope    => dbms_ldap.scope_subtree,
                                filter   => 'employeeNumber=XXXXXXX',
                                attrs    => l_attrs,
                                attronly => 0,
                                res      => l_message);

All the variables have been defined properly.

The same code in a procedure errors out like below:
ORA-24247: network access denied by access control list (ACL)

Could anyone guide me here please. Thanks.
Re: DBMS LDAP package [message #687838 is a reply to message #687837] Mon, 26 June 2023 15:57 Go to previous messageGo to next message
Michel Cadot
Messages: 68647
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

ORA-24247: network access denied by access control list (ACL)
 *Cause:    No access control list (ACL) has been assigned to the target
            host or the privilege necessary to access the target host has not
            been granted to the user in the access control list.
 *Action:   Ensure that an access control list (ACL) has been assigned to
            the target host and the privilege necessary to access the target
            host has been granted to the user.
Remember that privileges acquired via a role are not enabled in a procedure unless you create it with option "AUTHID CURRENT_USER".

[Edit: English]

[Updated on: Tue, 27 June 2023 01:31]

Report message to a moderator

Re: DBMS LDAP package [message #687839 is a reply to message #687838] Mon, 26 June 2023 16:13 Go to previous message
vinayrajn
Messages: 4
Registered: September 2008
Junior Member
Wonderful. Appreciate you response. That worked !!!!

[Updated on: Mon, 26 June 2023 16:13]

Report message to a moderator

Previous Topic: How create such attached table by travelling view and its dependent objects
Next Topic: DDL generation
Goto Forum:
  


Current Time: Sat Apr 27 13:11:54 CDT 2024