Platform SDK: Active Directory, ADSI, and Directory Services

DsReplicaSync

The DsReplicaSync function synchronizes a destination naming context (NC) with one of its sources.

DWORD DsReplicaSync(
  HANDLE hDS,
  LPCTSTR NameContext,
  const UUID *pUuidDsaSrc,
  ULONG Options
);

Parameters

hDS
[in] Bind handle to the directory service.
NameContext
[in] Pointer to a constant null-terminated Unicode string specifying the distinguished name of the destination NC.
pUuidDsaSrc
[in] Pointer to the UUID of a source that replicates to the destination NC.
Options
[in] Passes additional information to be used to process the request. This parameter can be a combination of the following values.
Value Meaning
DS_REPSYNC_ADD_REFERENCE Causes the source directory system agent (DSA) to check if the local DSA is present in the source's replicates-to list. If not, the local DSA is added. This ensures that the source will send change notifications.
DS_REPSYNC_ALL_SOURCES Synchronizes from all sources.
DS_REPSYNC_ASYNCHRONOUS_OPERATION Performs this operation asynchronously. Required when using DS_REPSYNC_ALL_SOURCES.
DS_REPSYNC_FORCE Synchronizes even if the link is currently disabled.
DS_REPSYNC_FULL Synchronizes starting from the first Update Sequence Number (USN).
DS_REPSYNC_INTERSITE_MESSAGING Synchronizes using an Intersite Messaging Service (ISM).
DS_REPSYNC_NO_DISCARD Does not discard this synchronization request, even if a similar synchronization is pending.
DS_REPSYNC_PERIODIC Indicates this operation is a periodic synchronization request as scheduled by the admin.
DS_REPSYNC_URGENT Indicates this operation is a notification of an update marked urgent.
DS_REPSYNC_WRITEABLE Replica will be writeable. Otherwise, it will be read-only.

Return Values

If the function performs its operation successfully, the return value is ERROR_SUCCESS.

If the function fails, the return value is one of the standard Win32 API errors.

Remarks

The server that DsReplicaSync executes on is called the destination. The destination's naming context will be brought up-to-date with respect to a source system, identified by the UUID of the source system's NTDS Settings object. The destination system must already be configured so that the source system is one of the systems from which it receives replication data.

Requirements

  Windows NT/2000: Requires Windows 2000.
  Header: Declared in Ntdsapi.h.
  Library: Included as a resource in Ntdsapi.dll.
  Unicode: Implemented as Unicode and ANSI versions on Windows 2000.

See Also

DC and Replication Management Functions, DsReplicaAdd, DsReplicaDel, DsReplicaModify, DsReplicaSyncAll, DsReplicaUpdateRefs