Results 1 to 5 of 5

Thread: Ad/ldap & sql 2005 (7321)

  1. #1
    Join Date
    Sep 2004
    Posts
    10

    Ad/ldap & sql 2005 (7321)

    When excuting this query below

    SELECT *
    FROM OPENQUERY( ADSI,
    'SELECT Name, SN, ST
    FROM ''LDAP://xxxx.local,DC=AAAAA4,''
    WHERE objectCategory = ''Person'' AND
    objectClass = ''user''')

    I receive the error message:

    Msg 7321, Level 16, State 2, Line 1
    An error occurred while preparing the query "SELECT Name, SN, ST
    FROM 'LDAP://xxxx.local,DC=AAAAA4,'
    WHERE objectCategory = 'Person' AND
    objectClass = 'user'" for execution against OLE DB provider "ADSDSOObject" for linked server "ADSI".


    I've tried setting "Be made with this security context" But that didn't help and the login is a Domain account on the LDAP/AD server. What is that I'm missing or doing wrong?

  2. #2
    Join Date
    Sep 2002
    Posts
    5,938
    Does that domain account have permission to query ads? Tried test linked server connection in ssms?

  3. #3
    Join Date
    Sep 2004
    Posts
    10
    The test linked connection in SSMS works, but I'm try to verify that the login can query AD (what's the best way to determine that), I can login with that account an access Active Directory Users & Computers, Sites & Serves And Domain & Trust.

  4. #4
    Join Date
    Sep 2002
    Posts
    5,938
    Tried map user to specific domain account?

  5. #5
    Join Date
    Sep 2004
    Posts
    10
    I got it, thanks.

Posting Permissions

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