184.108.40.206.14 Scheduled and Event-Driven Replication
If client and server are two DCs in the NC replica graph of a given NC and forest, where server is the initial vertex of an arc and client is the final vertex of the same arc, client will perform a replication cycle from server by calling IDL_DRSGetNCChanges ([MS-DRSR] section 4.1.10) until the cycle is complete in either of these two cases:
The DC client's repsFrom tuple for server contains a schedule field that calls for replication at the current time. The schedule contains a REPLTIMES structure as specified in [MS-DRSR] section 5.165. This is scheduled replication.
The DC server calls the IDL_DRSReplicaSync method ([MS-DRSR] section 220.127.116.11) on the client. This is event-driven replication. The events that cause this form of replication are specified later in this section.
A precondition for event-driven replication involves server's repsTo abstract attribute, specified in [MS-DRSR] section 5.173. The repsTo abstract attribute is a sequence tuples, like repsFrom. Like repsFrom, each repsTo tuple contains a field uuidDsa that contains the objectGUID of an nTDSDSA object. The nTDSDSA object represents a DC as specified in section 6.1. If server's repsTo abstract attribute contains a tuple whose uuidDsa field contains the objectGUID of client's nTDSDSA object, server performs event-driven replication to client.
It remains to specify how a DC's repsTo abstract attribute is populated, and to specify the events that trigger event-driven replication.
A DC's repsTo abstract attribute is populated as follows:
A DC server's repsTo abstract attribute is populated for event-driven replication to client if client's repsFrom tuple for server has the DRS_ADD_REF bit set in its replicaFlags field, and client calls the IDL_DRSGetNCChanges method on server during scheduled replication. The DC client sets the DRS_ADD_REF bit in Request.ulFlags on the scheduled call to IDL_DRSGetNCChanges on server ([MS-DRSR] section 18.104.22.168.1) and server updates repsTo for event-driven replication to client as a result ([MS-DRSR] section 22.214.171.124.2).
A DC server's repsTo abstract attribute is populated for event-driven replication to DC client if the IDL_DRSReplicaAdd method ([MS-DRSR] section 126.96.36.199) is called on client, specifying server as the replication source (either pmsgIn.V1.pszSourceDsaAddress or pmsgIn.V2.pszDsaSrc, depending upon the request version used). If the IDL_DRSReplicaAdd adds a new tuple to client's repsFrom, it proceeds to call IDL_DRSUpdateRefs ([MS-DRSR] section 188.8.131.52) on server to update server's repsTo abstract attribute.
Since IDL_DRSReplicaAdd is an RPC method, this behavior is controlled by any authorized requester of this method. Within Active Directory itself, IDL_DRSReplicaAdd is called by the KCC to maintain repsFrom.
The events that trigger event-driven replication from a DC server are as follows: