Query via MSSQL Linkedserver to UNIX LDAP Server returning nothing but NULLs

Query via MSSQL Linkedserver to UNIX LDAP Server returning nothing but NULLs

Post by Luis Velazque » Tue, 26 Nov 2002 08:45:20



Hello,
Hello team,
I am looking for help with trying to return values from an Unix LDAP
server via a query from MS SQL Linked server.

Here is what I have been doing:

--using sample code from the net, I create the linked server
EXEC sp_addlinkedserver 'ADSI', 'Active Directory Services 2.5',
'ADSDSOObject', 'adsdatasource'
GO

-- then I run a simple query like the following:

SELECT givenName  FROM
OPENQUERY(ADSI,'''SELECT givenName
FROM ''LDAP://directory.domain.nul/o=US''')

--the server directory.domain.nul/o=US is not the real name.
--just changed the name for this example.

--givenName is an actual field in the LDAP Schema

The data that returns from the query matches the actual number of
records that match the query except that each record says NULL vice
showing the value of the data which should be a person's name like
"John Smith"

My understanding that it might be something related to UniCode but I
am hopeful someone else has done the same and came up with a solution.

Thanks for any help.

Luis

 
 
 

1. Query via MSSQL Linkedserver to UNIX LDAP Server returning nothing but NULLs

Hello team,
I am looking for help with trying to return values from an Unix LDAP
server via a query from MS SQL Linked server.

Here is what I have been doing:

--using sample code from the net, I create the linked server
EXEC sp_addlinkedserver 'ADSI', 'Active Directory Services 2.5',
'ADSDSOObject', 'adsdatasource'
GO

-- then I run a simple query like the following:

SELECT givenName  FROM
OPENQUERY(ADSI,'''SELECT givenName
FROM ''LDAP://directory.domain.nul/o=US''')

--the server directory.domain.nul/o=US is not the real name.
--just changed the name for this example.

--givenName is an actual field in the LDAP Schema

The data that returns from the query matches the actual number of
records that match the query except that each record says NULL vice
showing the value of the data which should be a person's name like
"John Smith"

My understanding that it might be something related to UniCode but I
am hopeful someone else has done the same and came up with a solution.

Thanks for any help.

Luis

2. Is there a way to query a recordset to create a new one?

3. Querying WMI using MSSQL Server and query analyzer - OPENQUERY

4. Buffer manager internal error

5. Data exchange via XML from one MSSQL server to another MSSQL

6. CDaoWorkspace::CompactDatabase

7. Concat null yields null always returns null in 70 mode

8. DTC error

9. Linked OLAP Query from SQL Server 2000 to Analysis Server- Return Data Types

10. Error executing query via ASP but not via Query Analyzer

11. how to backup a sql server 65 server from a sql server 2000 server

12. Problem connecting one SQL Server server to another SQL Server server

13. Aliases in a query - returning a null