Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

MSSQL -- Active Directory details

Posted on 2013-01-25
2
Medium Priority
?
320 Views
Last Modified: 2013-02-07
How can I do something like the below in MSSQL to get Active Directory details ?

select AD_GROUP_NAME
from AD
where USER_NAME = 'JOHNDOE"
and substr(AD_GROUP_NAME,1,2) = 'PS'
0
Comment
Question by:finance_teacher
2 Comments
 
LVL 80

Assisted Solution

by:arnold
arnold earned 1000 total points
ID: 38821647
0
 
LVL 51

Accepted Solution

by:
Mark Wills earned 1000 total points
ID: 38821711
There are a number of ways to do it...

Please see the MS KB Article : http://support.microsoft.com/kb/299410

Now, you can easily get into a bit of trouble with permissions and having access. So, make sure your SQl Server Service account (ie the account used to start the service) does have the appropriate permissions and not just "local"

Have a look at the last page of : http://www.sqlservercentral.com/Forums/Topic259587-8-3.aspx

Also, I used to use LDAP Browser to help with queries and find out schema etc - since upgraded to the paid for administrator : http://www.ldapbrowser.com/download.htm You might find it useful to resolve connections etc.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

It is possible to export the data of a SQL Table in SSMS and generate INSERT statements. It's neatly tucked away in the generate scripts option of a database.
It’s time for spooky stories and consuming way too much sugar, including the many treats we’ve whipped for you in the world of tech. Check it out!
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 SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

963 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