Dela via


Dsastat Examples

Applies To: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1, Windows Server 2003 with SP2

DsaStat Examples

Example 1: Object Count Comparison

Your network has the following domains and servers:

  • Domain, with two domain controllers:

    • DomainS1 (which is also a global catalog)

    • DomainS2

    The distinguished name of the domain is DC=Domain,DC=com.

  • Child.Domain, a child domain of Domain, with one domain controller:

    • ChildS1 (which is also a global catalog)

    The distinguished name of the domain is DC=Child,DC=Domain,DC=com.

To compare the number of objects in the directory for the domain Domain, type the following at the command line:

dsastat –s:DomainS1;DomainS2 –b:DC=Domain,DC=com –gcattrs:objectclass –p:999

This search merely keeps a count of the different types of objects in each of the replicas and then compares the count for each object class.

Example 2: Full Comparison

Your network has the following domains and servers:

  • Domain, with two domain controllers:

    • DomainS1 (which is also a global catalog)

    • DomainS2

    The distinguished name of the domain is DC=Domain,DC=com.

  • Child.Domain, a child domain of Domain, with one domain controller:

    • ChildS1 (which is also a global catalog)

    The distinguished name of the domain is DC=Child,DC=Domain,DC=com.

To perform a full comparison of each object in the domain Domain, type the following at the command line:

dsastat –s:DomainS1;DomainS2 –b:DC=Domain,DC=com –gcattrs:all –sort:true –t:false –p:16

This search does a full content search and comparison of all the objects in the domain Domain. Because the default filter is "(objectclass=*)," all objects are retrieved by this search. The objects are also sorted based on objectGUID to improve the performance of the comparison operation.

Example 3: User Comparison

Your network has the following domains and servers:

  • Domain, with two domain controllers:

    • DomainS1 (which is also a global catalog)

    • DomainS2

    The distinguished name of the domain is DC=Domain,DC=com.

  • Child.Domain, a child domain of Domain, with one domain controller:

    • ChildS1 (which is also a global catalog)

    The distinguished name of the domain is DC=Child,DC=Domain,DC=com.

To perform a comparison of all users in the Sales organizational unit in the Domain domain, type the following at the command line:

dsastat –s:DomainS1;DomainS2 –b:OU=Sales,DC=Domain,DC=com –gcattrs:all –sort:true –t:false –p:16 –filter:"(&(objectclass=user)(!objectClass=computer))"

This example illustrates the specification of the base search path at a subtree of the domain, in this case the organizational unit named Sales. In addition, the filter specifies that the comparison is only concerned with user objects and not computer objects. Note that since computer objects are derived from user objects in the class hierarchy, a search filter specifying objectclass=user will return both user and computer objects.

Example 4: DC Comparison

Your network has the following domains and servers:

  • Domain, with two domain controllers:

    • DomainS1 (which is also a global catalog)

    • DomainS2

    The distinguished name of the domain is DC=Domain,DC=com.

  • Child.Domain, a child domain of Domain, with one domain controller:

    • ChildS1 (which is also a global catalog)

    The distinguished name of the domain is DC=Child,DC=Domain,DC=com.

To perform a comparison between a domain controller in the Child domain and a global catalog server in the domain Domain, type the following at the command line. (Note that the global catalog server DomainS1 in the domain Domain holds a partial replica of all objects from the domain Child.)

dsastat -s:DomainS1:3268;ChildS1 -b:DC=Child,DC=Domain,DC=com -gcattrs:objectclass -p:999 

This search compares the global catalog on DomainS1 and checks to see if it has a consistent partial image of the domain Child. This search does not perform a full-content comparison, but simply checks that the object count is the same between the global catalog and the domain controller ChildS1 in the domain Child.

Example 5: Full Content Comparison

To perform a full content comparison between a domain controller in the Child domain and a global catalog server in the domain Domain, type the following at the command line:

dsastat –s:DomainS1:3268;ChildS1 –b:DC=Child,DC=Domain,DC=com –gcattrs:auto –sort:true –t:false –p:16

In this example, DsaStat performs a full content comparison between all the objects that have been replicated to the global catalog. Specifying the auto option for /gcattrs ensures that only the attributes replicated to the global catalog are retrieved.

See Also

Concepts

Dsastat Overview
Dsastat Syntax
Alphabetical List of Tools
Search Overview
Replmon Overview
Repadmin Overview
Movetree.exe
Ldp Overview
Clonepr Overview
ADSI Edit (adsiedit.msc)
Acldiag Overview