Platform SDK: Active Directory, ADSI, and Directory Services |
The DsReplicaSyncAll function synchronizes a server with all other servers in its site, using transitive replication as necessary.
DWORD DsReplicaSyncAll( HANDLE hDS, LPTSTR pszNameContext, ULONG ulFlags, BOOL (__stdcall *pFnCallBack) (LPVOID, PDS_REPSYNCALL_UPDATE), LPVOID pCallbackData, PDS_REPSYNCALL_ERRINFO **pErrors );
Value | Meaning |
---|---|
DS_REPSYNCALL_ABORT_IF_SERVER_UNAVAILABLE | Generates a fatal error if any server cannot be contacted or if any server is unreachable due to a disconnected or broken topology. |
DS_REPSYNCALL_DO_NOT_SYNC | Disables all synchronization. The topology will still be analyzed, and unavailable or unreachable servers will still be identified. |
DS_REPSYNCALL_ID_SERVERS_BY_DN | In the event of a non-fatal error, returns server distinguished names (DN) instead of their GUID domain name service (DNS) names. |
DS_REPSYNCALL_NO_OPTIONS | This option has no effect. |
DS_REPSYNCALL_SKIP_INITIAL_CHECK | Assumes all servers are responding. This will speed operation of the DsReplicaSyncAll function, but if some servers are not responding, some transitive replications may be blocked. |
DS_REPSYNCALL_SYNC_ADJACENT_SERVERS_ONLY | Disables transitive replication. Synchronization will only be performed with adjacent servers. |
If the function performs its operation successfully, the return value is ERROR_SUCCESS.
If the function fails, the return value can be one of the following.
The DsReplicaSyncAll function attempts to bind to all servers before generating a topology to synchronize from. If a server cannot be contacted, the function excludes that server from the topology and attempts to route around it. Setting the DS_REPSYNCALL_SKIP_INITIAL_CHECK flag in ulFlags will bypass the initial binding.
If a server cannot be contacted, the DsReplicaSyncAll function attempts to route around it and replicate from as many servers as possible, unless DS_REPSYNCALL_ABORT_IF_SERVER_UNAVAILABLE is set in ulFlags.
The DsReplicaSyncAll function can use the callback function pointed to by pFnCallBack to keep an end user informed about the current status of the replication. Execution of the DsReplicaSyncAll function pauses when it calls pFnCallBack. If the return value from the callback function is TRUE, replication will continue; otherwise, the DsReplicaSyncAll function will terminate replication.
Windows NT/2000: Requires Windows 2000.
Header: Declared in Ntdsapi.h.
Library: Included as a resource in Ntdsapi.dll.
DC and Replication Management Functions, DsReplicaSync, DS_REPSYNCALL_ERRINFO, DS_REPSYNCALL_UPDATE, SyncUpdateProc