Previous Topic: Example: Count Entries in a Single DSA

Next Topic: Example: Count Entries at a Single Level in a Single DSA

Example: Count Entries in a Distributed Directory

In this example, the Democorp directory is distributed across several DSAs. This example shows how to count the number of entries in the whole distributed directory.

This is also a subtree search, which means that the filter is applied to the base object and all entries in the tree below the base object.

To count all of the entries in the Democorp DSA

  1. Run the following search:
    dxsearch -h computer-name -p 19389 -s subtree -b "o=DEMOCORP,c=AU" (objectclass="*") dxTotalEntryCount
    

    In this search, computer-name is the computer that contains the Democorp DSA.

  2. Check the following result for the number of entries:
    o=DEMOCORP,c=AU
    dxTotalEntryCount=1380
    

    This search result indicates that there are 1380 entries in the Democorp DSA.