This one's had both me and our dba scratching our heads.
We have an Oracle 126.96.36.199.0 instance, DEV, with a user who can successfully connect to our ldap server, e.g.:
DECLARE l_session DBMS_LDAP.session; BEGIN l_session := DBMS_LDAP.init('ldap.host.bla.bla',389); END; / PL/SQL procedure successfully completed
We have another Oracle instance, 188.8.131.52.0 called UAT, with the same user, same set up, but when they run the above code, it raises an exception from DBMS_LDAP:
ORA-24247: network access denied by access control list (ACL)
In both instances, if I run the following queries, no rows are returned:
select * from dba_network_acls; select * from dba_network_acl_privileges;
To fix this problem in UAT, we've created a suitable network ACL using
DBMS_NETWORK_ACL_ADMIN.create_acl. Now, UAT works fine.
What's bothering us is that this worked fine in DEV all along, with apparently no network ACLs created. Our only theory is a bug in the version in DEV (184.108.40.206.0) but I hesitate to just leap on that as a conclusion.
We will soon be upgrading DEV to 11.2 to be consistent with the other environments, but before then, is there anything else I can check to see what difference there is between the two environments that might cause this behaviour?
(Background for those unfamiliar with ACLs: http://www.oracle-base.com/articles/11g/fine-grained-access-to-network-services-11gr1.php)