Directory Services |
The DsReplicaAdd function adds a replication source reference to a destination naming context.
DWORD DsReplicaAdd( HANDLE hDS, LPCTSTR NameContext, LPCTSTR SourceDsaDn, LPCTSTR TransportDn, LPCTSTR SourceDsaAddress, const PSCHEDULE pSchedule, DWORD Options );
Value | Meaning |
---|---|
DS_REPADD_ASYNCHRONOUS_OPERATION | Performs this operation asynchronously. |
DS_REPADD_ASYNCHRONOUS_REPLICA | Does not replicate the NC. Instead, save enough state data such that it may be replicated later. |
DS_REPADD_DISABLE_NOTIFICATION | Disables notification-based synchronization for the NC from this source. This is expected to be a temporary state. Use DS_REPADD_NEVER_NOTIFY to permanently disable synchronization. |
DS_REPADD_DISABLE_PERIODIC | Disables periodic synchronization for the NC from this source. |
DS_REPADD_INITIAL | Synchronizes the NC from this source when the DSA is started. |
DS_REPADD_INTERSITE_MESSAGING | Synchronizes from the source DSA using the Intersite Messaging Service (IMS) transport, for example, by SMTP, rather than using the native directory service RPC. |
DS_REPADD_NEVER_NOTIFY | Disables change notifications from this source.
When this flag is set, the source does not notify the destination
when changes occur. This is recommended for all intersite
replication that may occur over WAN links.
This is expected to be a permanent state; use DS_REPADD_DISABLE_NOTIFICATION to temporarily disable notifications. |
DS_REPADD_PERIODIC | Synchronizes the NC from this source periodically, as defined in pSchedule. |
DS_REPADD_USE_COMPRESSION | Uses compression when replicating. This saves network bandwidth at the expense of CPU overhead at both the source and destination servers. |
DS_REPADD_WRITEABLE | Creates a writable replica; otherwise, the replica is read-only. |
If the function fails, the return value can be one of the following.
Return Code | Description |
---|---|
ERROR_INVALID_PARAMETER | A parameter is incorrect. |
ERROR_NOT_SUPPORTED | The requested version of the directory service server extensions is not supported. |
Client: Included in Windows XP and
Windows 2000 Professional.
Server: Included in Windows Server 2003 and
Windows 2000 Server.
Redistributable: Requires Active Directory Client Extension
on Windows NT 4.0 SP6a and Windows 95/98/Me.
Unicode: Implemented as Unicode and ANSI versions on Windows
NT/2000/XP.
Header: Declared in Ntdsapi.h.
Library: Use Ntdsapi.lib.
SCHEDULE, DsReplicaDel, DsReplicaModify, DsReplicaSync, DsReplicaUpdateRefs, Domain Controller and Replication Management Functions