从SQL Server查询问题LDAP [英] Querying LDAP from SQL Server issue

查看:378
本文介绍了从SQL Server查询问题LDAP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一些麻烦,配置SQL语句从SQL Server上的LDAP执行OPENQUERY。我跟着这里列出的指示:<一href="http://stackoverflow.com/questions/1251038/querying-active-directory-from-sql-server-2005">Querying从SQL Server Active Directory的2005 但我有一些麻烦,把最后拼在一起。

I'm having some trouble configuring a SQL statement to perform an openquery on LDAP from SQL Server. I followed the instructions as laid out here: Querying Active Directory from Sql Server 2005 but I'm having some trouble putting the final pieces together.

首先,我不知道我的LDAP服务器了。所以,我做了一个 NSLOOKUP ,发现默认的服务器为:

Firstly, I didn't know where my LDAP server was. So I did a nslookup and found the default server as:

abc.domain.popo.local

我配置我的 OPENQUERY

SELECT * FROM OPENQUERY( ADSI, 'SELECT * FROM ''LDAP://DC=abc,DC=domain,DC=popo,DC=local'' WHERE
objectCategory = ''User''')   

不过,我得到一个错误,指出

However, I get an error saying that

时发生错误,preparing查询SELECT * FROM'LDAP:// DC = ABC,DC =域,DC = POPO,DC =本地WHERE objectCategory属性='用户'执行对OLE DB供应商ADSDSOObject链接服务器ADSI。

An error occurred while preparing the query "SELECT * FROM 'LDAP://DC=abc,DC=domain,DC=popo,DC=local' WHERE objectCategory = 'User'" for execution against OLE DB provider "ADSDSOObject" for linked server "ADSI".

什么是可能的问题在这里?我是不是建立 DC 错误(因为我甚至不知道什么是DC的意思)?或者是更有可能的是我只是在错误的服务器完全的LDAP?

What is the likely issue here? Am I setting up the DC incorrectly (because I don't even know what DC means)? Or is it more likely that I just have the wrong server altogether for LDAP?

推荐答案

在我看来像你想查询对一个Windows活动目录(该功能显示为LDAP)。默认情况下,AD不允许匿名查询 - 你有一个值得信赖的用户名和密码进行身份验证。此外,您还需要检查你的系统管理员,以确保你有适当的基准值(DC = ABC,DC =域,DC = POPO,DC =本地)。

It looks to me like you're trying to query against a Windows Active Directory (which functionally appears as LDAP). By default, AD will not allow anonymous querying - you have to authenticate with a trusted username and password. Also, you need to check with your sysadmin to make sure you have the proper base value ("DC=abc,DC=domain,DC=popo,DC=local").

这篇关于从SQL Server查询问题LDAP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆