Retrieving User Data from Active Directory Using PL / SQL

I had a discussion today regarding an Oracle procedure that I wrote some time ago.

I wanted to get 7,500 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.

So my solution was to filter out the last two characters of the sAMAccountName (* 00, * 01, * 02 ... etc.). This results in 126 requests (100 for account names ending with numbers, 26 for those ending with a letter ... that was enough for my AD setup).

The person I spoke with (it was an interview, by the way) said that he could have done it better, but he would not tell me what this method is.

Can anyone really suggest that this method was?

+2


a source to share


2 answers


Indeed, as trivial as an interview question, I don't know the skills they need, but in my opinion this is a strange "Oracle" question because it requires detailed knowledge of Microsoft AD, but no specific PL / SQL.



You probably needed to use the Range Recrieval attribute. It explains here http://msdn.microsoft.com/en-us/library/Aa772308

+1


a source


If the result set is sorted by name, you can simply query the next 1.000 with a name greater than the last. And repeat it until you get less than 1000 or more results.



0


a source







All Articles