Recipe 17.7 Setting the Replication Notification Delay for an Application Partition

17.7.1 Problem

Two replication-related settings that you can customize for application partitions (or any naming context for that matter) include the first and subsequent replication delay after a change to the partition has been detected. The first replication delay is the time that a domain controller waits before it notifies its first replication partner that there has been a change. The subsequent replication delay is the time that the domain controller waits after it has notified its first replication partner before it will notify its next partner. You may need to customize these settings so that replication happens as quickly as you need it to for data in the application partition.

17.7.2 Solution Using a graphical user interface
  1. Open ADSI Edit.

  2. Connect to the configuration naming context of the forest the application partition is in if it is not already present in the left pane.

  3. Expand the configuration naming context and click on the Partitions container.

  4. In the right pane, right-click on the crossRef object that represents the application partition and select Properties.

  5. Set the msDS-Replication-Notify-First-DSA-Delay and msDS-Replication-Notify-Subsequent-DSA-Delay attributes to the number of seconds you want for each delay (see the Discussion section for more details).

  6. Click OK. Using a command-line interface

The Windows Server 2003 version of repadmin supports setting the notification delays:

> repadmin /notifyopt <AppPartitionDN> /first:<FirstDelayInSeconds> /subs:[RETURN]

For Windows 2000, you can create an LDIF file with the following contents:

dn: <AppPartitionCrossRefDN>
changetype: modify
replace: msDS-Replication-Notify-First-DSA-Delay
msDS-Replication-Notify-First-DSA-Delay: <FirstDelayInSeconds>
replace: msDS-Replication-Notify-Subsequent-DSA-Delay
msDS-Replication-Notify-Subsequent-DSA-Delay: <NextDelayInSeconds>

If the file were named change_replication_delays.ldf, you'd run the following command:

> ldifde -v -i -f change_replication_delays.ldf Using VBScript
' This code sets the replication delay for an application partition
strAppPartDN  = "<AppPartitionDN>"  ' e.g. dc=apps,dc=rallencorp,dc=com
intFirstDelay = <FirstDelayInSeconds>
intNextDelay  = <NextDelayInSeconds>
' ------ END CONFIGURATION ---------

set objRootDSE = GetObject("LDAP://RootDSE")
strBase    =  "<LDAP://cn=Partitions," & _
              objRootDSE.Get("ConfigurationNamingContext") & ">;"
strFilter  = "(&(objectcategory=crossRef)(nCName=" & strAppPartDN & "));" 
strAttrs   = "cn,distinguishedName;"
strScope   = "onelevel"
set objConn = CreateObject("ADODB.Connection")
objConn.Provider = "ADsDSOObject"
objConn.Open "Active Directory Provider"
set objRS = objConn.Execute(strBase & strFilter & strAttrs & strScope)

if objRS.RecordCount <> 1 then
   WScript.Echo "Did not find a match for " & strAppPartDN
   set objAppPart = GetObject("LDAP://" &  _
                    objRS.Fields("distinguishedName").Value )
   objAppPart.Put "msDS-Replication-Notify-First-DSA-Delay", intFirstDelay
   objAppPart.Put "msDS-Replication-Notify-Subsequent-DSA-Delay", intNextDelay
   Wscript.Echo "Modified " & objRS.Fields("distinguishedName").Value
end if

17.7.3 Discussion

The settings that control the notification delay are stored in the msDS-Replication-Notify-First-DSA-Delay and msDS-Replication-Notify-Subsequent-DSA-Delay attributes on the application partition's crossRef object in the Partitions container. The time values are stored as seconds. The default for application partitions is 60 seconds for the first delay and 60 seconds for the subsequent delay.

    Chapter 3. Domain Controllers, Global Catalogs, and FSMOs
    Chapter 6. Users
    Appendix A. Tool List