Re: Accessing AD/ADAM from SQL



Microsoft makes a product for doing this type of directory integration
called MIIS. It is definitely worth a look.

If you want to code stuff yourself, the basic APIs for AD are LDAP API and
ADSI, which is a higher level abstraction layer over LDAP designed for COM
and scripting languages. There are also .NET options for ADSI
(System.DirectoryServices) and raw LDAP
(System.DirectoryServices.Protocols).

If you want write access to AD, you'll need to use ADSI, LDAP or an
equivalent, not the linked query stuff that allows you to pull AD data into
SQL. That provider is read-only. You could still host all that code in SQL
if you wanted, or place it in an external batch process or script. There
are lots of options, depending on your skills and interests.

Joe K.

--
Joe Kaplan-MS MVP Directory Services Programming
Co-author of "The .NET Developer's Guide to Directory Services Programming"
http://www.directoryprogramming.net
--
"Harvey" <harvey_b@xxxxxxxxxxx> wrote in message
news:pfOdncY-VOuPIHTZnZ2dnUVZ_oWdnZ2d@xxxxxxxxxxxxxx
Hi All:

First, let me state my qualifications - or lack thereof. I am not a
programmer and although I handle sql scripting to a certain level, I'm far
from being a sql developer.

That being said, I'm looking for some guidance on how to do a few things
to manipulate the info stored in AD (modifications) and to query AD to
pull information for building sql scripts.

Here are some basic descriptions of what I need to do.

In some cases the AD information is missing essential information (i.e.,
employeeID) that is stored in a database. I want to pull that info from
thw database and generate a script that will update the employeeID field
(property?) for the individual.

To update the sql database, I need to query AD to pull a piece of info
(i.e, userPrincipalName) to generate the sql update script.

Any info/guidance/links/docs, etc. you can provide that will help me get
there would be appreciated.

Thanks!

Harvey


.



Relevant Pages

  • Re: Content Page Identification
    ... the system will be able to pull the right data from the SQL. ... script, location, etc. You'll be able to find the HTTP_REFERER, ... REQUEST_URI, PHP_SELF keys and more:) ...
    (php.general)
  • Re: Vista hosting XPe tools/db
    ... Are you running this script on the machine that actually has the SQL server ... machine hosting the database. ... i don't know if you can install a second instance of SQL ...
    (microsoft.public.windowsxp.embedded)
  • Re: ActiveX script works in DTS but not in job, why?
    ... Account that SQL Agent runs under and it is a Local Admin on the box. ... As another test I saved the script as a .vbs file and tried running it, ... Microsoft OLE DB Provider for SQL Server ... that would be since I need to be able to load DTS packages from either a SQL ...
    (microsoft.public.sqlserver.dts)
  • Re: Vista hosting XPe tools/db
    ... here's an alternative script using the Microsoft ADO as ... opposed to the SQL DMO - this should allow this script to work ... Microsoft Windows XP Embedded Test Team ... This posting is provided "AS IS" with no warranties, and confers no rights. ...
    (microsoft.public.windowsxp.embedded)
  • Re: Enterprise Manager Newbie Question
    ... a SQL backup is not a simple copy of the database files. ... Is it possible to write a script that one could run from a workstation and ...
    (microsoft.public.sqlserver.tools)