Results 1 to 5 of 5
  1. #1
    Join Date
    May 2003
    Posts
    3

    Red face Unanswered: Linking Active Directory to SQL Server 2000

    Hi,

    everyone I'm trying to link an Active Directory to the SQL Server.
    Unluckily I came across some problems and the information I found in the archive of this
    forum didn't help me.
    I got the link basically running by following code:

    EXEC sp_addlinkedserver 'TEST', 'Active Directory Services 2.5', 'ADSDSOObject', 'LDAP://testserver.test.de'

    select * from openquery(TEST, '<LDAP://testserver.test.de>;(&(objectClass=Person)(sn=Smit h));adspath;subtree')

    Unluckily I'm not able to query any other attributes then adspath. Trying the following code results in an error:

    select * from openquery(TEST, '<LDAP://testserver.test.de>;(&(objectClass=Person)(sn=Smit h));sn;subtree')

    I receive the following error message:

    OLE DB-Fehlertrace [Non-interface error: OLE DB provider ADSDSOObject returned DBPROP_STRUCTUREDSTORAGE without DBPROPVAL_OO_BLOB being supported].
    OLE DB-Fehlertrace [OLE/DB Provider 'ADSDSOObject' IRowset::GetData returned 0x80040e21: Data status returned from the provider: [COLUMN_NAME=sn STATUS=DBSTATUS_E_CANTCONVERTVALUE]].

    The administrator of the Active directory service told me that my queries have successfully been executed and
    correct values have been returned.

    Does anyone have an idea what might cause my problems?

    Thanks

  2. #2
    Join Date
    Aug 2002
    Location
    Scotland
    Posts
    1,578
    Refer to this KBA about performing query using ADSI.
    --Satya SKJ
    Microsoft SQL Server MVP
    [IMG]http://sqlserver-qa.net/google_bart.gif[/IMG]

  3. #3
    Join Date
    May 2003
    Posts
    3
    Thanks, but I know this article already. I thought that maybe the chapter about limitations might be of interest for me especially the point about multivalued properties.
    However I cross checked all limitations with the admin. of my Active Directory Service. The second query which I posted as not running only returns one value. Also I checked the query with a Delphi application of my colleague and the application returned correctly a string value of the surname. Nevertheless my SQL Server always tells me that it cannot convert a value.

  4. #4
    Join Date
    Aug 2002
    Location
    Scotland
    Posts
    1,578
    What was the error during the conversion?
    --Satya SKJ
    Microsoft SQL Server MVP
    [IMG]http://sqlserver-qa.net/google_bart.gif[/IMG]

  5. #5
    Join Date
    May 2003
    Posts
    3
    Well I'm not doing an explicit conversion. The statement which causes the error message which indicates me that there is something wrong with a conversion is:

    select * from openquery(TEST, '<LDAP://testserver.test.de>;(&(objectClass=Person)(sn=Smit h));sn;subtree')

    and the error message is:

    Server: Nachr.-Nr. 7346, Schweregrad 16, Status 2, Zeile 1
    Could not get the data of the row from the OLE DB provider 'ADSDSOObject'. Could not convert the data value due to reasons other than sign mismatch or overflow.
    OLE DB error trace [OLE/DB Provider 'ADSDSOObject' IRowset::GetData returned 0x80040e21: Data status returned from the provider: [COLUMN_NAME=sn STATUS=DBSTATUS_E_CANTCONVERTVALUE]].

    Unluckily I also don't know of any tool with which I might be able to monitor the OLE DB provider to see what values and type of values are transfered.

    Is there any way to do explicit conversions of data types within the LDAP syntax of the OPENQUERY statement?

Posting Permissions

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