Windows IT Pro is the authoritative and independent resource for windows nt, windows 2000, windows 2003, windows xp. Features a collection of resources and magazines for windows IT professionals.
  
  
  Advanced Search 


September 2001

Forcing AD Replication


RSS
Subscribe to Windows IT Pro | See More Active Directory (AD) Articles Here | Reprints | Or get the Monthly Online Pass—only $5.95 a month!

Use Repadmin to make a DC synchronize with one or all of its partners

In "Get a Handle on AD Internals," September 2001, I explained how to use the Microsoft Windows 2000 Server Resource Kit's Repadmin utility to find a domain controller's (DC's) replication partners and how to use the required Lightweight Directory Access Protocol (LDAP) terminology to phrase your queries. Repadmin also lets you force those partners to synchronize.

Suppose I have two DCs—ds1 and ds2—both of which are members of acme.com. I want to run a script that works best when DCs have consistent copies of Active Directory (AD), so I want to synchronize ds1's and ds2's copies of the directory. Because AD replication is pull-only, synchronizing two DCs requires two events: I need to direct ds1 to pull ds2's changes, then I need to tell ds2 to pull ds1's changes. Both events are necessary because other DCs might have modified ds1's or ds2's copy of AD.

Use the following syntax to tell one DC to request updates from another DC:

repadmin /sync
  <namingcontext>
  <destinationDCname>
  <sourceDCGUID> /force

Namingcontext is LDAP-ese for the particular database that you want to replicate. For example, LDAP's naming context for the uptown.acme.com AD domain is dc=uptown,dc=acme,dc=com. DestinationDCname is the DNS name of the pulling DC. To tell ds1 to pull AD changes from ds2, I replace destinationDCname with ds1.acme.com.

The odd parameter is sourceDCGUID. In its place, you need to put the globally unique ID (GUID) of the DC that ds1 should pull changes from. You can use the Repadmin /showreps command to obtain that information. One of the first lines in that command's output resembles the line of output in Figure 1. The string that follows the colon is the specified DC's GUID. If that DC were ds2, we could use the command that Listing 1 shows to tell ds1 to pull replication information about the acme.com domain from ds2. The response (e.g., Sync from 8e90169a-dbf4-461b-97f5-1535085b9c04 to dun.win2ktest.com completed successfully) tells you whether replication was successful.

An easier approach uses an option that doesn't require any GUIDs. The /syncall option forces the DC to synchronize with all its partners. The syntax is

repadmin /syncall
  <destinationDCname>
  <namingcontext> /force

To force ds1 to pull changes from all its replication partners, you'd type

repadmin /syncall
  ds1.acme.com
  dc=acme,dc=com /force

If you omit the naming context, the DC replicates the forest's schema and configuration naming contexts.

Within 15 minutes after you bring a new DC online, it will run the internal Knowledge Consistency Checker (KCC) routine to choose replication partners. If you don't want to wait, you can use the following command to force the DC to run the KCC:

repadmin /kcc <DCname>

where DCname is the DC's DNS name.

We haven't exhausted Repadmin's capabilities yet. Watch for more in a future column.

End of Article



Reader Comments
After reading TORK, I set out to find repadmin on my resource kit CD, but alas, I couldn't find it. What's up with my toolkit?

Rick Harderwijk September 26, 2001


I couldn't find it either...

Simon Bond April 08, 2004


its in the SUPPORT\TOOLS\SUPPORT.CAB

andrew June 20, 2004


thanx for great article

Anonymous User January 21, 2005 (Article Rating: )


how to use naming context if there are two or more domains in the same forest?

Anonymous User May 05, 2005 (Article Rating: )


You must log on before posting a comment.

If you don't have a username & password, please register now.




Top Viewed ArticlesView all articles
Command Prompt Tricks

One reader shares his tip for setting up the command prompt to reflect a remote path. ...

New Microsoft/Yahoo! Deal? No

On Sunday, the Times of London reported that Microsoft had renewed talks with failing Internet giant Yahoo! and would manage its search engine for 10 years, while Yahoo! would retain control of its email, messaging, and content services. This report ...

How can I stop and start services from the command line?

...


Active Directory (AD) Whitepapers Sustainable Compliance: How to reconnect compliance, security and business goals

Managing Unix/Linux with Microsoft System Center Operations Manager 2007 Cross Platform Extensions Beta

Addressing the Insider Threat with NetIQ Security and Administration Solutions

Related Events Concrete Ways to Make Sure Your SharePoint Deployment Doesn't Blow Up

PCI Requirements for Windows and Active Directory: Straight from a Certified Auditor

Check out our list of Free Email Newsletters!

Windows OSs eBooks Understanding and Leveraging Code Signing Technologies

Keeping Your Business Safe from Attack: Monitoring and Managing Your Network Security

Windows 2003: Active Directory Administration Essentials

Related Active Directory (AD) Resources Become a VIP member of the Windows IT Pro community!
Get it all with the VIP CD and VIP access. A $500+ value for only $279!

Subscribe to Windows IT Pro!
Solve your toughest technical problems with our experts and access 10,000 + articles online. 30% off

Monthly Online Pass - Only $5.95!
Get instant access to 10,000+ articles from Windows IT Pro Magazine!

TechNet Virtual Labs
Evaluate and test Microsoft's newest products.


Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro Windows Dev Pro IT Job Hound ITTV
IT Library Technology Resource Directory Connected Home Windows Excavator Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 Copyright © 2008 Penton Media, Inc., All rights reserved. Terms and Use | Privacy Statement | Reprints and Licensing