Getting user data from Active Directory using PL/SQL
- by David Neale
I had a discussion today regarding an Oracle procedure I wrote some time ago.
I wanted to get 7500 user email addresses from Active Directory using PL/SQL. AD will return a maximum of 1000 rows and the LDAP provider used by Oracle will not support paging.
Therefore, my solution was to filter on the last two characters of the sAMAccountName (*00,*01,*02...etc.). This results in 126 queries (100 for account names ending in digits, 26 for those ending in a letter...this was sufficient for my AD setup).
The person I was speaking to (it was a job interview by the way) said he could have done it a better way, but he would not tell me what that method was.
Could anybody hazard a guess at what this method was?