Go Back   TechArena Community > Technical Support > Computer Help > Windows Server > Active Directory
Become a Member!
Forgot your username/password?
Register Tags Active Topics RSS Search Mark Forums Read SiteMap

Tags:

Sponsored Links



getting property problems

Active Directory


Reply
 
Thread Tools Search this Thread
  #1  
Old 21-03-2010
Eric
 
Posts: n/a
getting property problems

Hi,

I have a little program to work out how to get certain information from my
companies LDAP.
- Connecting to the LDAP is not a problem.
- I want to search all entries with the filter is (&(ou=ENN)(eriIsManager=Y))
the ou property holds the company name and the other one is to select only
those who are a manager.
- the time needed by the FindAll is taking about 20 sec for 20 results, I
find it a bit long.
- when I want to show the number of results found on my form with .count it
takes a really long time (in minutes!).
- after that I want to read the uid property from the results and again it
takes minutes.

Why these long times?
Is it a server problem?

is the software contacting the server with each investigation of a property?

Please help me?

rg,
Eric



Reply With Quote
  #2  
Old 21-03-2010
Florian Frommherz
 
Posts: n/a
Re: getting property problems

Howdie!

Am 20.03.2010 19:34, schrieb Eric:
> I have a little program to work out how to get certain information from my
> companies LDAP.
> - Connecting to the LDAP is not a problem.
> - I want to search all entries with the filter is (&(ou=ENN)(eriIsManager=Y))
> the ou property holds the company name and the other one is to select only
> those who are a manager.
> - the time needed by the FindAll is taking about 20 sec for 20 results, I
> find it a bit long.
> - when I want to show the number of results found on my form with .count it
> takes a really long time (in minutes!).
> - after that I want to read the uid property from the results and again it
> takes minutes.


Depending on how large your database is and how well equipped your DC(s)
is/are, it might take that long, though 20 seconds is still a quite long
time. If the filter above is the real filter AD has to process, it'll
walk through the ou attribute's index and search from there. I suspect
the OU is not that small so it doesn't really shrink the number of
potential search results compared to the whole DIT.

I'd probably try to filter the result set further down by adding other
filter criteria. If you're searching only managers, why not including
(objectClass=user)(objectCategory=person) to only filter for user accounts?

Is that .Count call another query to the LDAP server? You might probably
want to save your results in an enumeration and count from there rather
than again calling a search from the LDAP server and gather the search
results number (if that's the case).

For your UID case -- it looks like you again query the LDAP server to
gather it. As far as I know, .NET would gather the search results with
all their attributes available rather than limiting the attribute list
to a set of necessary attributes. I'm not an .NET expert but would look
into how .NET collects search result information and see whether it
already has the uid attribute for every search result it gets rather
than re-calling a LDAP search.

But then again, it seriously shouldn't take minutes to get those
results. That's a matter of seconds in bad cases. Depending on what
you're running (AD? LDS?) I'd turn on Field Engineer logging and see
what the stats say. You probably want to use a different application to
compare the search stats with your own app to see what those come up
with. .NET does a lot of things under the cover. Chances are it just
burns time there. LDP does LDAP searches pretty well, just enable the
"STATS" control. ADFind is worth a look, too.

Cheers,
Florian

> Why these long times?
> Is it a server problem?
>
> is the software contacting the server with each investigation of a property?
>
> Please help me?
>
> rg,
> Eric
>
>
>


Reply With Quote
  #3  
Old 22-03-2010
Richard Mueller [MVP]
 
Posts: n/a
Re: getting property problems


"Eric" <Eric@discussions.microsoft.com> wrote in message
news:22B13C29-A0AB-4380-9999-9D1B7683A030@microsoft.com...
> Hi,
>
> I have a little program to work out how to get certain information from my
> companies LDAP.
> - Connecting to the LDAP is not a problem.
> - I want to search all entries with the filter is
> (&(ou=ENN)(eriIsManager=Y))
> the ou property holds the company name and the other one is to select only
> those who are a manager.
> - the time needed by the FindAll is taking about 20 sec for 20 results, I
> find it a bit long.
> - when I want to show the number of results found on my form with .count
> it
> takes a really long time (in minutes!).
> - after that I want to read the uid property from the results and again it
> takes minutes.
>
> Why these long times?
> Is it a server problem?
>
> is the software contacting the server with each investigation of a
> property?
>
> Please help me?
>
> rg,
> Eric
>


You must have populated the ou attribute of user objects. This attribute is
only mandatory for OU objects. It seems like the query should be fast, since
ou is indexed. However, it should be faster to make the base of the query
the Distinguished Name of the OU and make the filter either (eriIsManager=Y)
or (&(objectCategory=person)(objectClass=user)(eriIsManager=Y)).

I'm used to .Count being a method of the recordset that results from a
query. The method must enumerate the entire recordset, but this is in local
memory (and in your case there are only 20 rows). It should not involve
another query of the server, unless the code specifies that the query be
repeated.

--
Richard Mueller
MVP Directory Services
Hilltop Lab - http://www.rlmueller.net
--


Reply With Quote
  #4  
Old 24-03-2010
Eric
 
Posts: n/a
Re: getting property problems

Thank you for your answer. I'll give it another shot.

rg,
Eric


"Florian Frommherz" wrote:

> Howdie!
>
> Am 20.03.2010 19:34, schrieb Eric:
> > I have a little program to work out how to get certain information from my
> > companies LDAP.
> > - Connecting to the LDAP is not a problem.
> > - I want to search all entries with the filter is (&(ou=ENN)(eriIsManager=Y))
> > the ou property holds the company name and the other one is to select only
> > those who are a manager.
> > - the time needed by the FindAll is taking about 20 sec for 20 results, I
> > find it a bit long.
> > - when I want to show the number of results found on my form with .count it
> > takes a really long time (in minutes!).
> > - after that I want to read the uid property from the results and again it
> > takes minutes.

>
> Depending on how large your database is and how well equipped your DC(s)
> is/are, it might take that long, though 20 seconds is still a quite long
> time. If the filter above is the real filter AD has to process, it'll
> walk through the ou attribute's index and search from there. I suspect
> the OU is not that small so it doesn't really shrink the number of
> potential search results compared to the whole DIT.
>
> I'd probably try to filter the result set further down by adding other
> filter criteria. If you're searching only managers, why not including
> (objectClass=user)(objectCategory=person) to only filter for user accounts?
>
> Is that .Count call another query to the LDAP server? You might probably
> want to save your results in an enumeration and count from there rather
> than again calling a search from the LDAP server and gather the search
> results number (if that's the case).
>
> For your UID case -- it looks like you again query the LDAP server to
> gather it. As far as I know, .NET would gather the search results with
> all their attributes available rather than limiting the attribute list
> to a set of necessary attributes. I'm not an .NET expert but would look
> into how .NET collects search result information and see whether it
> already has the uid attribute for every search result it gets rather
> than re-calling a LDAP search.
>
> But then again, it seriously shouldn't take minutes to get those
> results. That's a matter of seconds in bad cases. Depending on what
> you're running (AD? LDS?) I'd turn on Field Engineer logging and see
> what the stats say. You probably want to use a different application to
> compare the search stats with your own app to see what those come up
> with. .NET does a lot of things under the cover. Chances are it just
> burns time there. LDP does LDAP searches pretty well, just enable the
> "STATS" control. ADFind is worth a look, too.
>
> Cheers,
> Florian
>
> > Why these long times?
> > Is it a server problem?
> >
> > is the software contacting the server with each investigation of a property?
> >
> > Please help me?
> >
> > rg,
> > Eric
> >
> >
> >

>
> .
>

Reply With Quote
  #5  
Old 24-03-2010
Eric
 
Posts: n/a
Re: getting property problems

thank you for your answer. I'll give it another shot.

rg.
Eric


"Richard Mueller [MVP]" wrote:

>
> "Eric" <Eric@discussions.microsoft.com> wrote in message
> news:22B13C29-A0AB-4380-9999-9D1B7683A030@microsoft.com...
> > Hi,
> >
> > I have a little program to work out how to get certain information from my
> > companies LDAP.
> > - Connecting to the LDAP is not a problem.
> > - I want to search all entries with the filter is
> > (&(ou=ENN)(eriIsManager=Y))
> > the ou property holds the company name and the other one is to select only
> > those who are a manager.
> > - the time needed by the FindAll is taking about 20 sec for 20 results, I
> > find it a bit long.
> > - when I want to show the number of results found on my form with .count
> > it
> > takes a really long time (in minutes!).
> > - after that I want to read the uid property from the results and again it
> > takes minutes.
> >
> > Why these long times?
> > Is it a server problem?
> >
> > is the software contacting the server with each investigation of a
> > property?
> >
> > Please help me?
> >
> > rg,
> > Eric
> >

>
> You must have populated the ou attribute of user objects. This attribute is
> only mandatory for OU objects. It seems like the query should be fast, since
> ou is indexed. However, it should be faster to make the base of the query
> the Distinguished Name of the OU and make the filter either (eriIsManager=Y)
> or (&(objectCategory=person)(objectClass=user)(eriIsManager=Y)).
>
> I'm used to .Count being a method of the recordset that results from a
> query. The method must enumerate the entire recordset, but this is in local
> memory (and in your case there are only 20 rows). It should not involve
> another query of the server, unless the code specifies that the query be
> repeated.
>
> --
> Richard Mueller
> MVP Directory Services
> Hilltop Lab - http://www.rlmueller.net
> --
>
>
> .
>

Reply With Quote
Reply

  TechArena Community > Technical Support > Computer Help > Windows Server > Active Directory


Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "getting property problems"
Thread Thread Starter Forum Replies Last Post
C sharp: AutoPostBack Property Mithun Seth Software Development 5 29-01-2010 01:51 PM
SelectionObject property rooki Software Development 3 30-11-2009 10:05 PM
CSS Property For IMG Joko Software Development 3 12-08-2009 12:20 PM
neweditindex property in gridview Alexis25 Software Development 3 13-06-2009 11:05 AM
File unblock property ras256 Windows Security 0 31-01-2008 09:36 AM


All times are GMT +5.5. The time now is 01:44 AM.