Subscribe to Windows IT Pro

 

Get Newsletters

  • Get the Latest News
  • Product Updates
  • Helpful Tricks
  • Productivity Tips

Subscribe Now!

August 29, 2001 12:00 AM

Forcing AD Replication

Windows IT Pro
InstantDoc ID #22007
Rating: (5)
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.

Related Content:

ARTICLE TOOLS

Comments
  • Ahamed
    3 years ago
    Apr 06, 2009

    SSS

  • Anonymous User
    7 years ago
    May 05, 2005

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

  • Anonymous User
    7 years ago
    Jan 21, 2005

    thanx for great article

  • andrew
    8 years ago
    Jun 20, 2004

    its in the SUPPORT\\TOOLS\\SUPPORT.CAB

  • Simon Bond
    8 years ago
    Apr 08, 2004

    I couldn't find it either...

You must log on before posting a comment.

Are you a new visitor? Register Here

advertisement

advertisement

White Papers

Get your Windows 7 deployment off to the right start by implementing PC lockdown. A locked-down environment is easier and cheaper to support since users are less likely to make unnecessary changes to the core system configuration - read more here!

Essential Guides

Is your iSCSI "lossy"? The reality is that most off-the-shelf Ethernet hardware deployed for iSCSI can lose packets, resulting in slow performance or application downtime. Learn how to assess your current iSCSI infrastructure and engineer an advanced iSCSI SAN infrastructure.

Web Seminars

What's the best way to keep your network safe from malware? In this web seminar, security expert Greg Shields suggests an alternative method to the traditional blacklisting approach that is common with anti-virus and anti-malware solutions.

eLearning Series

We bring the experts direct to you to share their real-world perspective and expertise. During each event, three sessions stream in real time, so you can learn, ask questions, and get solutions.
Upcoming event: Getting the Most with Exchange 2010 with Paul Robichaux

Subscribe to Windows IT Pro!

Windows is a trademark of the Microsoft group of companies. Windows IT Pro is used by Penton Media Inc. under license from owner.