• Thanks for your reply.

    Here is the command I used to create the linked server:

    EXEC sp_addlinkedserver 'ADSI', 'Active Directory Services 2.5',

    'ADSDSOObject', 'adsdatasource'

    GO

    Then I tried this query (domain changed for confidentiality):

    select sn, givenName

    from openquery(ADSI, '

    select givenName,

    sn,

    sAMAccountName,

    displayName,

    mail,

    telephoneNumber,

    mobile,

    physicalDeliveryOfficeName,

    department,

    division

    from ''LDAP://DC=mydomain,DC=org''

    where objectCategory = ''Person''

    and

    objectClass = ''user''

    ')

    It seems from the error that something's wrong with the query itself - syntax, or the way I'm specifying the domain for the LDAP:// part. Is there a place in the AD Users and Computers control panel that indicates what the AD domain is, to help me specify the "DC=" parameters?

    But I don't know if it could be a firewall issue instead, or something else. As I mentioned before, I used the Test Connection option, and it said the test was successful even when I entered the wrong password for the linked server login. That can't be right.

    Thanks for any further advice you can give.

    - webrunner

    -------------------
    A SQL query walks into a bar and sees two tables. He walks up to them and asks, "Can I join you?"
    Ref.: http://tkyte.blogspot.com/2009/02/sql-joke.html