June 25, 2010 at 1:54 am
Hi all,
I am asked to use SQL server to query attributes from LDAP server. I did some research in this forum and found some useful example. However, I still got error. I suspect the root cause is the authentication since I didn't know where should I put the BindDN string (which is the my credential for logging in the ldap)
Please help me. I am new to SQL server.:(
Kelvin
June 26, 2010 at 8:57 am
Hi all,
I recently use linux to ldapsearch the AD. Is it possible for me to connect the AD from SQL server if I have the following information? If possible, where should I place them in the query??
1.) LDAP host Name
2.) Bind DN
3.) Password
4.) Search base
Regards,
Kelvin
June 29, 2010 at 12:00 pm
Anyone can help on this topic? I have no direction to deal with it...
June 29, 2010 at 12:07 pm
kelvin this may or may not be much help;
i have this saved in my snippets for creating a linked server to Active Directory, and then querying it...in my case, i didn't have permissions with my domain\username to be able to accomplish this.
--doesn't quite work...permissions
EXEC sp_addlinkedserver 'ADSI', 'Active Directory Services 2.5', 'ADSDSOObject', 'adsdatasource'
select * from openquery
(ADSI,'SELECT cn, mail, co, distinguishedName, displayName
FROM ''LDAP://disney''
where objectClass = ''ourdomain\lowell'' '
Lowell
June 29, 2010 at 12:35 pm
Kelvin, you didn't say if you were using AD or some other version of LDAP. I have had very little progress trying to query a linked server to a non-MS LDAP server.
I finally resorted to scripting out some VB to query LDAP and dump the results into a text file, then using SSIS on an Agent job to import the text file into SQL Server tables. This runs periodically, so it's unfortunately not real-time, but it meets (most of) our needs....:ermm:
If anyone replies with "here's how we did it, works great" I'll be grateful.
Good luck,
Rich
Viewing 5 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy