dbTalk Databases Forums  

Doing LDAP queries in DTS

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Doing LDAP queries in DTS in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Fredrik Green
 
Posts: n/a

Default Doing LDAP queries in DTS - 02-13-2004 , 03:48 AM






I would like to schedule a user synchronization from Active Directory to
another DB using DTS. Has anyone ideas on how to get started with this?

Is there a way to make a DB connection object via ADSI to query it using
LDAP?

If I just can get that part to work, the rest is easy.

/ Fredrik Green



Reply With Quote
  #2  
Old   
Darren Green
 
Posts: n/a

Default Re: Doing LDAP queries in DTS - 02-13-2004 , 01:36 PM






In message <OADYDah8DHA.2316 (AT) TK2MSFTNGP09 (DOT) phx.gbl>, Fredrik Green
<fredrik_gr (AT) hotmail (DOT) com> writes
Quote:
I would like to schedule a user synchronization from Active Directory to
another DB using DTS. Has anyone ideas on how to get started with this?

Is there a way to make a DB connection object via ADSI to query it using
LDAP?

If I just can get that part to work, the rest is easy.

/ Fredrik Green


I fudge it through a SQL Sever connection, and a linked server which
uses the OLE-DB Provider for Microsoft directory Services, and then use
OPENQUERY in TSQL-

SELECT samaccountname, department, company, telephonenumber, mail, sn,
givenname, l
FROM OpenQuery(ADSI, 'SELECT l, ou, name, givenname, sn, manager, mail,
telephonenumber, company, department, mobile, samaccountname
FROM ''LDAP://dc=darren,dc=Com'' WHERE objectCategory=''person'' AND
objectClass=''user'' ')
WHERE sn is not null and givenname is not null

--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com

PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.