Figured out how to query active directory from SQL Server. Its pretty well documented but the first step is to create what is know as a 'Linked Server'. This involves executing one line of code in Query Analyzer:
sp_addlinkedserver 'ADSI', 'Active Directory Service Interfaces', 'ADSDSOObject', 'adsdatasource'
Then you can execute stuff like this:
SELECT * from openquery(ADSI, 'SELECT cn,objectsid FROM ''LDAP://atlas/CN=Users,DC=doublestarinc,DC=com''')
I'm not sure if its possible to perform a join directly with this. To save time I created a view using something similar to the above SELELCT statement. Then using that view we can all join to our heart's content.
Subscribe to:
Post Comments (Atom)
C# Sucks!
JK!! Seriously, though, somewhere around C#-3 we should have inculcated ourselves with the question: "Does 'CAN' == 'SHOULD...
-
That pesky problem has reared its ugly head again! I remembered that its a permissions problem but forgot the wrinkle where you have to REMO...
-
Today I learned that it is possible to call private and protected methods by using reflection. This is a great technique for Unit Testing su...
1 comment:
Can anyone recommend the well-priced Managed Service program for a small IT service company like mine? Does anyone use Kaseya.com or GFI.com? How do they compare to these guys I found recently: [url=http://www.n-able.com] N-able N-central service management
[/url] ? What is your best take in cost vs performance among those three? I need a good advice please... Thanks in advance!
Post a Comment