Solved

question active directory from SQL SERVER

Posted on 2011-09-21
4
294 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
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
sql help 8 55
Get the latest status 8 29
SQL Querying data from 3 tables, all with 1 common column 4 33
Query group by data in SQL Server - cursor? 3 28
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
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
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Viewers will learn how the fundamental information of how to create a table.

813 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

8 Experts available now in Live!

Get 1:1 Help Now