Re: adsi linked servers

From: Hal Berenson (haroldb@truemountainconsulting.com)
Date: 12/03/02


From: "Hal Berenson" <haroldb@truemountainconsulting.com>
Date: Mon, 2 Dec 2002 21:02:20 -0800


Active Directory only understands a very small, specialized, subset of SQL
(and LDAP is the preferred query language). One consequence of this is that
I don't believe you can get transparent access to the Active Directory data.
That certainly means that Enterprise Manager isn't going to be able to look
at data in Active Directory. OpenQuery should certainly work, if you are
providing a valid ADSI SQL query. The error you report below when using
OpenQuery, 7321, usually means that their is a syntax error in your query.
See the section "Distributed Queries Error Messages" in Books Online. See
the Active Directory documentation for information on their SQL subset.

--
Hal Berenson
True Mountain Consulting
"Chris Szabo" <cszabo@aerotechlabs.com> wrote in message
news:014201c29a3c$06056f90$d3f82ecf@TK2MSFTNGXA10...
> I'm creating an application that pulls data from a variety
> of sources.  Among these sources is a Windows 2000 Active
> Directory.  As such, I would like to create a linked
> server out of the Active Directory repository.
>
> I'm following the directions for the OLE DB Directory
> Service Provider.  I add the linked server with this TSQL
> command:
>
> EXEC sp_addlinkedserver 'ADSI', 'Active Directory Services
> 2.5', 'ADSDSOObject', 'adsdatasource'
> GO
>
> The server is added successfully, however when I try to
> access tables or views through enterprise manager I
> receive an error, "Count not obtain a required interface
> from OLE DB provider 'ADSDSOObject'".
>
> If I execute an openquery command from query analyzer I
> receive an error message, "n error occurred while
> preparing a query for execution against OLE DB
> provider 'ADSDSOObject'."
>
> Does anyone know where I'm going wrong.  Any help is much
> appreciated.  Thanks.
>


Relevant Pages

  • OLE DB Provider
    ... I'm trying to connect to the Active Directory from SQL. ... FROM OPENQUERY(ADSI, ... This query returns the follwing error: ...
    (microsoft.public.sqlserver.programming)
  • Re: Search-Filter for LDAP (MS Active Directory)
    ... > a special part of Active Directory by using LDAP. ... server = 'youradserver.yourdomain.com' ... # single query; I dunno how this is changed within the query (probably ... I can get a TGT with MIT's kinit from my Active Directory server (this ...
    (comp.lang.python)
  • Re: Using domain login names for access control?
    ... Anything in Active Directory you can get -- if you know ... using ADO, you can query against active directory, ... It is pretty much all done, the SQL works fine, but now I want ... level to modify the query so they see only the data for their region. ...
    (microsoft.public.access.security)
  • Re: TS on a Workgroup vs. Domain
    ... query different areas. ... > So it seems that I need to know if I'm running in a workgroup, ... I find the currently logged in user's home directory to ... >>> I query LDAP (active directory) to get the location of the user's home ...
    (microsoft.public.windows.terminal_services)
  • Re: Custom Event Sink to Query LDAP?
    ... SMTP event sinks by default run inprocess which means from a security ... running this event sink on another relay, which is what I am now doing! ... I'm trying to write a custom Event Sink in vbscript to query our Active ... the SMTP message, then look up that user in Active Directory, and pull ...
    (microsoft.public.exchange.development)