Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

question active directory from SQL SERVER

Posted on 2011-09-21
4
Medium Priority
?
322 Views
Last Modified: 2012-05-12
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
Comment
Question by:bibi92
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 

Author Comment

by:bibi92
ID: 36573775
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
 
LVL 8

Accepted Solution

by:
venk_r earned 2000 total points
ID: 36573854
I think it may be the security issue. Are you sure the sure has all permissions.?
0
 

Author Closing Comment

by:bibi92
ID: 36938298
Thans bibi
0

Featured Post

Survive A High-Traffic Event with Percona

Your application or website rely on your database to deliver information about products and services to your customers. You can’t afford to have your database lose performance, lose availability or become unresponsive – even for just a few minutes.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows gives you an overview on SQL Server 2016 row level security. You will also get to know the usages of row-level-security and how it works
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question