<div class="content" name="NetrDatabaseRedo" uuid="c8352ce8-8b09-4bae-aaf7-456d7e6fda6c"><p>The <b>NetrDatabaseRedo</b> method SHOULD<a id="Appendix_A_Target_234"></a><a aria-label="Product behavior note 234" href="0c858a52-732a-43ec-85dd-e44b357c1898#Appendix_A_234" data-linktype="relative-path">&lt;234&gt;</a> be used by a <span><a href="b5e7d25a-40b2-41c8-9611-98f53358af66#gt_ce1138c6-7ab4-4c37-98b4-95599071c3c3" data-linktype="relative-path">backup
domain controller (BDC)</a></span> to request information about a single
account from the <span><a href="b5e7d25a-40b2-41c8-9611-98f53358af66#gt_663cb13a-8b75-477f-b6e1-bea8f2fba64d" data-linktype="relative-path">PDC</a></span>. </p><dl>
<dd>
<div><pre> NTSTATUS NetrDatabaseRedo(
   [in, string] LOGONSRV_HANDLE PrimaryName,
   [in, string, range(0,256)] wchar_t* ComputerName,
   [in] PNETLOGON_AUTHENTICATOR Authenticator,
   [in, out] PNETLOGON_AUTHENTICATOR ReturnAuthenticator,
   [in, size_is(ChangeLogEntrySize)] 
     UCHAR * ChangeLogEntry,
   [in, range(0,4096)] DWORD ChangeLogEntrySize,
   [out] PNETLOGON_DELTA_ENUM_ARRAY* DeltaArray
 );
</pre></div>
</dd></dl><p><b>PrimaryName: </b>The custom binding handle,
defined in section <span><a href="3b224201-b531-43e2-8c79-b61f6dea8640" data-linktype="relative-path">3.5.4.1</a></span>,
representing the connection to the PDC. </p><p><b>ComputerName: </b>The null-terminated Unicode
string that contains the <span><a href="b5e7d25a-40b2-41c8-9611-98f53358af66#gt_0334e0bd-2755-42f6-aeff-2d4a22bf4abf" data-linktype="relative-path">NetBIOS name</a></span> of the
BDC calling this method. </p><p><b>Authenticator: </b>A pointer to a <b>NETLOGON_AUTHENTICATOR</b>
structure, as specified in section <span><a href="76c93227-942a-4687-ab9d-9d972ffabdab" data-linktype="relative-path">2.2.1.1.5</a></span>, that
contains the client <span><a href="b5e7d25a-40b2-41c8-9611-98f53358af66#gt_e72a2c02-84a2-4ce3-b66f-86f725642dc3" data-linktype="relative-path">authenticator</a></span>. </p><p><b>ReturnAuthenticator: </b>A pointer to a <b>NETLOGON_AUTHENTICATOR</b>
structure, as specified in section 2.2.1.1.5, that contains the server return
authenticator. </p><p><b>ChangeLogEntry: </b>A pointer to a buffer that
contains a CHANGELOG_ENTRY structure, specified as follows, for the account
being queried.</p><p><b>ChangeLogEntrySize: </b>The size, in bytes, of the
buffer pointed to by the <i>ChangeLogEntry</i> parameter.</p><p><b>DeltaArray: </b>A pointer to a <span><a href="82d47318-c4d8-4583-86a6-ce186504bcba" data-linktype="relative-path">NETLOGON_DELTA_ENUM_ARRAY</a></span>
structure, as specified in section 2.2.1.5.12, that contains an array of
enumerated database changes for the account being queried.</p><p><b>Return Values: </b>The method returns 0x00000000
on success; otherwise, it returns a nonzero error code. </p><p>The following CHANGELOG_ENTRY structure pointed to by the <i>ChangeLogEntry</i>
parameter carries information about the account object being queried. </p><table>
 <tbody><tr>
  <th><p><br/>0</p></th>
  <th><p><br/>1</p></th>
  <th><p><br/>2</p></th>
  <th><p><br/>3</p></th>
  <th><p><br/>4</p></th>
  <th><p><br/>5</p></th>
  <th><p><br/>6</p></th>
  <th><p><br/>7</p></th>
  <th><p><br/>8</p></th>
  <th><p><br/>9</p></th>
  <th><p>1<br/>0</p></th>
  <th><p><br/>1</p></th>
  <th><p><br/>2</p></th>
  <th><p><br/>3</p></th>
  <th><p><br/>4</p></th>
  <th><p><br/>5</p></th>
  <th><p><br/>6</p></th>
  <th><p><br/>7</p></th>
  <th><p><br/>8</p></th>
  <th><p><br/>9</p></th>
  <th><p>2<br/>0</p></th>
  <th><p><br/>1</p></th>
  <th><p><br/>2</p></th>
  <th><p><br/>3</p></th>
  <th><p><br/>4</p></th>
  <th><p><br/>5</p></th>
  <th><p><br/>6</p></th>
  <th><p><br/>7</p></th>
  <th><p><br/>8</p></th>
  <th><p><br/>9</p></th>
  <th><p>3<br/>0</p></th>
  <th><p><br/>1</p></th>
 </tr>
 <tr>
  <td colspan="32">SerialNumber [0..3]</td>
 </tr>
 <tr>
  <td colspan="32">SerialNumber [4..7]</td>
 </tr>
 <tr>
  <td colspan="32">ObjectRid</td>
 </tr>
 <tr>
  <td colspan="16">Flags</td>
  <td colspan="8">DBIndex</td>
  <td colspan="8">DeltaType</td>
 </tr>
 <tr>
  <td colspan="32">ObjectSid (optional, variable length) …</td>
 </tr>
 <tr>
  <td colspan="32">ObjectName (optional, variable length) …</td>
 </tr>
</tbody></table><p><b>SerialNumber:</b> The <span><a href="b5e7d25a-40b2-41c8-9611-98f53358af66#gt_0b04ee8e-be04-4d04-94c4-90e58390f83d" data-linktype="relative-path">database serial number</a></span>
that corresponds to this account object (64-bit integer).</p><p><b>ObjectRid:</b> The <span><a href="b5e7d25a-40b2-41c8-9611-98f53358af66#gt_df3d0b61-56cd-4dac-9402-982f1fedc41c" data-linktype="relative-path">RID</a></span> of the object
(32-bit integer).</p><p><b>Flags:</b> A two-byte set of bit flags that
describes the properties of the message. A flag is TRUE (or set) if its value
is equal to 1. The value is constructed from zero or more bit flags from the
following table, with the exception that bit C cannot be combined with bit D.</p><dl>
<dd>
<table>
 <tbody><tr>
  <th>
  <p>0</p>
  </th>
  <th>
  <p>1</p>
  </th>
  <th>
  <p>2</p>
  </th>
  <th>
  <p>3</p>
  </th>
  <th>
  <p>4</p>
  </th>
  <th>
  <p>5</p>
  </th>
  <th>
  <p>6</p>
  </th>
  <th>
  <p>7</p>
  </th>
  <th>
  <p>8</p>
  </th>
  <th>
  <p>9</p>
  </th>
  <th>
  <p>1</p>
  <p>0</p>
  </th>
  <th>
  <p>1</p>
  </th>
  <th>
  <p>2</p>
  </th>
  <th>
  <p>3</p>
  </th>
  <th>
  <p>4</p>
  </th>
  <th>
  <p>5</p>
  </th>
 </tr>
 <tr>
  <td>0</td>
  <td>0</td>
  <td>0</td>
  <td>0</td>
  <td>0</td>
  <td>0</td>
  <td>0</td>
  <td>0</td>
  <td>0</td>
  <td>0</td>
  <td>0</td>
  <td>E</td>
  <td>D</td>
  <td>C</td>
  <td>B</td>
  <td>A</td>
 </tr>
</tbody></table>
</dd>
<dd>
<p>The flags are defined as follows.</p>
</dd>
<dd>
<table><thead>
  <tr>
   <th>
   <p>Flag</p>
   </th>
   <th>
   <p>Meaning</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>A</td>
  <td>The object requires immediate replication at the moment that the object is changed.</td>
 </tr><tr>
  <td>B</td>
  <td>The object is an account with a changed password.</td>
 </tr><tr>
  <td>C</td>
  <td>The optional ObjectSid field is included in the message. Cannot be combined with flag D.</td>
 </tr><tr>
  <td>D</td>
  <td>The optional ObjectName field is included in the message. Cannot be combined with flag C.</td>
 </tr><tr>
  <td>E</td>
  <td>The object is the first object changed after a promotion of a BDC to a new PDC.</td>
 </tr></tbody></table>
</dd>
<dd>
<p>All other bits MUST be set to zero and MUST be
ignored on receipt.</p>
</dd></dl><p><b>DBIndex:</b> The 8-bit integer identifier of the
database containing the object. MUST be one, and only one, of the following
values.</p><dl>
<dd>
<table><thead>
  <tr>
   <th>
   <p>Value</p>
   </th>
   <th>
   <p>Meaning</p>
   </th>
  </tr>
 </thead><tbody><tr>
  <td>0x00</td>
  <td>The SAM database.</td>
 </tr><tr>
  <td>0x01</td>
  <td>The SAM built-in database.</td>
 </tr><tr>
  <td>0x02</td>
  <td>The LSA database.</td>
 </tr></tbody></table>
</dd></dl><p><b>DeltaType:</b> One of the <span><a href="f8a8cd32-426d-45f1-be45-e0dc5c1c1359" data-linktype="relative-path">NETLOGON_DELTA_TYPE</a></span>
values specified in section 2.2.1.5.28. </p><p><b>ObjectSid:</b> The <span><a href="b5e7d25a-40b2-41c8-9611-98f53358af66#gt_83f2020d-0804-4840-a5ac-e06439d50f8d" data-linktype="relative-path">SID</a></span> of the object.
Included only if flag C is set. This is an RPC_SID structure, as defined in <span><a href="../ms-dtyp/cca27429-5689-4a16-b2b4-9325d93e4ba2" data-linktype="relative-path">[MS-DTYP]</a></span>
section <span><a href="../ms-dtyp/5cb97814-a1c2-4215-b7dc-76d1f4bfad01" data-linktype="relative-path">2.4.2.3</a></span>.</p><p><b>ObjectName:</b> The name of the object. <b>ObjectName</b>
is a null-terminated Unicode string, and is included only if flag D is set. </p><p>The server that receives this call MUST do the following:</p><ul><li><p><span><span> 
</span></span>Verify that the client is a backup domain controller (BDC), the
server is a PDC, and synchronization is enabled.  If any of these conditions
are false, the server MUST return the status code STATUS_NOT_SUPPORTED.</p>
</li><li><p><span><span> 
</span></span>Using the <i>ComputerName</i> for the <span><a href="b5e7d25a-40b2-41c8-9611-98f53358af66#gt_08ce423c-9f9c-48ed-afa8-8b64c04ecdca" data-linktype="relative-path">secure channel</a></span> to
find the corresponding record in the ClientSessionInfo table, verify the <i>Authenticator</i>
parameter (section <span><a href="da7acaa3-030b-481e-979b-f58f89389806" data-linktype="relative-path">3.1.4.5</a></span>). If the <i>Authenticator</i>
parameter is valid, compute the <i>ReturnAuthenticator</i> parameter returned
(section 3.1.4.5). Otherwise, the server MUST return STATUS_ACCESS_DENIED.</p>
</li><li><p><span><span> 
</span></span>Validate the <i>ChangeLogEntry</i> parameter as a valid single
account object information request message. If the <i>ChangeLogEntry</i>
parameter is not valid, the server MUST return the status code STATUS_INVALID_PARAMETER.</p>
</li></ul><p>The server uses the server name passed in the <i>PrimaryName</i>
parameter to look up the domain that the server hosts. If the name is not
found, the server MUST return STATUS_INVALID_COMPUTER_NAME.</p><p>Return a single <span><a href="b5e7d25a-40b2-41c8-9611-98f53358af66#gt_bac72edb-4ce9-4baa-8977-f33e331b2b5e" data-linktype="relative-path">delta</a></span> for the
requested account in the <i>DeltaArray</i> parameter.</p></div>