SQL Server 2000 & Active Directory: Problems querying

J

James Allan

Hello --

I'm trying to get SQL Server 2000 on a Windows 2000 Server to be able
to query an Active Directory. We've got two domain servers one Win2000
and one Win2003. However, I'm having problems:

I've run the following query to setup the linked server:

sp_addlinkedserver 'ADSI', 'Active Directory Service Interfaces',
'ADSDSOObject', 'adsdatasource'

Using Enterprise Manager I've changed the login details for the ADSI
linked server to:

Be made using the following security context:
Username: MyDomain\Administrator
Password: ****

I've then tried to run the following query in Query Analyzer:

SELECT * FROM
OpenQuery(
ADSI,
'<LDAP://CN=Users,DC=MyDomain,DC=com>;(&(objectCategory=Person)(objectClass=User));name,adspath'
)

But get the following error message:
Could not execute query against OLE DB provider 'ADSDSOObject'.

Does anyone have any ideas on what this message means or how to get
this working?

Thanks
 
S

Simon Hayes

James Allan said:
Hello --

I'm trying to get SQL Server 2000 on a Windows 2000 Server to be able
to query an Active Directory. We've got two domain servers one Win2000
and one Win2003. However, I'm having problems:

I've run the following query to setup the linked server:

sp_addlinkedserver 'ADSI', 'Active Directory Service Interfaces',
'ADSDSOObject', 'adsdatasource'

Using Enterprise Manager I've changed the login details for the ADSI
linked server to:

Be made using the following security context:
Username: MyDomain\Administrator
Password: ****

I've then tried to run the following query in Query Analyzer:

SELECT * FROM
OpenQuery(
ADSI,
' said:
)

But get the following error message:
Could not execute query against OLE DB provider 'ADSDSOObject'.

Does anyone have any ideas on what this message means or how to get
this working?

Thanks

From searching on Google, it seems some people have managed to get this to
work. However, this posting from an MS engineer seems to indicate that the
provider isn't supported in SQL Server:

http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&selm=9rUVnjE1CHA.3028@cpmsftngxa06

Simon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top