Due to a lack material online I am currently unable to fix an issue when querying LDAP with DBMS_LDAP.SEARCH_S.
Our company has multiple LDAP's and two of which have over 20,000 users. I want to make a call that ignores all disabled users so I attempted this:
vretval := DBMS_LDAP.SEARCH_S(vsession, vldap_base, DBMS_LDAP.SCOPE_SUBTREE,
'(&(objectClass=person)(!(UserAccountControl:1.2.840.113556.1.4.803:=2))(sAMAccountName='||vletter||'*))',
vattrs,
0,
vmessage);
Please note I do not receive any errors just 0 entries from the above call.
If I run this:
vretval := DBMS_LDAP.SEARCH_S(vsession, vldap_base,
DBMS_LDAP.SCOPE_SUBTREE,
'(&(objectClass=person)(sAMAccountName='||vletter||'*))',
vattrs,
0,
vmessage);
I will receive all entries in the LDAP that start with the letter in vletter.
Does anyone know why I DBMS_LDAP.SEARCH_S would return 0 entries but if removed returns all?
As there is very little material and info on OTN in regards to usage of DBMS_LDAP.SEARCH_S I am unable to reduce my search to a group that something that won't get a timeout error.