针对Active Directory的RUN选择错误

时间:2017-06-02 18:55:30

标签: sql sql-server sql-server-2012

我想运行此查询:

SELECT top 10 *
FROM openquery(ADSI, '       
            select  *    
            from    ''LDAP://londcrwc02.adslocal.net:389/ dc=adslocal,dc=net''      
            where   objectCategory = ''Person''      
                 and   objectClass = ''user''      
    ')

在两个不同的服务器中,第一个服务器可以运行查询完美但第二个服务器有此错误

  

Msg 7321,Level 16,State 2,Line 163
  准备查询时发生错误"
                  选择*
                  来自' LDAP://londcrwc02.adslocal.net:389 / dc = adslocal,dc = net'
                  其中objectCategory =' Person'

" for execution against OLE DB provider "ADsDSOObject" for linked server "ADSI". 

0 个答案:

没有答案