RepAdmin Examples |
|
Open Command Prompt |
The following example uses the showreps 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 showreps operation. A remote connection is assumed so the server name (DSA in the syntax) is included. Type the following at the command line:
repadmin /showreps server1.microsoft.com
Press enter and the following output is displayed:
Building7a\server1
DSA Options : IS_GC
objectGUID : 415db077-le28-4855-b225-c5bb9af6f50b
InvocationID: 415db077-le28-4855-b225-c5bb9af6f50b
==== INBOUND NEIGHBORS ======================================
CN=Schema,CN=Configuration,DC=microsoft,Dc=com
Building7b\server2 via RPC
objectGuid: e55c6c85-85bb-495a-a0d3-020a44c3afe7
last attempt @ 2001-08-26 11:47.15 was successful.
CN=Configuration,DC=microsoft,Dc=com
Building7b\server2 via RPC
objectGuid: e55c6c85-85bb-495a-a0d3-020a44c3afe7
@nbsp last attempt @ 2001-08-26 12:02.30 was successful.
DC=microsoft,Dc=com
Building7b\server2 via RPC
objectGuid: e55c6c85-85bb-495a-a0d3-020a44c3afe7
last attempt @ 2001-08-26 11:48.16 was successful.
==== OUTBOUND NEIGHBORS FOR CHANGE NOTIFICATIONS ============
CN=Schema,CN=Configuration,DC=microsoft,Dc=com
Building7b\server2 via RPC
objectGuid: e55c6c85-85bb-495a-a0d3-020a44c3afe7
CN=Configuration,DC=microsoft,Dc=com
Building7b\server2 via RPC
objectGuid: e55c6c85-85bb-495a-a0d3-020a44c3afe7
DC=microsoft,Dc=com
Building7b\server2 via RPC
objectGuid: e55c6c85-85bb-495a-a0d3-020a44c3afe7
The following example uses the sync operation of RepAdmin to force the domain directory partition for Microsoft.com on Server1 to replicate with the domain directory partition on Server2. This makes Server2, the source, and Server1, the destination server.
The required parameters for the sync operation are the name of the directory partition (NamingContext in the syntax), the name of the server that will receive changes (Destination_DSA in the syntax), and the objectGUID of the directory partition that will send the changes (Source_DSAUUID in the syntax). Type the following at the command prompt:
repadmin /sync dc=microsoft,dc=com
server1.microsoft.com
e55c6c85-85bb-495a-a0d3-020a44c3afe7
Press enter and the following output is displayed:
Sync from e55c6c85-85bb-495a-a0d3-020a44c3afe7 to server1.microsoft.com completed successfully.
The following example uses the syncall operation of RepAdmin to force the domain directory partition for Microsoft.com on Server1 to replicate with all of its replication partners.
The required parameters for the syncall operation are the server name (DestDSA in the syntax). The name of the directory partition (NamingContext in the syntax) that will be synchronized is included also. If this name is not included, then all directory partitions are synchronized. Type the following at the command line:
repadmin /syncall server1.microsoft.com
dc=microsoft,dc=com
Press enter and the following output is displayed:
CALLBACK MESSAGE: SyncAll Finished.
The following example uses the showvector 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 showvector operation is the name of the directory partition (NamingContext in the syntax). A remote connection is assumed so a server name (DSA in the syntax) is also included. Type the following at the command prompt:
repadmin /showvector dc=microsoft,dc=com
server2.microsoft.com
Press enter and the following output is displayed:
Building7a\server1 @ USN 173259
Building7b\server2 @ USN 51830
The following example uses the getchanges operation of RepAdmin to show 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 getchanges 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 getchanges operation are the name of the directory partition (referred to in the syntax line as naming context) and the objectGuid of the directory partition on the source server (referred to as Source_DSA_UUID in the syntax line). A remote connection is assumed so the destination server name (referred to in the syntax line as Dest DSA) is also included. Type the following at the command prompt:
repadmin /getchanges dc=microsoft,dc=com
server2.microsoft.com
415db077-1e28-4588-b225-c5bb9af6f50b
Press enter and the following output is displayed:
Building starting position from destination server server2.microsoft.com
Source Neighbor:
dc=microsoft, dc=com
Building7a\server1 via RPC
objectGuid: 415db077-1e28-4588-b225-c5bb9af6f50b
Address: 415db077-1e28-4588-b225-c5bb9af6f50b._msdcs.microsoft.com
ntdsDsa invocationID: 415db077-1e28-4588-b225-c5bb9af6f50b
WRITEABLE DO SCHEDULE SYNCS COMPRESS_CHANGES NO_CHANGE_NOTIFICATIONS
USNs: 173257/OU, 173257/PU
Last attempt @ 2001-08-26 12:44.11 was successful.
Destination's Up To Dateness Vector:
4 @ USN 173277
b @ USN 51810
==== Source DSA: 415db077-1e28-4588-b225-c5bb9af6f50b._msdcs.microsoft.com ====
No changes.
The following example uses the getchanges operation of RepAdmin to create a file that records replication changes. By running the getchanges operation later you can compare the file created earlier to the current replication state.
This is one implementation of the getchanges 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 getchanges 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 (SourceDSA 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 /getchanges dc=microsoft,dc=com
server2.microsoft.com /cookie:microsoft.txt
Press enter and the following output is displayed:
Using cookie from file microsoft.txt (132 bytes)
==== Source DSA: server2.microsoft.com ====
No changes.
Using cookie from file microsoft.txt (132 bytes)
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 (DSA in the syntax) is specified. All connection objects for Server2 are shown. Type the following at the command prompt:
repadmin /showconn server2.microsoft.com
Press enter and the following output is displayed:
Show Connection Objects
CN=Building7b,CN=Sites,CN=Configuration,DC=microsoftDc=com:
server2\febe8edf-85b6-4744-902a-1754c1401ac2
enabledConnection: TRUE
fromServer: Building7a\server1
TransportType: IP
options: isGenerated overrideNotifyDefault
ReplicatesNC: CN=Configuration,DC=microsoft,DC=com
ReplicatesNC: DC=microsoft,DC=com
whenChanged: 20000526193849.0Z
whenCreated: 20000526193849.0Z
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 (DSA in the syntax) is specified. Type the following at the command prompt:
repadmin /showsig server1.microsoft.com
Press Enter and the following output is displayed:
Building7a\server1
415db077-1e28-4588-b255-c5bb9af6f50b (current)
No retired signatures.
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 directory partition (NamingContext in the syntax) and the server name (DSA in the syntax) on which the check should be performed. Type the following at the command prompt:
repadmin /showctx server2.microsoft.com
Press enter and the output similar to the following is displayed:
6 open handles.
NTDSAPI client @ 157.59.128.201 (PID 948) (Handle 0x5c925c8)
bound, refs=1, lasted used 2000-05-26 10:23.9
Building7a\server1 @ 157.59.128.242 (PID 256) (Handle 0x914e100)
bound, refs=1, lasted used 2000-05-26 13:30.26
NTDSAPI client @ 127.0.0.1 (PID 1368) (Handle 0x5c92330)
NOT bound, refs=0, lasted used 2000-05-26 13:41.52
NTDSAPI client @ 157.59.128.201 (PID 244) (Handle 0x5c5bd08)
NOT bound, refs=0, lasted used 2000-05-26 13:43.27
NTDSAPI client @ 127.0.0.1 (PID 1420) (Handle 0x91b88e8)
NOT bound, refs=0, lasted used 2000-05-26 13:44.40
NTDSAPI client @ 127.0.0.1 (PID 1356) (Handle 0x5c8e290)
bound, refs=1, lasted used 2000-05-26 13:44.52