Solved

question active directory from SQL SERVER

Posted on 2011-09-21
4
274 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
  • 2
  • 2
4 Comments
 
LVL 8

Expert Comment

by:venk_r
Comment Utility
0
 

Author Comment

by:bibi92
Comment Utility
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
Comment Utility
I think it may be the security issue. Are you sure the sure has all permissions.?
0
 

Author Closing Comment

by:bibi92
Comment Utility
Thans bibi
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed

771 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now