dcsimg
LDAP Search and Updates takes longer time!!!!!
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   V_V
Posted On:   Tuesday, August 3, 2004 10:59 AM

Hi, I need to write a program that walks thru the LDAP and modifies some attributes. I'm using IBM Directory server. LDAP has around 400K user entries. I developed a program using JNDI (using com.sun.jndi.ldap.LdapCtxFactory) and tested it to just read the attributes from LDAP. It was taking lot of time more than a "day". This program is supposed to do different steps, such as get all the users who have employeetype 'A' and modify it, get all the users who have employeetype 'L' and modify it, get all the users who have employeetype 'T' and modify it, get all the users who have 'flag' <> 0 then get tehir PIN from another LDAP and copy it as their password, get all the users who have anther attribute <> empty then get their P   More>>

Hi,

I need to write a program that walks thru the LDAP and modifies some attributes. I'm using IBM Directory server. LDAP has around 400K user entries. I developed a program using JNDI (using com.sun.jndi.ldap.LdapCtxFactory) and tested it to just read the attributes from LDAP. It was taking lot of time more than a "day". This program is supposed to do different steps, such as get all the users who have employeetype 'A' and modify it, get all the users who have employeetype 'L' and modify it, get all the users who have employeetype 'T' and modify it, get all the users who have 'flag' <> 0 then get tehir PIN from another LDAP and copy it as their password, get all the users who have anther attribute <> empty then get their PIN from another LDAP and copy it as PASSWORD and finally get all users then compare their password with PIN (from another LDAP) if they both are equal then expire the user using another API.

For all these tasks it needs to query the LDAP and then loops thru the Enumeration and then modify them or check them and then do necessary things. But this program for just 3000 users it took 2 HR. 48 Mins. But it needs to go against the production LDAP which has 400,000 user entries. How to deal with such a monster LDAP. Is there any other way that speeds up this process. Please help me.
Environment: Os: AIX, Java, JNDI and IBM directory server

I also have another question which API is better to use? JNDI to access and update ldap or Netscape LDAP API?
In JNDI which Context is better?
com.sun.jndi.ldap.LdapCtxFactory
com.ibm.jndi.ldap.LdapCtxFactory
com.netscape.jndi.ldap.LdapCtxFactory

Thanks,
VV

   <<Less
About | Sitemap | Contact