RepAdmin Examples
RepAdmin Examples
Page 1 of 5
Repadmin Examples
Updated: March 28, 2003
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:
Copy Code
repadmin /showrepl server1.microsoft.com
Building7a\server1
DC Options : IS_GC
Site OPtions: (none)
DC object GUID : 405db077-le28-4825-b225-c5bb9af6f50b
DC invocationID: 405db077-le28-4825-b225-c5bb9af6f50b
==== INBOUND NEIGHBORS ======================================
CN=Schema,CN=Configuration,DC=microsoft,Dc=com
Building7b\server2 via RPC
objectGuid: e55c6c75-75bb-485a-a0d3-020a44c3afe7
last attempt @ 2002-09-09 12:25.35 was successful.
CN=Configuration,DC=microsoft,Dc=com
Building7b\server2 via RPC
objectGuid: e55c6c75-75bb-485a-a0d3-020a44c3afe7
last attempt @ 2002-09-09 12:25.10 was successful.
DC=microsoft,Dc=com
Building7b\server2 via RPC
objectGuid: e55c6c75-75bb-485a-a0d3-020a44c3afe7
last attempt @ 2001-09-09 12:25.11 was successful.
Copy Code
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:
Copy Code
repadmin /syncall server1 dc=microsoft,dc=com
Syncing partition: dc=microsoft,dc=com
CALLBACK MESSAGE: The following replication is in progress:
From: fea22f1d-a456-4f70-aa06-bedbda29e7eb._msdcs.microsoft.com
To : 5c02bcaf-86d9-4bed-811e-d17a5cebf8bb._msdcs.microsoft.com
CALLBACK MESSAGE: The following replication completed successfully:
From: fea22f1d-a456-4f70-aa06-bedbda29e7eb._msdcs.microsoft.com
To : 5c02bcaf-86d9-4bed-811e-d17a5cebf8bb._msdcs.microsoft.com
http://technet.microsoft.com/en-us/library/cc773062(printer).aspx
10/7/2008
Page 2 of 5
Copy Code
repadmin running command /showutdvec against server localhost
Caching GUIDs.
..
Building7b\Server1
Building7b\Server2
@ USN
@ USN
Copy Code
server2.microsoft.com
Building starting position from destination server rktlabdc2.rktlabdom.com
Source Neighbor:
dc=microsoft,dc=com
==== INBOUND NEIGHBORS ======================================
dc=microsoft,dc=com
Building7b\Server1 via RPC
DC object GUID: 5c02bcaf-86d9-4bed-811e-d17a5cebf8bb
Address: 5c02bcaf-86d9-4bed-811e-d17a5cebf8bb._msdcs.microsoft.com
DC invocationID: 064152bc-f8e8-404f-bd64-cdd9bb3958cb
SYNC_ON_STARTUP DO_SCHEDULED_SYNCS WRITEABLE
USNs: 296048/OU, 296048/PU
Last attempt @ 2002-09-09 20:03:53 was successful.
Destination's up-to-date vector:
064152bc-f8e8-404f-bd64-cdd9bb3958cb @ USN 296163
fea22f1d-a456-4f70-aa06-bedbda29e7eb @ USN 338287
==== SOURCE DC: 5c02bcaf-86d9-4bed-811e-d17a5cebf8bb._msdcs.microsoft.com ====
No Changes
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:
Copy Code
pDcList->szSp.. server2
Using cookie from file test.txt (132 bytes)
==== SOURCE DC: server2 ====
http://technet.microsoft.com/en-us/library/cc773062(printer).aspx
10/7/2008
Page 3 of 5
Objects returned: 2
(0) modify CN=00000000000000000000000000000000,CN=VolumeTable,CN=FileLinks,CN=Sy
stem,DC=rktlabdom,DC=com
1> objectGUID: c4955e2f-ab7c-4f96-bdb6-bf29b97ce3df
1> instanceType: 0x4 = ( IT_WRITE )
1> seqNotification: 130
(1) modify DC=..SerialNo-server1.microsoft.com,DC=microsoft.com,CN=MicrosoftDN
S,CN=System,DC=microsoft,DC=com
1> objectGUID: 0422b130-bf39-4549-aeea-64ed264d10c2
1> instanceType: 0x4 = ( IT_WRITE )
1> dnsRecord: <32 byte blob>
New cookie written to file microsoft.txt (132 bytes)
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:
Copy Code
repadmin running command /showconn against server server2.microsoft.com
Show Connection Objects
Base DN:
CN=Building7b,CN=Sites,CN=Configuration,DC=microsoftDc=com
==== KCC CONNECTION OBJECTS ============================================
Connection -Connection name : b415ba00-8d8d-429b-8a3d-21fd06a99a6c
Server DNS name : server2.microsoft.com
Server DN name : CN=NTDS Settings,CN=SERVER2,CN=Servers,CN=Building7b,CN=Sites,CN=Configuration,DC=microsoft,DC=com
Source: Building7b\Server2
No Failures.
TransportType: intrasite RPC
options: isGenerated
Reason: RingTopology
Replica link has been added.
ReplicatesNC: DC=DomainDnsZones,DC=microsoft,DC=com
Reason: RingTopology
Replica link has been added.
ReplicatesNC: CN=Configuration,DC=microsoft,DC=com
Reason: RingTopology
Replica link has been added.
ReplicatesNC: DC=microsoft,DC=com
Reason: RingTopology
Replica link has been added.
ReplicatesNC: CN=Schema,CN=Configuration,DC=microsoft,DC=com
Reason: RingTopology
Replica link has been added.
Connection -Connection name : 2357ff7a-4e54-46e2-a387-2e35b0560ab7
Server DNS name : server2.microsoft.com
Server DN name : CN=NTDS Settings,CN=RKTLABDC2,CN=Servers,CN=Building7b,CN=Sites,CN=Configuration,DC=microsoft,DC=com
Source: Building7b\Server2
No Failures.
TransportType: intrasite RPC
options: isGenerated
ReplicatesNC: DC=DomainDnsZones,DC=microsoft,DC=com
Reason: RingTopology
Replica link has been added.
ReplicatesNC: DC=ForestDnsZones,DC=microsoft,DC=com
Reason: RingTopology
Replica link has been added.
ReplicatesNC: CN=Configuration,DC=microsoft,DC=com
Reason: RingTopology
Replica link has been added.
ReplicatesNC: DC=microsoft,DC=com
Reason: RingTopology
Replica link has been added.
ReplicatesNC: CN=Schema,CN=Configuration,DC=microsoft,DC=com
Reason: RingTopology
Replica link has been added.
2 connections found.
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:
Copy Code
server1.microsoft.com
Building7a\server1
Current DC invocationID: 415db077-1e28-4588-b255-c5bb9af6f50b (current)
No retired signatures.
http://technet.microsoft.com/en-us/library/cc773062(printer).aspx
10/7/2008
Page 4 of 5
Copy Code
server1.microsoft.com
Caching GUIDs.
..
3 open context handles.
NTDSAPI client @ 10.193.36.209 (PID 1528) (Handle 0x20b8a38)
bound, refs=1, last used 2002-09-09 14:21:41
Building7a\Server1 @ 10.193.36.210 (PID 460) (Handle 0x20b8c40)
bound, refs=1, last used 2002-09-09 14:23:22
NTDSAPI client @ 10.193.36.210 (PID 2976) (Handle 0x20bb960)
bound, refs=2, last used 2002-09-09 14:23:28
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:
Copy Code
repadmin /replsummary FOURTH*
Replication Summary Start Time: 2002-09-18 14:54:49
Beginning data collection for replication summary, this may take awhile:
Source DC
FOURTH-CLT-DC-01
FOURTH-DC-05
FOURTH-DC-06
FOURTH-DC-07
FOURTH-DC-08
FOURTH-DC-09
FOURTH-DC-10
FOURTH-DC-11
FOURTH-DC-12
FOURTH-DC-13
FOURTH-DC-14
FOURTH-DC-15
FOURTH-DC-16
FOURTH-DC-17
FOURTH-DC-18
FOURTH-DC-19
FOURTH-DC-20
FOURTH-DC-21
FOURTH-DC-22
FOURTH-DC-23
FOURTH-DC-24
FOURTH-DC-25
FOURTH-DC-26
FOURTH-DC-30
FOURTH-DC-31
FOURTH-SVC-DC-40
FOURTH-TK-DC-27
FOURTH-TK-DC-28
FOURTH-TK-DC-29
Copy Code
repadmin running command /showattr against server aseanl-test2.fourthcoffee.com
DN: CN=Enterprise Configuration,CN=Partitions,CN=Configuration,DC=fourthcoffee,DC=com
1> nCName: CN=Configuration,DC=fourthcoffee,DC=com
1> dnsRoot: fourthcoffee.com
http://technet.microsoft.com/en-us/library/cc773062(printer).aspx
10/7/2008
Page 5 of 5
See Also
Concepts
Repadmin Overview
Repadmin Remarks
Repadmin Syntax
Alphabetical List of Tools
Search Overview
Replmon Overview
Movetree.exe
Ldp Overview
Dsastat Overview
Clonepr Overview
Adsiedit Overview
Acldiag Overview
Tags:
Community Content
http://technet.microsoft.com/en-us/library/cc773062(printer).aspx
10/7/2008