• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 329
  • Last Modified:

question active directory from SQL SERVER

Hello,

I search a script  to extract some information in active directory under MSSQL with these parameters :
* search on the username or on the name of the user
* return the username, the name and the type of account or group
* filter : logins no disabled.

Thanks

bibi
0
bibi92
Asked:
bibi92
  • 2
  • 2
1 Solution
 
bibi92Author Commented:
Thanks but I have this error :

Msg 7321, Niveau 16, État 2, Ligne 1
An error occurred while preparing the query "SELECT samAccountName,

      givenName, sn, legacyExchangeDN

   FROM 'LDAP://DC=ds.cam,DC=COM'

   WHERE objectClass='Person'

   AND objectClass = 'User'" for execution against OLE DB provider "ADSDSOObject" for linked server "ADSI".

Thanks

bibi
0
 
venk_rCommented:
I think it may be the security issue. Are you sure the sure has all permissions.?
0
 
bibi92Author Commented:
Thans bibi
0

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now