Welcome to Sign in | Help

Re: interogare useri din Active Directory

  •  08-15-2007, 2:46 PM

    Re: interogare useri din Active Directory

    Incearca aici: SQL Server: how to link different data sources together

    Poate te ajuta asta: 

    "Link Microsoft SQL Server to a directory

    You can link SQL Server to a directory like Active Directory or Active Directory Application Mode. Create a linked server in the Enterprise Manager and give it a descriptive name like "Active Directory Link". Choose the option "Other data source" and select the data provider "OLE DB Provider for Microsoft Directory Services". As product name enter "Active Directory Services" and as data source enter "adsdatasource". When you expand the new linked server you will find two available items - Tables and Views. So SQL Server allows you to view any tables or views in this data source. But the data provider "OLE DB Provider for Microsoft Directory Services" does not provide either the tables or views. Therefore you will get the error "Error 7301: Could not obtain a required interface from OLEDB provider ADsDSOObject". You can safely ignore the error message. You will be able to query the data store through the SQL query language.

    It is important that you run the services "MSSQLSERVER" under an account which has access to the directory. If you run the services under the local system account you will get the following error when you try to query the data store:

    Server: Msg 7321, Level 16, State 2, Line 1
    An error occurred while preparing a query for
    execution against OLE DB provider 'ADsDSOObject'.
    OLE DB error trace [OLE/DB Provider 'ADsDSOObject'
    CommandPrepare::Prepare returned 0x80040e14].

    So if the directory runs on your local machine and the local user "DirectoryUser" has access to it then you need to run the "MSSQLSERVER" service under this account. If the directory is running somewhere in your domain and the domain user "DomainUser" has access to it then you need to run the "MSSQLSERVER" service under this domain account." 

View Complete Thread
Powered by Community Server (Commercial Edition), by Telligent Systems