Skip to main content
added 537 characters in body
Source Link
mrdenny
  • 27k
  • 2
  • 43
  • 81

You should still be able to create a linked server to an LDAP database and query the LDAP database directly via the linked server.

There's information here on setting up the linked server.

To test I setup the linked server based on this post. Then I ran the following code and got back a recordset with various information in it (where bacon.lab is my AD domain).

SELECT * FROM OpenQuery ( 
  ADSI,  
  'SELECT displayName, telephoneNumber, mail, mobile, facsimileTelephoneNumber 
  FROM ''LDAP://bacon.lab''
  WHERE objectClass =  ''User'' 
  ') AS tblADSI
ORDER BY displayname

You should still be able to create a linked server to an LDAP database and query the LDAP database directly via the linked server.

There's information here on setting up the linked server.

You should still be able to create a linked server to an LDAP database and query the LDAP database directly via the linked server.

There's information here on setting up the linked server.

To test I setup the linked server based on this post. Then I ran the following code and got back a recordset with various information in it (where bacon.lab is my AD domain).

SELECT * FROM OpenQuery ( 
  ADSI,  
  'SELECT displayName, telephoneNumber, mail, mobile, facsimileTelephoneNumber 
  FROM ''LDAP://bacon.lab''
  WHERE objectClass =  ''User'' 
  ') AS tblADSI
ORDER BY displayname
Source Link
mrdenny
  • 27k
  • 2
  • 43
  • 81

You should still be able to create a linked server to an LDAP database and query the LDAP database directly via the linked server.

There's information here on setting up the linked server.