Enabling Change Notification for a Site Link

Enabling Change Notification for a Site Link


You want to enable change notification between sites so that replication will occur as changes occur rather than according to a set schedule.


Using a graphical user interface
  1. Open ADSI Edit from the Windows Support Tools. Create or open a connection to the Configuration Container, then browse to CN=Configuration, <ForestRootDN> CN=Sites CN=Inter-Site Transports CN=IP.

  2. Right-click on the site link object that you want to modify and select Properties.

  3. Scroll to the options attribute. If the attribute has not been set, click Edit and enter a value of 1. Click OK.

  4. If there is an existing value in place, perform a bitwise OR with 1 and the existing value, click Edit, and enter the new value. Click OK.

Using a command-line interface
	> admod cn=<SiteLinkName>,cn=IP,cn=Inter-site
	Transports,cn=Sites,cn=Configuration,cn=<ForestRootDN> options::1

Since options is a bitwise operator, your best option will be to make this modification using ADSI Edit or the VBScript solution that follows.

Using VBScript
	' This code safely modifies a bit flag attribute.
	' ------ SCRIPT CONFIGURATION -------
	strSiteLink = "<SiteLinkDN>"   ' e.g. cn=jsmith,cn=users,dc=rallencorp,dc=com
	strAttr = "options"
	boolEnableBit = <TRUEorFALSE>  ' e.g. trUE to enable
	intBit = 1
	' ------ END CONFIGURATION ---------

	set objSiteLink = GetObject("LDAP://" & strSiteLink)
	intBitsOrig = objSiteLink.Get(strAttr)
	intBitsCalc = CalcBit(intBitsOrig, intBit, boolEnableBit)

	if intBitsOrig <> intBitsCalc then
	   objSiteLink.Put strAttr, intBitsCalc
	   WScript.Echo "Changed " & strAttr & " from " & intBitsOrig & " to " & intBitsCalc
	   WScript.Echo "Did not need to change " & strAttr & " (" & intBitsOrig & ")"
	end if

	Function CalcBit(intValue, intBit, boolEnable)

	   CalcBit = intValue

	   if boolEnable = TRUE then
	      CalcBit = intValue Or intBit
	      if intValue And intBit then
	         CalcBit = intValue Xor intBit
	      end if
	   end if

	End Function


By default, intra-site replication occurs on the basis of change notifications where replication occurs almost immediately after a change occurs, while domain controllers in different sites will only replicate with each other on a set schedule. To configure a particular site link to use the change-notification mechanism for replication, you can set bit 1 of its options attribute. Keep in mind that this will create more frequent replication traffic on the site link in question, but it will ensure that changes made in one site can be replicated to the other site much more quickly than by using the default inter-site replication schedules.

See Also

Recipe 4.15 for more on modifying bitwise attributes and Recipe 12.17 for more on modifying replication schedules

 Python   SQL   Java   php   Perl 
 game development   web development   internet   *nix   graphics   hardware 
 telecommunications   C++ 
 Flash   Active Directory   Windows