mercredi 29 avril 2015

AD query works on SQL 2005 but not on SQL 2008 R2

Note: Active Directory is running on Server 2003 32 bit.

This query works on our current production SQL 2005 32 bit server:

select cn, samaccountname, mail,co, distinguishedName, displayName

from openquery
(ADSI,'SELECT cn,samaccountname, mail, co, distinguishedName, displayName

            FROM ''http://LDAP<ourDomain>''  ')

But when I run it on SQL 2008 R2 64 bit, I get:

Msg 7330, Level 16 State 2, Line 1 Cannot fetch a row from OLE DB provider "AdsDSOObject" for linked server "ADSI".

The linked server connection on the 2008 R2 SQL tests OK, everything is configured the same as SQL 2005. The most common fix I found online said to make sure InProcess is checked in the AdsDSOObject properties, which it is.

Any help greatly appreciated.

Aucun commentaire:

Enregistrer un commentaire