April 26, 2006 at 12:03 pm
I've created a linked server for an OpenLDAP server and ran the OPENQUERY statement seleting from the LDAP server. I receive an error: An error occurred while preparing a query for execution against OLE DB provider 'ADSDSOObject'. Has anyone successfully selected data from an OpenLDAP server?
Melissa
April 27, 2006 at 8:08 am
Here's what I use to query our LDAP server.
SELECT distinct top 100 percent department
FROM OpenQuery(ADSI, 'SELECT department FROM ''LDAP://DC=...,DC=...,DC=...'' where samAccountType = ''805306368''')
This is just a view that I created and use to get the departments of my organization. I hope that this helps. Thanks.
Chris
April 27, 2006 at 11:05 am
I'm using a query that looks very similar... are you using an OpenLDAP soluation or Microsoft's? I wasn't sure if it had anything to do with the version of LDAP. Below is a sample of my query...
select * from openquery(ADSI_OpenLDAP,'SELECT * FROM
''LDAP://168.143.217.118/cn=nasa,cn=gov''
WHERE objectClass = ''*'' ')
Linked Server creation....
exec sp_addlinkedserver
'ADSI_OpenLDAP',
'My OpenLDAP Linked Server',
'ADSDSOObject',
'adsdatasource'
go
exec sp_addlinkedsrvlogin
'ADSI_OpenLDAP',
False,
'sa',
'Manager','password'
go
Thanks,
Melissa
April 27, 2006 at 2:01 pm
I didn't set it up, so I couldn't tell you for sure. Sorry.
Chris
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply