大网数据广告活动
域与目录服务

Synchronizing Between AD DS and AD LDS Enters Endless Loop if the base DN is a Grandchild OU

· 52CE 我爱测

Discusses how to work around a behavior in the Adamsync tool in which the synchronization process enters an endless loop.

Original KB number:   926933

Summary

When you use the Active Directory Application Mode (ADAM) Synchronizer (Adamsync) tool to synchronize data from Active Directory Domain Services (AD DS) to Active Directory Lightweight Directory Services (AD LDS), the synchronization process might enter an endless loop. This issue occurs when you specify a grandchild organizational unit (OU) as the base distinguished name (base DN) in the Adamsync configuration file.

This article describes the symptoms, cause, and workarounds for this known issue in the Adamsync tool.

Symptoms

You have an Active Directory Domain Services (AD DS) forest and an Active Directory Lightweight Directory Service (AD LDS) instance. You use the Adamsync tool in Windows to synchronize data from the AD DS forest to the AD LDS instance. However, the synchronization never finishes. For a detailed walkthrough of this process, see More information.

This issue occurs if you specify a grandchild organizational unit (OU) in the AD DS forest as the base DN in Adamsync's XML configuration file. Such a configuration resembles the following example:

<base-dn>OU=Grandchild,OU=Child,DC=03child,DC=MyDomCon,DC=net</base-dn>

By default, the configuration file is named MS-AdamsyncConf.XML, and it resides in the %windir%\adam folder.

Cause

This behavior is a known issue in the Adamsync tool.

Workaround

To work around this issue, use one of the following methods:

  • Before you run the Adamsync tool, create the grandchild OU in the AD LDS instance. Then, in the Adamsync configuration file, specify the grandchild OU as the base DN.

  • Instead of specifying the grandchild OU as the base DN in the Adamsync configuration file, specify the child OU as the base DN. For example, use the following syntax to specify the base DN in the Adamsync configuration file:

    <base-dn>OU=Child,DC=03child,DC=MyDomCon,DC=net</base-dn>
    

More information

You can reproduce the issue by following these steps:

  1. Configure an AD LDS instance (or a configuration set of instances) as described in the Preparing an AD LDS instance for synchronization section of "Synchronize with Active Directory Domain Services."

  2. Edit the Adamsync tool configuration file to synchronize data from an Active Directory forest to the instance or configuration set. Set the base DN to be the grandchild OU.

    For example, include parameters that resemble the following example in the My-Custom-AdamsyncConf.XML configuration file:

    <source-ad-name>03child.MyDomCon.net</source-ad-name>
    <source-ad-partition>dc=03child,dc=MyDomCon,dc=net</source-ad-partition>
    <source-ad-account></source-ad-account>
    <account-domain></account-domain>
    <target-dn>dc=lds-target,dc=com</target-dn>
    <query>
      <base-dn>OU=Grandchild,OU=Child,DC=03child,DC=MyDomCon,DC=net</base-dn>
    
  3. To install the Adamsync configuration, run the following command at a Windows command prompt:

    Adamsync.exe /install <AdamServerName>:<PortNo> My-Custom-AdamsyncConf.XML
    

    [!NOTE]
    In this command (and in the other steps of this procedure), <AdamServerName> represents the name of the computer that runs the Adamsync tool, and <PortNo> represents the number of the port that the Adamsync tool uses.

  4. To start synchronizing, run the following command at the command prompt:

    Adamsync /sync <AdamServerName>:<PortNo> "dc=lds-target,dc=com" /Log Synclog.txt
    

    [!NOTE]
    In this command, dc=lds-target,dc=com represents the target naming context in the AD LDS instance. Synclog.txt is the file name of the synchronization log.

    The synchronization process runs for a much longer time than you expect.

  5. After the synchronization process runs for a while, use Task Manager to end the Adamsync process.

  6. Open the log file that you specified in step 4. The log file contains entries that resemble the following example:

    Processing Entry: Page 1, Frame 2, Entry 0, Count 0, USN 3707635
    Processing source entry <guid=f356ef7ee6f25d46835363baa7d6de2c>
    Processing in-scope entry f356ef7ee6f25d46835363baa7d6de2c.
    Adding target object OU=Grandchild,OU=Child,dc=lds-target,dc=com.
    Adding attributes: objectClass, instanceType, sourceobjectguid, lastagedchange,
    Adding target object OU=Grandchild,OU=Child,dc=lds-target,dc=com. Requesting replication of parent.
    Previous entry took 0 seconds (16, 0) to process
    
    Processing Entry: Page 1, Frame 3, Entry 0, Count 0, USN 3704672
    Processing source entry <guid=8416cee1dc410d47a871c4905a7e3bda>
    Previous entry took 0 seconds (0, 0) to process
    
    Processing Entry: Page 1, Frame 2, Entry 0, Count 0, USN 3707635
    Processing source entry <guid=f356ef7ee6f25d46835363baa7d6de2c>
    Processing in-scope entry f356ef7ee6f25d46835363baa7d6de2c.
    Adding target object OU=Grandchild,OU=Child,dc=lds-target,dc=com.
    Adding attributes: objectClass, instanceType, sourceobjectguid, lastagedchange,
    Adding target object OU=Grandchild,OU=Child,dc=lds-target,dc=com. Requesting replication of parent.
    Previous entry took 0 seconds (4, 0) to process
    
    Processing Entry: Page 1, Frame 3, Entry 0, Count 0, USN 3704672
    Processing source entry <guid=8416cee1dc410d47a871c4905a7e3bda>
    Previous entry took 0 seconds (2, 0) to process
    

    This pattern of entries repeats throughout the log file.

References

Source: Microsoft Learn / IT Pro troubleshooting by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / IT Pro troubleshooting
适用范围
- ✅ Supported versions of Windows Server - ✅ Supported versions of Windows Client · Source date 02/12/2026
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。