title: Query Active Directory via SQL Server Linked Server on Trusted Domain Returns Error
body: <p>I think a similar question posted <a href="https://stackoverflow.com/questions/22920175/sql-linked-server-query-for-ad-returns-msg-7321">HERE</a>, but I am not sure if it is indeed the same solution for me.</p>
  
  <p>I have a SQL Server 2000 instance on the local domain, I can query it without error. But I need to query another active directory on a trusted domain, when doing so I get the error:</p>
  
  <blockquote>
    <p>Msg 7330, Level 16, State 2, Line 1<br>
    Could not fetch a row from OLE DB provider 'ADsDSOObject'.<br>
    OLE DB error trace [OLE/DB Provider 'ADsDSOObject' IRowset::GetNextRows returned 0x8007202b].</p>
  </blockquote>
  
  <p>In the linked server properties: </p>
  
  <pre><code>local_domain\user
  Impersonate is checked
  Be Made Using the Security Context
  Remote login:user@trusted_domain.com
  Password Supplied
  </code></pre>
  
  <p>Again, querying the local domain works, but changing the query to trusted domain returns an error.  Both the local and trusted accounts have rights to active directory. I am not sure how to troubleshoot further.</p>
  
  <p>Thanks!</p>