Tags

, , ,


  1. Create a Linked Server in MSSQL Database  .
  2. Assume that linked server name is ADSI, take the properties of the linked server (ADSI) and edit the Security options.
  3. mssql-1
  4. mssql-2
  5. Use the below script for Import data from AD.
  6. SELECT * FROM OpenQuery (
    ADSI,
    ‘SELECT displayName, telephoneNumber, mail, mobile, facsimileTelephoneNumber
    FROM ”LDAP://epillars.local/DC=epillars,DC=local”
    WHERE objectClass = ”User”
    ‘) AS tblADSI
    ORDER BY displayname
Advertisements