regarding the No.of entries in the Directory Server

I wanted to know the number of entries in our DS. So i have initially made a search on the requried objectclass and then counted the number of DN's in the exported LDIF file:

1)./ldapsearch -h sever -p 389 -b "suffix" -s sub -D "cn=Directory Manager" -w objectclass=thdperson > ldif.file

Then i found the following command to count the no of entries in a DS from the forums...The command looks like this for this search:

2)ldapsearch -h server -p 389 -b "suffix" "objectclass=thdPerson" | grep "^dn:" | wc -1

To my surprise, I fount that the no of entries are different for the above search..Search using command2 gave me the count as 19541 and search1 gave me the count as 19529..

Late i exported a ldif file using the searchcommand2 and the result count of this is 19540....

Then i made a search again by searchcommand2 but this time using cn=Directory Manager..now the count is 19542(one more than the result obtained by using searchcommand2 with anonymous search)

What exactly is causing this variation in the count?Iam a little bit worried because we are migrating our whole data to a new Server with a new DIT and schema..So i just want to make sure that all the entries are present in the new server...

[1264 byte] By [anandkaturia] at [2007-11-27 3:51:24]
# 1

cn=Directory Manager has no resource limits, and is unaffected by ACIs. This means a search as Directory Manager is likely to return more results. In your case I would guess it probably has to do with ACIs, since ~19,000 entries is way above the default limits for anonymous searches.

What DNs are present in the Directory Manager search that aren't in the anonymous search? Examining these closely will probably make it clear what's going on.

> Then i found the following command to count

> the no of entries in a DS from the forums...The

> command looks like this for this search:

> 2)ldapsearch -h server -p 389 -b "suffix"

> "objectclass=thdPerson" | grep "^dn:" | wc -1

Be sure you're doing "wc -l" not "wc -1" (lowercase L, not 1).

gtholberta at 2007-7-12 8:55:23 > top of Java-index,Web & Directory Servers,Directory Servers...