Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

4.1.23.2 Server Behavior of the IDL_DRSReplicaSync Method

Informative summary of behavior: The server starts or resumes a replication cycle by sending an IDL_DRSGetNCChanges request to the specified DC. If ulOptions contains DRS_ASYNC_OP, the server performs this operation asynchronously.

ULONG
IDL_DRSReplicaSync(
    [in, ref] DRS_HANDLE hDrs,
    [in] DWORD dwVersion,
    [in, ref, switch_is(dwVersion)]
        DRS_MSG_REPSYNC *pmsgSync);

options: DRS_OPTIONS
nc: DSName
rf: sequence of RepsFrom
msgIn: DRS_MSG_REPSYNC_V1

ValidateDRSInput(hDrs, 2)

/* Validate the version */
if dwVersion ≠ 1 then
  return ERROR_DS_DRA_INVALID_PARAMETER
endif
msgIn := pmsgSync^.V1

/* Validate input params */
options := msgIn.ulOptions
if msgIn.pNC = null
   or (not DRS_SYNC_ALL in options /* See product behavior note below.*/
       and msgIn.uuidDsaSrc = null
       and msgIn.pszDsaSrc = null) then
  return ERROR_DS_DRA_INVALID_PARAMETER
endif

/* Validate the specified NC. */
nc := msgIn.pNC^
if not ObjExists(nc) then
  return ERROR_DS_DRA_BAD_NC
endif

if (DRS_SYNC_BYNAME in options and msgIn.pszDsaSrc = null)
    or (not DRS_SYNC_BYNAME in options and msgIn.uuidDsaSrc = null)
    or (not DRS_SYNC_BYNAME in options and msgIn.uuidDsaSrc = NULLGUID) then
  return ERROR_DS_DRA_INVALID_PARAMETER
endif

if AccessCheckCAR(nc, DS-Replication-Synchronize) then
  return ERROR_DS_DRA_ACCESS_DENIED
endif

if DRS_ASYNC_OP in options then
  Asynchronous Processing: Initiate a logical thread of control
   to process the remainder of this request asynchronously
  return 0
endif

rf := select all v in nc!repsFrom
      where DRS_SYNC_ALL in options
            or (DRS_SYNC_BYNAME in options
                and v.naDsa = msgIn.pszDsaSrc)
            or (not DRS_SYNC_BYNAME in options
                and v.uuidDsa = msgIn.uuidDsaSrc)
if rf = null then
  return ERROR_DS_DRA_NO_REPLICA
endif

foreach r in rf

    if DRS_UPDATE_NOTIFICATION in options
      and not DRS_TWOWAY_SYNC in options
      and DRS_NEVER_NOTIFY in r.V2.ulReplicaFlags then
        return ERROR_DS_DRA_NO_REPLICA
   endif

  /* Replicate nc from the DC specified by r.uuidDsa. */
  Perform a replication cycle as a client of IDL_DRSGetNCChanges.
  Call ReplicateNCRequestMsg (section 4.1.10.4.1) to form the
  first request and send it. If not DRS_MAIL_REP in r.options,
  then wait for the response, process it, send the next request
  (section 4.1.10.6), etc., until the replication cycle is
  complete. 
endfor

return 0

For information about Windows support for the DRS_SYNC_ALL flag, see the product behavior note in section 5.41.

 
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.