Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2003
    Location
    Singapore
    Posts
    3

    Wink Unanswered: UPDATE Active Directory userdate from a SQLServer

    Hello Guys

    I have linked a SQLServer with ActiveDirectory and it rocks, but now after my number one million select statement, i would like to try something new...... Namely to update data on Linked AD, from the SQL server.

    Any who know how to do a simple Update with openquery??

  2. #2
    Join Date
    Nov 2002
    Location
    San Francisco
    Posts
    251

    Re: UPDATE Active Directory userdate from a SQLServer

    do you use OLE DB?

    try ADSI

    http://www.microsoft.com/windows2000.../adsilinks.asp


    check this for some samples....
    http://www.15seconds.com/focus/ADSI.htm


    jiri

  3. #3
    Join Date
    Jan 2003
    Location
    Singapore
    Posts
    3

    Wink Re: UPDATE Active Directory userdate from a SQLServer

    Nope cant use ADSI as it dosnt provide access to all the fields in Active Directory, but only to those fields that was available on the NT4.0, so have to use the LDAP query string to get full access to all the user fields as listed on M$'s page here.

    http://msdn.microsoft.com/library/de...ce_mapping.asp

    So ADSI in a purely Windows 2000 environment is pretty useless as i se it, as it isnt even possible to pull out the email, firstname, lastname & phone/mobile fields from Active Directory, but have to use LDAP to get those.

    So still how do you do an update with LDAP??

    Cheers and happy new year.

  4. #4
    Join Date
    Nov 2002
    Location
    San Francisco
    Posts
    251

    Re: UPDATE Active Directory userdate from a SQLServer

    i don't dig into details every day, but ADSI is a top layer. It can sit on LDAP, IIS, NDS, and WinNT. LDAP API is very very C++



    what exactly you cannot update with ADSI PUT?

    http://msdn.microsoft.com/library/de..._with_adsi.asp


    as the Microsoft sample shows.... ADSI with LDAP....

    Dim x As IADs
    Set x = GetObject("LDAP://CN=JeffSmith,CN=Users,DC=Fabrikam, DC=Com")
    x.Put "givenName", "Jeff"
    x.Put "sn", "Smith"
    x.SetInfo ' Commit to the directory.




    jiri
    Last edited by playernovis; 01-03-03 at 23:12.

  5. #5
    Join Date
    Jan 2003
    Location
    Singapore
    Posts
    3
    Ok but how do you "PUT" when you have a connection to the AD as an linked server? with OpenQuery??

    /Ronni

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •