Solved

question active directory from SQL SERVER

Posted on 2011-09-21
4
309 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
 
LVL 8

Expert Comment

by:venk_r
ID: 36573709
0
 

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 500 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
SQL 2012 AOG and SQL2014 AOG 76 60
SQL Consolidate rows 3 26
Freeze portion of datamart 2 21
install sql server management studio 2008 express error 3 29
Nowadays, some of developer are too much worried about data. Who is using data, who is updating it etc. etc. Because, data is more costlier in term of money and information. So security of data is focusing concern in days. Lets' understand the Au…
JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.

763 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