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

17.7.2.1 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.

17.7.2.2 Using a command-line interface

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

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

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
17.7.2.3 Using VBScript
' This code sets the replication delay for an application partition ' ------ SCRIPT CONFIGURATION ------ 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 else    objRS.MoveLast    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    objAppPart.SetInfo    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.



Active Directory Cookbook
Active Directory Cookbook, 3rd Edition
ISBN: 0596521103
EAN: 2147483647
Year: 2006
Pages: 456

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net