Monday, July 11, 2011

Win 2003 Support Tools


Repadmin

Repadmin is a command-line tool to view and manually create the replication topology.

Usually, the Knowledge Consistency Checker (KCC) manages the replication topology for each naming context held on domain controllers.

Repadmin Examples:

Example 1: Display the replication partners of a server

The following example uses the showrepl operation of Repadmin to display the replication partners of Server1. This command is also used to find the objectGUID and InvocationID for a server for use with other operations.
No parameters are required for the showrepl operation. A remote connection is assumed; therefore, the server name (DC in the syntax) is included.
Type the following at the command prompt:
repadmin /showrepl server1.microsoft.com

Example 2: Initiate a replication event between two replication partners

The following example uses the replicate operation of Repadmin to make Server2 initiate replication of the domain directory partition for microsoft.com from Server1. In this example, Server1 is the source server and Server2 is the destination server.
The required parameters for the replicate operation are the name of the server that will receive changes (DestDC in the syntax), the name of the directory partition (NamingContext in the syntax), and the name of the server that will send the changes (SrcDC in the syntax).
Type the following at the command prompt:
repadmin /replicate server2.microsoft.com server1.microsoft.com dc=microsoft,dc=com
Press Enter and the following output is displayed:
server2.microsoft.com
Sync from server1.microsoft.com to server2.microsoft.com completed successfully.

Example 3: Initiate a replication event for a specified directory partition with all of its replication partners

The following example uses the syncall operation of Repadmin to make Server1 initiate replication of the domain directory partition for microsoft.com from all of its source replication partners in the same site and to make all of the source replication partners initiate replication for microsoft.com from all of their source replication partners in the same site, and so on.
The required parameter for the syncall operation is the server name (DC in the syntax). The name of the directory partition (NamingContext in the syntax) that will be synchronized is also included in this example. If this name is not included, only the configuration partition is synchronized.
Type the following at the command prompt:
repadmin /syncall server1.microsoft.com dc=microsoft,dc=com

Example 4: Display the highest Update Sequence Number on a server

The following example uses the showutdvec operation of Repadmin to show the highest USNs for a specified directory partition on each replication partner. In this example, there are only two replication partners and the directory partition is the domain directory partition for the microsoft.com domain.
The only required parameter for the showutdvec operation is the distinguished name of the directory partition (NamingContext in the syntax). A remote connection is assumed so a server name (DC_LIST in the syntax) is also included.
Type the following at the command prompt:
repadmin /showutdvec . dc=microsoft,dc=com server2.microsoft.com

Example 5: View unreplicated changes between two servers

The following example uses the showchanges operation of Repadmin to view changes that have not yet replicated between Server1 and Server2. In this example Server1 is the source server and is sending the changes while Server2 is the destination server and is receiving the changes.
This is one implementation of the showchanges operation. For another implementation of this operation see Example 6: Create a file to determine what changes have occurred over a period of time.
The required parameters for this version of the showchanges operation are the objectGuid of the directory partition on the source server (referred to as SourceDCObjectGUID in the syntax line) and the name of the directory partition (referred to in the syntax line as NamingContext). A remote connection is assumed so the destination server name (referred to in the syntax line as DestDC) is also included.
Type the following at the command prompt:
repadmin /showchanges server2.microsoft.com 5c02bcaf-86d9-4bed-811e-d17a5cebf8bb dc=microsoft,dc=com

Example 6: Create a file to determine what changes have occurred over a period of time

The following example uses the showchanges operation of Repadmin to create a file that records replication changes. By running the showchanges operation later you can compare the file created earlier to the current replication state.
This is one implementation of the showchanges operation. For another implementation of this operation see Example 5: View unreplicated changes between two servers.
The only required parameter for this version of the showchanges operation is the name of the directory partition (NamingContext in the syntax) on which the check should be performed. In this example, the check is performed remotely so the server name (SourceDC in the syntax) is included as well as the /cookie: parameter, along with the name of the file to be created.
Type the following at the command prompt:
repadmin /showchanges dc=microsoft,dc=com server2.microsoft.com /cookie:microsoft.txt

Example 7: Display the connection objects for a server

The following example uses the showconn operation of Repadmin to show connection objects for a server.
No parameters are required for showconn operation. In this example, a remote connection is assumed so the server name (DC_LIST in the syntax) is specified. All connection objects for Server2 are shown.
Type the following at the command prompt:
repadmin /showconn server2.microsoft.com

Example 8: Display the replication signature for a server

The following example uses the showsig operation of Repadmin to show the replication signature for a server.
No parameters are required for the showsig operation. In this example, a remote connection is assumed so the server name (DC_LIST in the syntax) is specified.
Type the following at the command prompt:
repadmin /showsig server1.microsoft.com

Example 9: Display the context handles for the replication process

The following example uses the showctx operation of Repadmin to show the open connections to the server that are established by remote servers.
No parameters are required for the showctx operation. This example specifies the server name (DC_LIST in the syntax) on which the check should be performed.
Type the following at the command prompt:
repadmin /showctx server2.microsoft.com

Example 10: Showing the replication status of a forest using replsummary and wildcard characters.

The following example uses the replsummary operation and a wildcard character to show a summary of the replication status for all the domain controllers in the forest with a name beginning with 'FOURTH'.
Type the following at the command prompt:
repadmin /replsummary FOURTH*

Example 11: Showing the attributes of a specific object.

The following example uses the showattr operation to show the attributes of a specific object in the Active Directory.
Type the following at the command prompt:
repadmin /showattr fsmo_dnm: ncobj:config: /subtree /filter:(objectClass=crossRef) /atts:nCName,dnsRoot,net,dnsRoot,net,biosname,systemFlags /homeserver:FOURTH-DC-26

No comments:

Post a Comment